Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL Plus and the SQL prompt...

Re: SQL Plus and the SQL prompt...

From: Sean <dolans_at_my-deja.com>
Date: Tue, 05 Sep 2000 18:41:22 GMT
Message-ID: <8p3eoe$4nh$1@nnrp1.deja.com>

In article <8p3cna$23p$1_at_nnrp1.deja.com>,   akimeu_at_my-deja.com wrote:
> 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.
>

Thank You. It worked great! However, I notice it only takes affect when you shut down SQL Plus and then login again. For example, if you do a "connect foo_at_foobar" and connect to another instance, it still leaves your old prompt. Any suggestions on that? Or is that by design?

Thanks again.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Sep 05 2000 - 13:41:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US