TWO_TASK environment variable



reading man DBD::Oracle gives an in depth explanation on how the TWO_TASK
environment variable can be used. however, when i tried to use it in place
of .tnsnames.ora nothing worked. i believe that sql*plus does not use
TWO_TASK.

-----
[~] cat .tnsnames.ora
infra=(description=(address=(protocol=tcp)(host=infradb.fs.usda.gov)
(port=1521))(connect_data=(sid=iwebdb)))
[~] sqlplus 'fs_public/fs_public@infra'

SQL*Plus: Release 10.2.0.3.0 - Production on Wed Apr 11 10:36:04 2007

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 -
64bit Production
With the Partitioning, OLAP and Data Mining options
[~] printenv | grep TWO
TWO_TASK=T:infradb.fs.usda.gov:iwebdb
[~] sqlplus 'fs_public/fs_public'

SQL*Plus: Release 10.2.0.3.0 - Production on Wed Apr 11 10:35:35 2007

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

-----


in addition, it appears sql*plus doesn't even allow one to specify the
connection parameters on the command line.

-----
[~] sqlplus 'fs_public/fs_public@host=infradb.fs.usda.gov/sid=iwebdb'

SQL*Plus: Release 10.2.0.3.0 - Production on Wed Apr 11 10:35:43 2007

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

-----

unless i'm missing something here, it seems sql*plus must use
the .tnsnames.ora file.

tom



--
turn off the computer and go outside. i hear the special 3d effects are
stunning. --anonymous
.



Relevant Pages

  • RE: TWO_TASK environment variable
    ... Copyright 1982, 2006, Oracle. ... ORA-12154: TNS:could not resolve the connect identifier specified ... Enter user-name: ... unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus ...
    (perl.dbi.users)
  • Re: Dimension processing TNS Names do Not Resolve
    ... Great suggestion by Christophe - helped me with a completely different issue! ... I believe the issue had to do with the location of my TNS ... Oracle 9.1 ... TNS:could not resolve service name ...
    (microsoft.public.sqlserver.olap)
  • Re: Dimension processing TNS Names do Not Resolve
    ... I believe the issue had to do with the location of my TNS ... Oracle 9.1 ... TNS:could not resolve service name ... DSV does show the table underneath on the Oracle server, ...
    (microsoft.public.sqlserver.olap)
  • Re: Oracle needs to be restarted to accept new connections
    ... How do you resolve your databases? ... If with Oracle names then take a look ... > long time to open a connection. ...
    (comp.databases.oracle.server)
  • Re: TWO_TASK environment variable
    ... with you about hidden files -- i don't like them. ... Enter user-name: ... unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus ...
    (perl.dbi.users)