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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Enhancement SQL*Plus (prev.: Re: Fixing a little problem in the login.sql script found in Tom Kyte's book)

Re: Enhancement SQL*Plus (prev.: Re: Fixing a little problem in the login.sql script found in Tom Kyte's book)

From: Peter van Rijn <p.vanrijnREMOVE_at_THISzhew.nl>
Date: Tue, 21 Jan 2003 09:01:46 +0100
Message-ID: <v2pvmafuq8485@corp.supernews.com>


Thanks Alison,

A lot of people will appreciate this I'm sure. And just in case you feel the burden of all those undisclosed secrets: you're welcome anytime ;-)

Peter

"Alison Holloway" <Xalison.holloway_at_oracle.comX> schreef in bericht news:3E2CCBBA.8090002_at_oracle.comX...
> Peter,
>
> You are asking for a lot of pre-release info, but I'll let you have
another snippet. :)
> Yes, it will be possible to reset the variables after each successful
connect command.
> Now, that's all I'm going to give you ... for now.
>
> Alison
>
> Peter van Rijn wrote:
> > Good Morning Alison,
> >
> > Thanks for your comments. It certainly is an enhancement, but what I
really
> > meant was an enhancement of the prompt itself. If the prompt is set to
use a
> > variable it should be reset every time a connect command has been used.
If I
> > understand you well this has not (yet?) been realized.
> >
> > regards,
> >
> > Peter
> >
> >
> >
> > "Alison Holloway" <Xalison.holloway_at_oracle.comX> schreef in bericht
> > news:3E260407.2010704_at_oracle.comX...
> >
> >>Chris Jones will no doubt have some comments on this, but I thought I'd
> >
> > mention that in
> >
> >>SQL*Plus 9.2, we introduced a define variable that contains the SID
> >
> > supplied by the user.
> >
> >>This variable can be used to set the prompt. Here's the blurb from the
9.2
> >
> > doc:
> >
> >>_CONNECT_IDENTIFIER DEFINE Variable
> >>
> >>There is a new DEFINE variable _CONNECT_IDENTIFIER, which contains the
SID
> >
> > as supplied by
> >
> >>the user to make a connection where it is available. This allows the
> >
> > connection
> >
> >>information to be accessed like any other DEFINE variable. For example,
it
> >
> > could be used
> >
> >>in TTITLE, in '&' substitution variables, or as your SQL*Plus
command-line
> >
> > prompt by using
> >
> >>the SET SQLPROMPT command. For example, to change your SQL*Plus prompt
to
> >
> > display your
> >
> >>username and SID, enter:
> >>
> >>SET SQLPROMPT '&_CONNECT_IDENTIFIER > '
> >>
> >>You can use the DEFINE command to view the _CONNECT_IDENTIFIER
definition
> >
> > in the same way
> >
> >>as you view other DEFINE definitions, using the DEFINE command with no
> >
> > arguments, or with
> >
> >>the specific argument you wish to display, for example:
> >>
> >>DEFINE
> >>
> >>or
> >>
> >>DEFINE _CONNECT_IDENTIFIER
> >>
> >>You can use UNDEFINE to remove the _CONNECT_IDENTIFIER definition and
make
> >
> > it unavailable.
> >
> >>
> >>In 10i, we're adding a little more to this. There will be define
variables
> >
> > for _DATE,
> >
> >>_PRIVILEGE, and _USER. So you will be able to do:
> >>
> >>SET SQLPROMPT '_USER'@'_CONNECT_IDENTIFIER > '
> >>
> >>Alison
> >>
> >>Peter van Rijn wrote:
> >>
> >>>Wouldn't it be nice if SQL*plus itself would offer the functionality of
> >>>customizing the SQL-prompt? Let's say with dynamically changed
> >>>USER/DBNAME/SID. A bit like the $PWD in PS1 on Unix.
> >>>
> >>>Christopher Jones listening in perhaps? Could this be done 'some day'?
> >>>
> >>>Peter
> >>
> >
> >
>
Received on Tue Jan 21 2003 - 02:01:46 CST

Original text of this message

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