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

Reply via email to