Home » RDBMS Server » Server Utilities » SQL Plus prompt
SQL Plus prompt [message #70199] Wed, 01 May 2002 07:29 Go to next message
Richard
Messages: 44
Registered: May 2000
Member
How can I set the promt in SQL Plus to show the database that I am connected to?

I.e. rather than just showing SQL> I would like to see SQL DATABASE.NAME>
Re: SQL Plus prompt [message #70200 is a reply to message #70199] Wed, 01 May 2002 08:13 Go to previous message
Bricklen Anderson
Messages: 3
Registered: February 2002
Junior Member
the following is an edited version from Tom Kyte's book. Put it in your glogin.sql file (located in your $ORACLE_HOME/sqlplus directory)
set termout off
select lower(user)||'@'||decode(global_name,'Oracle8i.World','8.1.7',lower(substr(global_name,1,4))) global_name from global_name;
set sqlprompt '&gname>'
set termout on
Previous Topic: HELP for control file
Next Topic: Hot backup in Windows 2000
Goto Forum:
  


Current Time: Fri Apr 26 22:07:47 CDT 2024