Re: SQL*Plus startup commands

  • From: Niall Litchfield <niall.litchfield@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 11 Aug 2004 11:42:33 +0100

On Wed, 11 Aug 2004 13:22:32 +0300, Thalis Kalfigopoulos
<t.kalfigopoulos@xxxxxxxxxx> wrote:
> Hi all,
> I'm extremely new to Oracle. Haven't seen novice questions here so far but 
> I'll take my chances.
> I read in http://www.orafaq.net/kb/link.php?id=271 about things that can be 
> placed in login.sql for SQL*Plus's startup.
> I try the sample code which is for 10g:
> set sqlprompt "&&_USER@&&_CONNECT_IDENTIFIER SQL>"
> 
> The _CONNECT_IDENTIFIER is correctly bound to the db I connect to, but I need 
> to supply the username each time I login,
> to build _USER. Isn't there a variable that holds the username I used as soon 
> as I successfully login, which I can use
> to build my sqlprompt?
> 
> I'm using Release 9.2.0.1.0

Hi

The behaviour of sqlplus with respect to these variables changed
between 9.2 and 10g.

There is a nice article at
http://www.jlcomp.demon.co.uk/faq/sqlplus_prompt.html explaining how
to do this for every currently supported version, and a couple that
aren't.

It was an excellent newbie question as well. you told us what you
wanted to do, the steps that you'd gone through to get there and your
version information. This is rare when asking technical questions.

Unless you have any old databases to connect to (like prior to 8174)
I'd suggest you consider getting the 10g client just for the
enhancements to sqlplus alone.


-- 
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: