Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL*Plus Worksheet Question
Hi leng,
The following works fine with SQL*Plus if you include it in Glogin(Login).sql
column user new_value A noprint
column global_name new_value B noprint
select user from dual;
select global_name from global_name;
set sqlprompt &A@&B.....
HTH ...
Regards
JAI
"Kaing, Leng" <Leng.Kaing_at_team.telstra.com>
Sent by: root_at_fatcity.com
02/03/03 11:59 AM
Please respond to ORACLE-L
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: Subject: RE: SQL*Plus Worksheet Question
> Eric,
>
> Not sure what you're talking about but here's a stab in the dark...
>
> set sqlprompt "mydb.myusername> "
>
> This changes the output prompt, but not the prompt in the header of the
window bar. If you can figure this one out, please let me know too.
>
> Rgs,
>
> Leng.
>
> ---------------------
> From: "Harrington, Eric" <Eric.Harrington_at_maine.gov>
> Date: Fri, 31 Jan 2003 10:29:25 -0500
> Subject: SQL*Plus Worksheet Question
>
> This message is in MIME format. Since your mail reader does not
understand
> this format, some or all of this message may not be legible.
>
> ------_=_NextPart_001_01C2C93D.891CA8A0
> Content-Type: text/plain
>
> Version 9.2
>
> I am monitoring several databases and have several SQL*Plus Worksheet
> sessions open. I would like to display the connected user name and
instance
> as the prompt associated w/ the appropriate session. Per Metalink
> Note:120664.1 I added the following lines to the login.sql:
>
> set termout off
> spool set_prompt.sql
> select 'set sqlprompt '||instance||'>'
> from sys.v_$thread;
> spool off
> start set_prompt.sql
> set termout on
>
> This does successfully change the prompt to the instance name for
SQL*Plus
> but not SQL*Plus Worksheet. What am I missing? Is there another way to
> accomplish this?
>
> Eric Harrington
> State of Maine
> Bureau of Motor Vehicles
>
> ----------------------------------------------------------
> Leng Kaing
> Email: leng.kaing_at_team.telstra.com
> Phone: +61-417-371-348
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Kaing, Leng INET: Leng.Kaing_at_team.telstra.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: JayK_at_ibsplc.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Feb 03 2003 - 03:03:54 CST
![]() |
![]() |