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,
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
>>SQL*Plus 9.2, we introduced a define variable that contains the SID
>>This variable can be used to set the prompt. Here's the blurb from the 9.2
>>_CONNECT_IDENTIFIER DEFINE Variable >> >>There is a new DEFINE variable _CONNECT_IDENTIFIER, which contains the SID
>>the user to make a connection where it is available. This allows the
>>information to be accessed like any other DEFINE variable. For example, it
>>in TTITLE, in '&' substitution variables, or as your SQL*Plus command-line
>>the SET SQLPROMPT command. For example, to change your SQL*Plus prompt to
>>username and SID, enter: >> >>SET SQLPROMPT '&_CONNECT_IDENTIFIER > ' >> >>You can use the DEFINE command to view the _CONNECT_IDENTIFIER definition
>>as you view other DEFINE definitions, using the DEFINE command with no
>>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
>> >>In 10i, we're adding a little more to this. There will be define variables
>>_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 >>
![]() |
![]() |