Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle database name in SQL*Plus prompt
Winston Douglas wrote:
> Is there an easy way to set my prompt in SQL*Plus to the name of the
> database that I am using without having to prompt myself for the name
> of
> the database ?
>
> I have experimented with several options in the glogin/login.sql files
> but
> keep comming across roadblocks.
>
> Winston Douglas
I have a script called sql, which contains sqlplus $1@$SQLPATH/login_prompt.sql $1
set sqlprompt "&1>" So, if I type sql user_at_database it connects to user_at_database and I see all the time the prompt user_at_database> SELECT... if I type sql user it connects to user to my local database and I see all the time the prompt user> SELECT...
The snag is that, if you change user/database from sqlplus (connect ..),
you'll see always the initial
user/database. (so it could be dangerous!)
mail me if you find a better way.
daniReceived on Thu Jul 17 1997 - 00:00:00 CDT