Re: sqlprompt in Sql*Plus
Date: 1995/06/28
Message-ID: <3ssiov$cbd_at_palm.phcs.com>#1/1
In article <3smipm$8j9_at_sheoak.bendigo.latrobe.edu.au>, ian_at_ironbark.bendigo.latrobe.edu.au (Ian Couroulis) writes:
|> What I really would like is my prompt set to: ORACLE_SID (user)
|> For instance:
|>
|> EMP (scott) > connect tiger/tiger
|> EMP (tiger) >
|>
|> Is this possible? If not, what about either ORACLE_SID or user
|> as the prompt?
I don't know how to make the sqlprompt automatically update itself, but there's an easy way to make it reflect the current status:
column tmp new_value tmp
select name||' ('||lower(user)||') > ' tmp
from V$PARAMETER
where name = 'db_name' ;
set sqlprompt "&tmp"
You could put this in a script and run it
(a) from your login.sql
and (b) each time the information in your prompt changes.
But a truly dynamic prompt would be better. Received on Wed Jun 28 1995 - 00:00:00 CEST