Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL Plus and the SQL prompt...
ok.. here are the instructions:
1 - go to your ORACLE_HOME/sqlplus/admin directory 2 - edit you glogin.sql script 3 - at the bottom of the glogin.sql script add: set termout off pause off arraysize 1 rem rem Store username rem col user_id new_value user_id col user_name new_value user_name select user_id, lower(username) user_name from user_users where username = user; rem rem Store database name rem col db_name new_value db_name select lower(substr(global_name,1,(instr(global_name,'.',1,1)- 1))) db_name from global_name; set sqlprompt "&db_name:&user_name> "this will give you who you connected as, as well as the database you are connected to within your SQL> prompt.
Good luck.
Alex
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Sep 05 2000 - 13:06:47 CDT