Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQLPROMPT
If I may add a suggestion to what Mr. Bobak had to say:
I have a connect.sql script in the same directory as the login.sql script.
The connect.sql script has the following lines:
connect &1 &2 &3
@@login
The reason I have "&2" and "&3" parameters is to be able to say @connect sys/password as sysdba
> -----Original Message-----
> From: Mark J. Bobak [mailto:mark_at_bobak.net]
>
> ...
> Anyhow, one work around I have seen is:
> Create conn.sql
> put 'connect &1' as the first line
> add in the lines from glogin.sql that set the prompt
>
> Then, when you switch connections, get in the habit of typing '@conn
> ...' instead of 'conn ...'.
>
> On Sat, 2002-10-26 at 01:58, PK_Deepa/VGIL_at_vguard.satyam.net.in wrote:
> > We want to set the sql promp as username_at_database >
> > We set this in Glogin.sql as :
> >
> > column global_name new_value gname
> > select user||'@'||host_name global_name from
> v$instance,global_name;
> > set sqlprompt '&gname>'
> >
> > We are able to get this prompt when we login to sql for
> the first time .
> > When we change connection at the prompt using connect
> statement we are not
> > able to get the new user name and database as prompt
> >
> > eg :
> > RR_at_BKP>conn test/test_at_o8
> > Connected.
> > RR_at_BKP>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jacques Kilchoer INET: Jacques.Kilchoer_at_quest.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 Oct 28 2002 - 12:19:16 CST