Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sqlplus prompt
Rich Headrick wrote:
>
> How does one change the default sqplus prompt to be = to current SID?
>
> Please email.
>
> rich
The basic idea is to get the string you want into a substitution (&) variable and then:
set sqlprompt "&string"
For example:
column sq new_value sqp;
select userenv('sessionid')||'> ' sq from dual;
set sqlprompt "&sqp" -- the quotes are necessary to preserve the
trailing space
Now put this in your login.sql command file to be executed each time you start a SQL*Plus session.
All you now have to do is to work out a way of automatically
re-executing the login.sql file whenever the user changes session with a
"connect ..." statement.
I have no idea how you might do this :-(
Chrysalis. Received on Thu May 01 1997 - 00:00:00 CDT
![]() |
![]() |