PEAR::MDB connecting to remote Oracle-DB
| From: | Phillip Oertel | Date: | Wed, 06 Apr 2005 16:47:31 +0000 |
| Subject: | PEAR::MDB connecting to remote Oracle-DB | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18549@lists.php.net to get a copy of this message | ||
hi,
i'm trying to connect to a remote oracle database using the following dsn format:
$dsn = 'oci8://user:pass@10.0.1.50/DBNAME';
the connect fails.
'userinfo' gives me:
Connect: Could not connect to Oracle server [nativecode=ORA-12514: TNS:listener does not currently know of service requested in connect descriptor] ** oci8://user:pass@10.0.1.50/DBNAME'
a straight-forward "ocilogon('user', 'pass', '10.0.1.50/DBNAME')"
works.
is there anything i have to do differently to make it work with the abstraction?
looking at the MDB_oci8 code doing the connect, it seems that the DBNAME has been chopped away from the server-ip, and only the server-ip is being used for the ORACLE_SID. i think that is the difference in the two attempts.
thanks,
phillip