mm...
what if i logged in with SYSTEM first then "conn sys/pswd@db"?
it's still show SYSTEM @db.
----- Original Message -----
Sent: Saturday, February 15, 2003 6:53 PM
Subject: RE: how to make sql prompt like USER@DATABASE> ?

You can add following lines to your glogin.sql ($ORACLE_HOME/sqlplus/admin directory) file.

 

set heading off

set term off

set feedback off

spool myprompt.sql

select 'set sqlprompt "' || SYS_CONTEXT ('USERENV', 'session_user') || '@' || SYS_CONTEXT ('USERENV', 'DB_NAME') || '>"'

from dual

/

spool off

@myprompt.sql

set heading on

set term on

set feedback on

 

Alternatively you can create a file with above lines, put that file in bin and call it anytime to make your prompt…

 

Cheers,

Rajesh

 

----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Salaheldin Aboali
Sent: Saturday, February 15, 2003 2:14 PM
To: Multiple recipients of list ORACLE-L
Subject: how to make sql prompt like USER@DATABASE> ?

 

hi

how to make sql prompt like USER@DATABASE> ?

where USER: connected user

DATABASE: database global name, or database local alias

Regards,
Salaheldin Aboali
-------------------------------------------
Senior Software Developer
Management Information Systems
http://www.mis-kuwait.com
Phone:
+965.240.64.25
+965.240.67.98
+965.240.80.92
Ext. 235
Fax. +965.240.81.53
Cell. +965.790.31.65

Reply via email to