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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Dynamic prompt in SQL*PLUS

Re: Dynamic prompt in SQL*PLUS

From: Tanel Põder <tanel.poder.003_at_mail.ee>
Date: Tue, 24 Feb 2004 09:48:18 +0200
Message-ID: <1bc701c3faaa$91f0fd60$73f823d5@porgand>


Prem,

This doesn't work "dynamicly", e.g. when you issue a connect clause to another user/connect string from inside sqlplus, then the prompt will retain the old values. But these new sqlplus variables I posted, will work dynamicly as well.

Tanel.

> Tanel , this works for me on v9.2.0.4.
>
> --------------8<--------------8<--------------8<--------------8<----------
----8<--------------8<----
> COLUMN gname new_value gname noprint
> SET feed OFF verify OFF
> SELECT UPPER(USER)||'@&_CONNECT_IDENTIFIER'||' SQL>' gname FROM dual;
> SET sqlprompt '&gname> ' feed ON verify ON
> --------------8<--------------8<--------------8<--------------8<----------
----8<--------------8<----
>
> I got this piece of code on this list.
>
> Regards,
> Prem.
>
> >>-----Original Message-----
> >>Tanel Per
> >>
> >>Hi!
> >>In 10g you can use _USER and _CONNECT_IDENTIFIER sqlplus
> >>variables, for example:
> >>SET SQLPROMPT _USER'@'_CONNECT_IDENTIFIER>
> >>Before 10g you can't have dynamic prompt inside sqlplus.
> >>Tanel.
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request_at_freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Tue Feb 24 2004 - 01:45:11 CST

Original text of this message

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