Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SET SQL Prompt automatically??
if U use the same code and create a file called connect.sql in your sql path and
when ever connect user @connect name/pass_at_host the same promt will also change.
Connect.sql
connect &1
set verify off
set termout off
column value new_value _sid
column user_value new_value _user
select substr(global_name,1,instr(global_name,'.') - 1) as value, user as
user_value from global_name;
set sqlprompt '&_user@&_sid>'
set termout on
set verify on
MohammedB wrote:
> In your glogin.sql file located in $ORACLE_HOME/sqlplus/admin,
> place these lines:
>
> set verify off
> set termout off
>
> column value new_value _sid
> select substr(global_name,1,instr(global_name,'.') - 1) as value
> from global_name;
>
> set sqlprompt '&_sid SQL> '
>
> set termout on
> set verify on
>
> Login to sqlplus and you'll have your sql prompt set.
>
> Thanks to (I think) Sybrand Bakker on helping me out on this a
> couple months ago when I posted a similar query.
>
> hth
>
> mkb
>
> In article <87mpm8$kf$1_at_porthos.nl.uu.net>, "John Neus"
> <john.neus_at_superconsult.nl> wrote:
> >Hello,
> >
> >I would like to set my prompt in Oracle SQL*Plus . Suppose I
> have 2
> >environments: development and production.
> >Therefore I would like to have 2 batchfiles which both run
> Oracle SQL*Plus;
> >
> >batchfile 1: automatically connection to the Development
> environment and
> >with automatically prompt: DEV>
> >batchfile 2: automatically connection to the Production
> environment and
> >with automatically pompt PRO>
> >
> >I know this is possible by a making the batchfiles, but how ?
> >
> >Thanks
> >
> >John
> >
> >
> >
> >
> >
> >
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!
--
55 Broadway - 21st Floor
New York, New York 10006
Phone: 800.221.5327 x2136
Fax: 212-825-2245
E-Mail: MWeinstock_at_lds.com
Web: http://www.lds.com
Received on Mon Feb 07 2000 - 11:16:17 CST