Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Change the prompt in SQL*PLUS
<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#@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 || '@' || 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> @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
Received on Fri Jun 11 1999 - 03:02:26 CDT
![]() |
![]() |