Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: instance name in SQL Plus prompt?
The problem is that doing this does NOT guarantee that the sqlprompt is going to accurately reflect the instance you are logged onto. login.sql fires only when you login to sqlplus, not to a database.
so do the following
sqlplus userid/pass_at_testdb
TESTDB> do some work here TESTDB> conn userid/pass_at_livedb TESTDB> TRUNCATE TRANSACTION TABLE; TESTDB> TABLE TRUNCATED.
cue dba heart attack.
For my money having information that may well be inaccurate is worse than having no information.
-- Niall Litchfield Oracle DBA Audit Commission UK "Gildas COTOMALE" <gcotomale_at_kleegroup.fr> wrote in message news:9f2ahv$dof$1_at_klin.lan.klee.fr...Received on Wed May 30 2001 - 05:09:21 CDT
>
> "Daniel A. Morgan" <dmorgan_at_exesolutions.com> a écrit dans le message
news:
> 3B0DFC51.615A694F_at_exesolutions.com...
> > "Dan A." wrote:
> >
> > > Hi - Does anyone know how to put the current instance name in the sql
plus
> > > prompt? I'm using the windows (2000) version of sqlplus. Instead of
the
> > > default:
> > >
> > > SQL>
> > >
> > > can it be changed to something like:
> > >
> > > TESTDB>
> > >
> > > and it would always change to whatever instance you login to?
> > >
> > > Thanks in advance! -Dan
> >
> > No.
> >
> > Daniel A. Morgan
> >
>
> No ? I suggest trying to SET his SQLPROMPT to 'testdb' (w/o space) in his
> LOGIN.SQL file...
>
>
>
![]() |
![]() |