Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SET SQL Prompt automatically??
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
>
>
>
>
>
>
![]() |
![]() |