Date: Sun, 24 Feb 2008 11:17:05 -0800 (PST)
On Feb 22, 11:16 pm, DA Morgan <damor..._at_psoug.org> wrote:
> nick wrote:
> > When you use the sql*plus connect command, how does sql*plus know
> > which instance to connect you to? Does this depend on the value of the
> > ORACLE_SID variable?
> Depends on what you specify as a connect string.
> If none then ORACLE_SID. Otherwise the mapping in your TNSNAMES.ORA.
> Daniel A. Morgan
> Oracle Ace Director & Instructor
> University of Washington
> damor..._at_x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Groupwww.psoug.org
Nick, if Daniel's comment on what you pass as a connect string is not clear to you then he is referring to passing the tnsnames.ora service name in the connect string as in "sqlplus bob_at_service".
You can also, at least on UNIX platforms, define an environment variable $TWO_TASK and if you issue "sqlplus bob" the service name that the value of TWO_TASK is set to will be used instead of the value of $ORACLE_SID so that effectivey you have entered: "sqlplus bob@ $TWO_TASK" HTH -- Mark D Powell -- Received on Sun Feb 24 2008 - 13:17:05 CST