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: sqlplus from a perl script is giving ORA-12545 error.

Re: sqlplus from a perl script is giving ORA-12545 error.

From: Anton Buijs <remove_aammbuijs_at_xs4all.nl>
Date: Tue, 20 May 2003 20:08:17 +0200
Message-ID: <3eca6f13$0$49106$e4fe514c@news.xs4all.nl>


Tim X <timx_at_spamto.devnul.com> schreef in berichtnieuws 873cjac6rk.fsf_at_tiger.rapttech.com.au...
| >>>>> "Anton" == Anton Buijs <remove_aammbuijs_at_xs4all.nl> writes:
|
|
| Anton> What you say is correct but if I may add something. sqlplus
| Anton> un/pw_at_db will connect to the database using sqlnet. You can
| Anton> omit the alias name (@db) when you set the variable
| Anton> $TWO_TASK=db. TWO_TASK prevails upon ORACLE_SID. ORACLE_SID
| Anton> can only connect you to a local database running in the same
| Anton> ORACLE_HOME only.
|
| Are you sure about that?
|
| I connect to remote databases daily using $ORACLE_SID from sqlplus - I
| even connect to both 7.3.4 and 8.1.7 databases. We don't use TWO_TASK
| anymore at all.
|
| Tim
| --
| Tim Cross
| The e-mail address on this message is FALSE (obviously!). My real e-mail
is
| to a company in Australia called rapttech and my login is tcross - if you
| really need to send mail, you should be able to work it out!

Yes, I'm sure. On Unix platform that is. Just tested every c/s combination of V8.1.7.3 and 9.2.0.3.
On Windows you set LOCAL as an environment variable or as a registry key (in the proper HOMEn).
On VMS you can set the logical ORA_DFLT_HOSTSTR. I wonder how you connect to a database on another host. I assume you use un/pw_at_alias? TWO_TASK is used as a default alias when you omit the "@alias" part, and when not set you connect to the *local* database ORACLE_SID. When that's not a running local database I get errors that the db is not available, even when it is an alias that can be found in tnsnames.ora.

So: what is the confusion here? Received on Tue May 20 2003 - 13:08:17 CDT

Original text of this message

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