Re: Change the prompt in SQL*PLUS

From: <tedchyn_at_yahoo.com>
Date: Fri, 11 Jun 1999 14:48:41 GMT
Message-ID: <7jr7k5$hij$1_at_nnrp1.deja.com>


[Quoted] Bruno, the customization of prompt can be made in login.sql, so everytime you would see the customized prompt. But when you conn to another instance from the prompt - the prompt does not change.

Ted
In article <7jqfqn$7m0$1_at_feed.teaser.fr>,   "Bruno Thomas" <bruno.nospam_at_teaser.fr> wrote:
> <agi_at_mail.taicom.com.tw> a écrit dans le message :
> 7jprqd$3hc$1_at_nnrp1.deja.com...
> > Hi, theres ,
> > I have two problems:
> > 1.How do I write a script to change the prompt in SQL*PLUS like
> > follows :
> >
> > sessionid,ser#_at_dbname> instead of just SQL>
> >
>
> Here a script to have username_at_global_name :
>
> set termout off
> set pause off
> define new_prompt='nolog'
> column value new_value new_prompt
> select username || '_at_' || global_name value from user_users,
global_name;
> set sqlprompt "&new_prompt> "
> set termout on
>
> you have only to adapt the query to obtain serial# and sessionid.
>
> >
> > 2.How can I run a sql script (lets say xxx.sql) without the
> > old ....new two lines
> >
> > SQL> _at_xxx cust
> > old 2: where table_Name = UPPER('&1')
> > new 2: where table_Name = UPPER('cust')
> >
> > Just see the query result.
>
> SHOW[MODE] {OFF|ON}
>
> Controls whether SQL*Plus lists the old and new settings of a SQL*Plus
> system variable when you change the setting with SET. ON lists the
settings;
> OFF suppresses the listing. SHOWMODE ON has the same behavior as the
> obsolete SHOWMODE BOTH.
>
> > Rgds,
> > Agi Chen
>
> Hope this help...
>
> --
> Bruno Thomas
> bruno.nospam_at_teaser.fr est ma véritable adresse
> bruno.nospam_at_teaser.fr is my real address
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Fri Jun 11 1999 - 16:48:41 CEST

Original text of this message