Re: Sqlprompt and Oracle Sid
From: Larry Winn <lwwinn_at_mc4adm.uwaterloo.ca>
Date: 1996/04/23
Message-ID: <DqBHv4.Eu4_at_watserv1.uwaterloo.ca>#1/1
Date: 1996/04/23
Message-ID: <DqBHv4.Eu4_at_watserv1.uwaterloo.ca>#1/1
In article <dewing.61.000E2FAF_at_gasou.edu>, dewing_at_gasou.edu (David Ewing) writes:
> I would like to set the sqlprompt to reflect the
> oracle sid if possible. For example, if a dba
> was in PROD, the sqlprompt might be
> something like SQL(PROD)>. How do you
> pass the oracle sid to the set sqlprompt in
> sql? I would like to put this in the overall
> login.sql script.
>
> Oracle 7.1.4 AIX 3.2.5 Rs6000-59H
Try this:
column xxx new_value instance
select value xxx from v$parameter where name='db_name';
set sqlprompt '&instance> '
Larry Winn
select value xxx from v$parameter
Received on Tue Apr 23 1996 - 00:00:00 CEST