Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Making database name part of SQL prompt in sqlplus
Add the lines:
set termout off
column name new_value _dbname
select name
from v$database ;
set sqlprompt '&_dbname.> '
set termout on
To glogin.sql in $ORACLE_HOME/sqlplus/admin
This solution wont span reconnects..
OLDDB> connect user/password_at_new_database
..once connected in sqlplus. Nor does it play particularly well with the /nolog option.
HTH
Shawn M Ferris
Oracle DBA - Time Warner Telecom
> -----Original Message-----
> From: Jay Weinshenker [mailto:jweinshe_at_concentric.net]
> Sent: Thursday, July 06, 2000 11:56 AM
> To: ORACLE-L_at_fatcity.com; oracledba_at_quickDOC.co.uk
> Subject: Making database name part of SQL prompt in sqlplus
>
>
> Anyone know how to do it?
>
> I've got a number of users doing SQL*Plus work and they keep
> making errors
> as to which instance they are in...
>
> Anyone?
>
> J
>
>
> --------
> If you're bored, then visit the list's website:
> http://www.lazydba.com (updated daily)
> to unsubscribe, send a blank email to
> oracledba-unsubscribe_at_quickdoc.co.uk
> to subscribe send a blank email to oracledba-subscribe_at_quickdoc.co.uk
Received on Thu Jul 06 2000 - 15:02:59 CDT