DBI connects to one oracle instance but cannot connect to others
- From: bartona@xxxxxxxx
- Date: Wed, 13 Jun 2007 08:15:33 -0700
We run Oracle 10g under Linux. There are seven database instances:
prod, tmp1,...,tmp6. The TNSNAMES.ORA file treats all seven instances
equally:
prod =
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(COMMUNITY = tcp.world)
(PROTOCOL=tcp)
(HOST=localhost)
(PORT=1521)
)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = prod)
)
)
..... identical segments for the tmp1 - tmp6 instances
I can sqlplus into any instance. I can run a local perl script to
connect to the production instance "prod". I can also run perl
scripts from a remote server to connect remotely to any of these
instances. But my perl script on localhost cannot connect to any of
the tmp instances tmp1...tmp6.
This script works:
use DBI;
$ENV{"ORACLE_HOME"} = "/u01/app/oracle/OraHome_1";
$ENV{"ORACLE_SID"} = "prod";
$odsn="DBI:Oracle:prod";
$ouid="xxxx";
$opwd="xxxx";
$odbh= DBI->connect ($odsn,$ouid,$opwd);
--- works perfectly BUT the identical for the tmp instances DOES NOT
WORK:
use DBI;
$ENV{"ORACLE_HOME"} = "/u01/app/oracle/OraHome_1";
$ENV{"ORACLE_SID"} = "tmp1";
$odsn="DBI:Oracle:tmp1";
$ouid="xxxx";
$opwd="xxxx";
$odbh= DBI->connect ($odsn,$ouid,$opwd);
I get the following error message: TNS:could not resolve the connect
identifier specified
What am I doing wrong????
Thank you for any hint.
Anke
.
- Follow-Ups:
- Re: DBI connects to one oracle instance but cannot connect to others
- From: John Scoles
- RE: DBI connects to one oracle instance but cannot connect to others
- From: Alan Kong
- Re: DBI connects to one oracle instance but cannot connect to others
- Prev by Date: DBD::Chart 3D bargraphs with temporal datatype as X
- Next by Date: Re: OS X 10.8.4 DBD::mysql build looking for libmysqlclient in wrong place?
- Previous by thread: DBD::Chart 3D bargraphs with temporal datatype as X
- Next by thread: RE: DBI connects to one oracle instance but cannot connect to others
- Index(es):
Relevant Pages
|