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: Oracle Instance Prompt.

Re: Oracle Instance Prompt.

From: Thomas Bregulla <Thomas.Bregulla_at_T-Mobil.de>
Date: 16 Aug 1999 15:05:57 +0200
Message-ID: <ha4shzlvt6.fsf@t-mobil.de>


Chandra Pabba <chandra_pabba_at_sabre.com> writes:

Another one my be this:

----snip----

variable user varchar2(32)
set termout off

column user noprint new_value user
select user from dual;
column user clear

column global_name noprint new_value instanz
select global_name from global_name;
column global_name clear

set termout on

set SQLPROMPT '&user:&instanz/SQL> '

---snap ---

> Hi Bhavesh,
>
> Yes, you could do that. You have to include the following few lines of code in
> your
> glogin.sql file, which will generally be in $ORACLE_HOME/sqlplus/admin.
>
> SET TERMOUT OFF
> COLUMN NAME NEW_VALUE _DBNAME
> SELECT NAME FROM v$DATABASE;
> SET SQLPROMPT '&_DBNAME.> '
> SET TERMOUT ON
>
> Don't forget to grant select privileges on V_$database table to public.
>
> Thanks
>
> Chandra
>
> BHAVESH PATEL wrote:
>
> > Hello
> >
> > Can anyone please let me know the following.
> >
> > I want to replace the general SQL Prompt in SQL PLUS from SQL> to Instance
> > Name>.
> > can we be able to do that.
> >
> > Thanks
> > -Bhavesh
> > (bhavesh-patel_at_worldnet.att.net)
>

--



Thomas Bregulla | Opinions shown here are mine, T-Mobil, Bonn 0171.5403404 | not of the company I am working for. Received on Mon Aug 16 1999 - 08:05:57 CDT

Original text of this message

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