Re: SID on sqlplus prompt?

2001-06-11 Thread nlzanen1
Hi You have already seen many post with the answer to this, but if you use connect glogin.sql will not be run again. I created a very basic script with a very short name and put it in the directory where my SQL_PATH registry key points to. This script does the connect (after prompting for the

RE: SID on sqlplus prompt?

2001-06-11 Thread Burton, Laura L.
Title: RE: SID on sqlplus prompt? I use this as well but it only works going through Sqlplus. If you want to change connections while you are in sqlplus by entering sql Connect username@dbname, then the sid/username will not change on the sql prompt. To make the connection change show, add

RE: SID on sqlplus prompt?

2001-06-09 Thread MacGregor, Ian A.
If the db_name will do just as well you can use sys_context('USERENV', 'DB_NAME') to obtain the database name and not have to grant access to any of the v$ tables. There's also ora_database_name which is a function that takes no arguments and returns db_name.domain_name Both of these

RE: SID on sqlplus prompt?

2001-06-09 Thread Diana_Duncan
to: Sent by: Subject: RE: SID on sqlplus prompt? root@fatcity

Re: SID on sqlplus prompt?

2001-06-08 Thread Gene Sais
I use this: glogin.sql file found in $OH/sqlplus/admin on the db server. hth. gene -- -- $Header: /plus/v3/spam/precious/files/ACTIVE/glogin.sql,v 1.6 1995/07/25 02:33:26 cjones Exp $ -- Copyright (c) Oracle Corporation 1988, 1994, 1995. All Rights Reserved. -- -- SQL*Plus Global Login

Re: SID on sqlplus prompt?

2001-06-08 Thread Diana_Duncan
How about something like this? Of course, it requires that the user have select access to v$instance -- maybe there's another place to find this. You could do some sort of batch to reference the $ORACLE_SID instead, but the advantage of this is you can put it into glogin.sql or login.sql -- or