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

Home -> Community -> Usenet -> c.d.o.server -> Re: getting global_name at SQL*Plus prompt

Re: getting global_name at SQL*Plus prompt

From: Jurij Modic <jmodic_at_src.si>
Date: Wed, 21 Oct 1998 22:06:46 GMT
Message-ID: <362e4bbe.6247618@news.siol.net>


On Wed, 21 Oct 1998 06:37:32 -0400, Doug Cowles <dcowles_at_us.ibm.com> wrote:

>I'm interested in getting the instance and schema name
>to appear an a SQL*Plus prompt. I've received a number
>of methods to do this, all which work upon the first login,
>which uses the login.sql script. Problem is...
>if I reconnect from SQL*Plus like
>conn scott/tiger_at_somewhereelse
>the prompt will maintain the old information.
>Does anyone know a way around this?
>Thanks in advance,

Simply write your own "reconnect script" which wil also invoke the login.sql/glogin.sql . Example:

Then in your sqlplus session, instead of calling the connect command to reconnect, simply call your "my_connect.sql" script, which in turn will call the login.sql, which inturn will set your sql prompt. Example of my_connect.sql usage in the sql*plus session:

DB1.SYSTEM> @my_connect scott/tiger_at_db2 Connected.
DB2.SCOTT>
>Doug Cowles.

HTH,
Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)



The above opinions are mine and do not represent any official standpoints of my employer Received on Wed Oct 21 1998 - 17:06:46 CDT

Original text of this message

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