tags:

views:

728

answers:

2

Does anyone know the OCI connection string used for the dbname parameter in the function OCILogon() for the oracle 10g C API ?

I know you can specify the tnsnames.ora entry for the service, but does it have the ability to take something like: oci:connect:myserver.com:1521/myservicename ?

A: 

You may be able to specify dbname as follows (without tnsnames.ora):

(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)))

Ryan Emerle
fyi I was able to get it working. thanks again
Signal9
A: 

You may use the following format for dbname:

[//]host[:port][/service name]

You can read more on subject here: Database Connection Strings for OCI Instant Client

Nikolai