Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
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)
Peter,
I'm glad you're happy with the little things we add to SQL*Plus. As Chris has mentioned in the past, we try to put the most useful new features into SQL*Plus, but we can't do them all. I'll post more teasers of new features as we get closer to the next release, so stay tuned. :)
Enjoy,
Alison
Peter van Rijn wrote:
> 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... >
> > another snippet. :) >
> > connect command. >
> really >
> use a >
> If I >>>>>This variable can be used to set the prompt. Here's the blurb from the
>>>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.
>>>
>>>
> 9.2 >>>>>There is a new DEFINE variable _CONNECT_IDENTIFIER, which contains the
>>>doc:
>>>
>>>
>>>>_CONNECT_IDENTIFIER DEFINE Variable
>>>>
> SID >>>>>information to be accessed like any other DEFINE variable. For example,
>>>as supplied by
>>>
>>>
>>>>the user to make a connection where it is available. This allows the
>>>
>>>connection
>>>
>>>
> it >>>>>in TTITLE, in '&' substitution variables, or as your SQL*Plus
>>>could be used
>>>
>>>
> command-line >>>>>the SET SQLPROMPT command. For example, to change your SQL*Plus prompt
>>>prompt by using
>>>
>>>
> to >>>>>You can use the DEFINE command to view the _CONNECT_IDENTIFIER
>>>display your
>>>
>>>
>>>>username and SID, enter:
>>>>
>>>>SET SQLPROMPT '&_CONNECT_IDENTIFIER > '
>>>>
> definition >>>>>You can use UNDEFINE to remove the _CONNECT_IDENTIFIER definition and
>>>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
>>>>
> make >>>>>In 10i, we're adding a little more to this. There will be define
>>>it unavailable.
>>>
>>>
> 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
![]() |
![]() |