TWO_TASK environment variable
TWO_TASK environment variable
am 11.04.2007 19:06:51 von mailbin
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.u sda.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
RE: TWO_TASK environment variable
am 11.04.2007 19:52:36 von Ron.Reidy
Well, this is not a Perl/DBI question, really. I personnaly do not use
TWO_TASK as it is an archaic environment variable that has been around
since version 4 of the DB.
If you are interested in using the Easy Connect method, you should read
the Oracle docs:
http://download-east.oracle.com/docs/cd/B19306_01/network.10 2/b14212/nam
ing.htm#i498306
Pay close attention to the section on setting up NAMES.DIRECTORY_PATH in
your sqlnet.ora file. When set up properly, it works for me, using
version 10.2.0.2 and 10.2.0.3.
Also, I would strongly advise against using .*.ora file (hidden files).
In my opinion, this is a really bad habit to get into and could lead to
a lot of confusion and frustration trying to debug SQL*Net issues.
--
Ron Reidy
Lead DBA
Array BioPharma, Inc.
-----Original Message-----
From: tom r [mailto:mailbin@comcast.net]=20
Sent: Wednesday, April 11, 2007 11:07 AM
To: dbi-users@perl.org
Subject: 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=3D(description=3D(address=3D(protocol=3Dtcp)(host=3Din fradb.fs.usda=
..gov)
(port=3D1521))(connect_data=3D(sid=3Diwebdb)))
[~] 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=3DT: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=3Dinfradb.fs.usda.gov/sid=3Diwebdb '
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
This electronic message transmission is a PRIVATE communication which =
contains
information which may be confidential or privileged. The information is =
intended=20
to be for the use of the individual or entity named above. If you are =
not the=20
intended recipient, please be aware that any disclosure, copying, =
distribution=20
or use of the contents of this information is prohibited. Please notify =
the
sender of the delivery error by replying to this message, or notify us =
by
telephone (877-633-2436, ext. 0), and then delete it from your system.
Re: TWO_TASK environment variable
am 11.04.2007 20:36:37 von mailbin
hi ron,
thanks for the response. using sqlnet.ora just doesn't work for me. i agree
with you about hidden files -- i don't like them. that's why i'd like to
find a better way. here's what happens using sqlnet.ora:
-----
[~] cat sqlnet.ora
NAMES.DIRECTORY_PATH=(ezconnect, tnsnames)
[~] sqlplus 'fs_public/fs_public@infradb.fs.usda.gov/iwebdb'
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Apr 11 12:30:48 2007
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in
connect
descriptor
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[~] cat tnsnames.ora
infra=(description=(address=(protocol=tcp)(host=infradb.fs.u sda.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 12:31:13 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-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
-----
but if i create a .tnsnames.ora file, i can use
sqlplus 'fs_public/fs_public@infra'
and it works just fine.
did i make a mistake somewhere?
thanks,
tom
--
a celebrity is a person who works hard all his life to become well known, then
wears dark glasses to avoid being recognized. --fred allen
RE: TWO_TASK environment variable
am 11.04.2007 20:55:26 von Ron.Reidy
Why do you put your connect info in single quotes?
Here is my stuff.
First, sqlnet.ora:
$ cat sqlnet.ora
DISABLE_OOB =3D ON
NAMES.DEFAULT_DOMAIN =3D xx.com
#TRACE_LEVEL_CLIENT =3D on
#trace_level_client=3D16
#trace_file_client=3Dclient
#trace_directory_client=3D/tmp
#trace_level_client=3Dadmin
#trace_file_client=3Dron
SQLNET.EXPIRE_TIME =3D 0
#NAMES.DIRECTORY_PATH=3D (TNSNAMES)
NAMES.DIRECTORY_PATH=3D (LDAP, TNSNAMES, ezconnect)
AUTOMATIC_IPC =3D OFF
Next, output from tnsping:
$ tnsping yy
TNS Ping Utility for 32-bit Windows: Version 10.2.0.3.0 - Production on
11-APR-2007 12:47:05
Copyright (c) 1997, 2006, Oracle. All rights reserved.
Used parameter files:
C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
Used LDAP adapter to resolve the alias
Attempting to contact
(DESCRIPTION=3D(ADDRESS_LIST=3D(ADDRESS=3D(PROTOCOL=3DTCP)(H OST=3Daaa.xxx=
yyy.com)(
PORT=3D999)))(CONNECT_DATA=3D(SERVER=3DDEDICATED)(SERVICE_NA ME=3Dyy.xx.co=
m)(INST
ANCE_NAME=3Dyy)(GLOBAL_NAME=3Dyy.xx.com)))
OK (0 msec)=20
Last, my connection (using EZ Connect) to the DB via SQL*Plus:
$ sqlplus uid/pwd@aaa.xxxyyy.com:9999/yy.xx.com
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Apr 11 12:45:22 2007
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
SQL>
I think your problem is that you are not spcifying a service name in
your connection (your tnsnames.ora file does not show this - only a
sid). In my connection, I am using the GLOBAL_NAME as shown from my
tnsping. When I used the "sid" type of argument (INSTANCE_NAME in my
tnsping output), sqlplus gave me the TNS-12154 error. So, I think you
should use the GLOBAL_NAME as defined by the init parameters db_name and
domain_name.
rr
-----Original Message-----
From: tom r [mailto:mailbin@comcast.net]=20
Sent: Wednesday, April 11, 2007 12:37 PM
To: Reidy, Ron; dbi-users@perl.org
Subject: Re: TWO_TASK environment variable
hi ron,
thanks for the response. using sqlnet.ora just doesn't work for me. i
agree with you about hidden files -- i don't like them. that's why i'd
like to=20
find a better way. here's what happens using sqlnet.ora:
-----
[~] cat sqlnet.ora
NAMES.DIRECTORY_PATH=3D(ezconnect, tnsnames) [~] sqlplus
'fs_public/fs_public@infradb.fs.usda.gov/iwebdb'
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Apr 11 12:30:48 2007
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in
connect descriptor
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[~] cat tnsnames.ora
infra=3D(description=3D(address=3D(protocol=3Dtcp)(host=3Din fradb.fs.usda=
..gov)
(port=3D1521))(connect_data=3D(sid=3Diwebdb)))
[~] sqlplus 'fs_public/fs_public@infra'
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Apr 11 12:31:13 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-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
-----
but if i create a .tnsnames.ora file, i can use=20
sqlplus 'fs_public/fs_public@infra'
and it works just fine.
did i make a mistake somewhere?
thanks,
tom
--=20
a celebrity is a person who works hard all his life to become well
known, then=20
wears dark glasses to avoid being recognized. --fred allen
This electronic message transmission is a PRIVATE communication which =
contains
information which may be confidential or privileged. The information is =
intended=20
to be for the use of the individual or entity named above. If you are =
not the=20
intended recipient, please be aware that any disclosure, copying, =
distribution=20
or use of the contents of this information is prohibited. Please notify =
the
sender of the delivery error by replying to this message, or notify us =
by
telephone (877-633-2436, ext. 0), and then delete it from your system.
Re: TWO_TASK environment variable
am 12.04.2007 06:47:42 von mailbin
strings inside single quotes are evaluated by the shell. they're just passed
straight to the program.
i suspect the problem may be as you suggested: i'm using the old version 8
style sid instead of a service name, although ezconnect with the sid works
fine inside of a perl program. i'll see if i can come up with a version 10
style service name.
thanks,
tom
--
i'm jealous of the life i'm supposedly living. --j.d. (scrubs)
Re: TWO_TASK environment variable
am 06.09.2007 11:47:49 von martin
I was playing with TWO_TASK myself this morning and like Tom, I cannot
make the advice in DBD::Oracle work with Instant Client 10.2.0.3. I
wonder if the description of TWO_TASK is correct or perhaps out of date
wrt to newer Oracle versions. See below:
tom r wrote:
> 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.u sda.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
Try as I might, I cannot make T:*** work either. What does work for me is:
TWO_TASK=//xxx.easysoft.local:1521/ORACLE_SID
but none of:
TWO_TASK=T:xxx.easysoft.local:1521:ORACLE_SID
TWO_TASK=T:xxx.easysoft.local:ORACLE_SID
TWO_TASK=T:xxx.easysoft.local/ORACLE_SID
so for a totally empty DBI->connect call (and using instant client) I
have the following working:
DBI_DSN=dbi:Oracle:
DBI_USER=xxx
DBI_PASS=yyy
LD_LIBRARY_PATH=/home/martin/instantclient_10_2
TWO_TASK=//xxx.easysoft.local:1521/ORACLE_SID
perl -e 'use DBI; $h = DBI->connect();'
> [~] sqlplus 'fs_public/fs_public'
>
>
> in addition, it appears sql*plus doesn't even allow one to specify the
> connection parameters on the command line.
That is also what I found which makes me think the syntax suggested by
DBD::Oracle POD for TWO_TASK may no longer be applicable for Oracle 10.
> -----
> [~] sqlplus 'fs_public/fs_public@host=infradb.fs.usda.gov/sid=iwebdb'
For me what works using your values would be:
sqlplus 'fs_public/fs_public@//infradb.fs.usda.gov/iwebdb'
> -----
>
> unless i'm missing something here, it seems sql*plus must use
> the .tnsnames.ora file.
No, I don't have a tnsnames.ora file but I don't use the syntax
mentioned in DBD::Oracle.
From what I can find on the net, it may be that the syntax "T:", "P:"
(in fact a letter followed by a colon) at the start of the connect
string tells SQL*Net to use V1 and since Oracle 7.3, SQL*Net V1 is no
longer supported.
This is not the first time someone has failed to use TWO_TASK following
the directions in DBD::Oracle. Although I cannot be sure of the SQL*Net
V1/V2 changes in syntax I can say that the syntax I show above does work
with sqlplus and DBD::Oracle since Oracle 10. I suggest the DBD::Oracle
POD is changed and I am happy to provide a patch against svn tree.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
Re: TWO_TASK environment variable
am 06.09.2007 12:50:23 von scoles
isn't TWO_TASK only used when you have SQL*NET installed??
I do not think Instant-client installs that??
I will get onto one of my Oracle DBA types later to day and ask that. Might
have to change the POD a bit to reflect that
----- Original Message -----
From: "Martin J. Evans"
To:
Cc: "tom r"
Sent: Thursday, September 06, 2007 5:47 AM
Subject: Re: TWO_TASK environment variable
>I was playing with TWO_TASK myself this morning and like Tom, I cannot make
>the advice in DBD::Oracle work with Instant Client 10.2.0.3. I wonder if
>the description of TWO_TASK is correct or perhaps out of date wrt to newer
>Oracle versions. See below:
>
> tom r wrote:
>> 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.u sda.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
>
> Try as I might, I cannot make T:*** work either. What does work for me is:
>
> TWO_TASK=//xxx.easysoft.local:1521/ORACLE_SID
>
> but none of:
>
> TWO_TASK=T:xxx.easysoft.local:1521:ORACLE_SID
> TWO_TASK=T:xxx.easysoft.local:ORACLE_SID
> TWO_TASK=T:xxx.easysoft.local/ORACLE_SID
>
> so for a totally empty DBI->connect call (and using instant client) I have
> the following working:
>
> DBI_DSN=dbi:Oracle:
> DBI_USER=xxx
> DBI_PASS=yyy
> LD_LIBRARY_PATH=/home/martin/instantclient_10_2
> TWO_TASK=//xxx.easysoft.local:1521/ORACLE_SID
>
> perl -e 'use DBI; $h = DBI->connect();'
>
>> [~] sqlplus 'fs_public/fs_public'
>>
>
>
>
>>
>> in addition, it appears sql*plus doesn't even allow one to specify the
>> connection parameters on the command line.
>
> That is also what I found which makes me think the syntax suggested by
> DBD::Oracle POD for TWO_TASK may no longer be applicable for Oracle 10.
>
>> -----
>> [~] sqlplus 'fs_public/fs_public@host=infradb.fs.usda.gov/sid=iwebdb'
>
> For me what works using your values would be:
>
> sqlplus 'fs_public/fs_public@//infradb.fs.usda.gov/iwebdb'
>
>
>
>> -----
>>
>> unless i'm missing something here, it seems sql*plus must use the
>> .tnsnames.ora file.
>
> No, I don't have a tnsnames.ora file but I don't use the syntax mentioned
> in DBD::Oracle.
>
> From what I can find on the net, it may be that the syntax "T:", "P:" (in
> fact a letter followed by a colon) at the start of the connect string
> tells SQL*Net to use V1 and since Oracle 7.3, SQL*Net V1 is no longer
> supported.
>
> This is not the first time someone has failed to use TWO_TASK following
> the directions in DBD::Oracle. Although I cannot be sure of the SQL*Net
> V1/V2 changes in syntax I can say that the syntax I show above does work
> with sqlplus and DBD::Oracle since Oracle 10. I suggest the DBD::Oracle
> POD is changed and I am happy to provide a patch against svn tree.
>
> Martin
> --
> Martin J. Evans
> Easysoft Limited
> http://www.easysoft.com
>
Re: TWO_TASK environment variable
am 06.09.2007 14:18:02 von Martin.Evans
John Scoles wrote:
> isn't TWO_TASK only used when you have SQL*NET installed??
Yes.
> I do not think Instant-client installs that??
$ strings libclntsh.so | grep sqlnet.ora
Getting the path of sqlnet.ora
Failure in reading sqlnet.ora parameter %s
so I think it is in libclntsh.so.
AFAIK, I need SQL*Net to be able to communicate with a remote Oracle
database. I am communicating with a remote Oracle database and I only
have instant client installed.
> I will get onto one of my Oracle DBA types later to day and ask that.
> Might
> have to change the POD a bit to reflect that
Yes, that was my point. As it stands the instructions for using TWO_TASK
in the pod don't appear to work with Oracle 10 (either instant client or
full client).
.... and whilst I'm posting here I noticed the README says:
Build, test and install the DBI module (at least DBI 1.21).
but Makefile.PL says:
use DBI 1.28
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
> ----- Original Message ----- From: "Martin J. Evans"
> To:
> Cc: "tom r"
> Sent: Thursday, September 06, 2007 5:47 AM
> Subject: Re: TWO_TASK environment variable
>
>
>> I was playing with TWO_TASK myself this morning and like Tom, I cannot
>> make
>> the advice in DBD::Oracle work with Instant Client 10.2.0.3. I wonder if
>> the description of TWO_TASK is correct or perhaps out of date wrt to
>> newer
>> Oracle versions. See below:
>>
>> tom r wrote:
>>> 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.u sda.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
>>
>> Try as I might, I cannot make T:*** work either. What does work for me
>> is:
>>
>> TWO_TASK=//xxx.easysoft.local:1521/ORACLE_SID
>>
>> but none of:
>>
>> TWO_TASK=T:xxx.easysoft.local:1521:ORACLE_SID
>> TWO_TASK=T:xxx.easysoft.local:ORACLE_SID
>> TWO_TASK=T:xxx.easysoft.local/ORACLE_SID
>>
>> so for a totally empty DBI->connect call (and using instant client) I
>> have
>> the following working:
>>
>> DBI_DSN=dbi:Oracle:
>> DBI_USER=xxx
>> DBI_PASS=yyy
>> LD_LIBRARY_PATH=/home/martin/instantclient_10_2
>> TWO_TASK=//xxx.easysoft.local:1521/ORACLE_SID
>>
>> perl -e 'use DBI; $h = DBI->connect();'
>>
>>> [~] sqlplus 'fs_public/fs_public'
>>>
>>
>>
>>
>>>
>>> in addition, it appears sql*plus doesn't even allow one to specify the
>>> connection parameters on the command line.
>>
>> That is also what I found which makes me think the syntax suggested by
>> DBD::Oracle POD for TWO_TASK may no longer be applicable for Oracle 10.
>>
>>> -----
>>> [~] sqlplus 'fs_public/fs_public@host=infradb.fs.usda.gov/sid=iwebdb'
>>
>> For me what works using your values would be:
>>
>> sqlplus 'fs_public/fs_public@//infradb.fs.usda.gov/iwebdb'
>>
>>
>>
>>> -----
>>>
>>> unless i'm missing something here, it seems sql*plus must use the
>>> .tnsnames.ora file.
>>
>> No, I don't have a tnsnames.ora file but I don't use the syntax mentioned
>> in DBD::Oracle.
>>
>> From what I can find on the net, it may be that the syntax "T:", "P:" (in
>> fact a letter followed by a colon) at the start of the connect string
>> tells SQL*Net to use V1 and since Oracle 7.3, SQL*Net V1 is no longer
>> supported.
>>
>> This is not the first time someone has failed to use TWO_TASK following
>> the directions in DBD::Oracle. Although I cannot be sure of the SQL*Net
>> V1/V2 changes in syntax I can say that the syntax I show above does work
>> with sqlplus and DBD::Oracle since Oracle 10. I suggest the DBD::Oracle
>> POD is changed and I am happy to provide a patch against svn tree.
>>
>> Martin
>> --
>> Martin J. Evans
>> Easysoft Limited
>> http://www.easysoft.com
>>
>
>
Re: TWO_TASK environment variable
am 11.09.2007 19:38:07 von jkstill
------=_Part_9994_24771480.1189532287696
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On 4/11/07, tom r wrote:
>
> i believe that sql*plus does not use
> TWO_TASK.
>
>
Sqlplus does use TWO_TASK.
10:31-ordevdb01:dv11:jkstill-18 > oenv
ORACLE_SID : dv1
TWO_TASK :
ORACLE_HOME : /u01/app/oracle/product/10.2.0/10gr2dev
IAS_ORACLE_HOME :
ORACLE_BASE : /u01/app/oracle
NLS_LANG :
ORA_NLS33 :
LD_ASSUME_KERNEL :
LD_LIBRARY_PATH :
/usr/dt/lib:/usr/lib:/usr/lib/X11:/u01/app/oracle/product/10 .2.0/10gr2dev/lib:/u01/app/oracle/product/10.2.0/10gr2dev/ct x/lib
[ /home/jkstill ]
> sqlplus scott/tiger
SQL*Plus: Release 10.2.0.3.0 - Production on Tue Sep 11 10:31:42 2007
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, Oracle Label Security and Data Mining options
------------------------------
DV1
scott@dv1 SQL>
Disconnected from Oracle Database 10g Enterprise Edition Release
10.2.0.3.0- Production
With the Partitioning, Oracle Label Security and Data Mining options
> export TWO_TASK=dv2
[ /home/jkstill ]
10:31-ordevdb01:dv11:jkstill-18 > sqlplus scott/tiger
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production
Data Base
------------------------------
DV2
scott@dv12 SQL>
--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
------=_Part_9994_24771480.1189532287696--