MDB2 oci8 use SID in connect string
| From: | Tim Rupp | Date: | Sun, 23 Sep 2007 04:28:39 +0000 |
| Subject: | MDB2 oci8 use SID in connect string | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-27963@lists.php.net to get a copy of this message | ||
Hi list,
I've been having a heck of a time fiddling with this problem. I'm
using the MDB2 oci8 package to connect to our Oracle database.
In the connect method, it specifies a connect string with SERVICE_NAME
in it. With this in place,
oci8://user:password@server.site.com/service
the connection results in the error
"TNS:Listener does not currently know of service requested in
connect descriptor"
I had the same problem with ADODB a while back, and fixed it by
setting the connectSID variable to true. I looked at their code and
noticed that the MDB2 package did not include a similar check.
To make it work, I added another check to see if the option sid= was
set; something like this
oci8://user:password@server.site.com/?sid=service
This replaces the SERVICE_NAME= string with SID= and allows me to
connect to the oracle database.
So I have two questions really. One, what is the difference between
the SERVICE_NAME and SID values in that connect string, and two, I'd
like to contact the MDB2 maintainer to send them this patch I have in
the hopes that they will include it in the release.
Thanks in advance,
Tim