Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: getting global_name at SQL*Plus prompt
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)
![]() |
![]() |