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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL*Plus startup commands

Re: SQL*Plus startup commands

From: Niall Litchfield <niall.litchfield_at_gmail.com>
Date: Wed, 11 Aug 2004 11:42:33 +0100
Message-ID: <7765c897040811034237ae3c6d@mail.gmail.com>


On Wed, 11 Aug 2004 13:22:32 +0300, Thalis Kalfigopoulos <t.kalfigopoulos_at_alumil.com> 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_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed Aug 11 2004 - 05:38:13 CDT

Original text of this message

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