Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: sqlplus prompt

Re: sqlplus prompt

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/05/01
Message-ID: <336871A4.322C@iol.ie>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US