There is no truly automated way to do this. Why Oracle doesn't make this a builtin SQL*Plus option, I have NO idea. Seems to me like something that ought to have been there since day one.
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 ...'. Hope that helps, -Mark On Sat, 2002-10-26 at 01:58, [EMAIL PROTECTED] wrote: > We want to set the sql promp as username@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@BKP>conn test/test@o8 > Connected. > RR@BKP> > > Can anyone suggest a method to do this. > > Thanks, > Deepa > > -- -- Mark J. Bobak Oracle DBA [EMAIL PROTECTED] "It is not enough to have a good mind. The main thing is to use it well." -- Rene Descartes -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Mark J. Bobak INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).