Question

I'm fairly new to Oracle. I'm trying to connect to a remote Oracle database using OCCI. All the examples i've found up this point have been for connecting to a local database. Could someone please point me in the right direction and let me know where i can find an example connection to get me past this point? Thanks, Mike

Was it helpful?

Solution

createConnection( "name", "passwrd", "string")

"string" stands either for the connection name that is resolved with the Oracle "tnsnames.ora" file which should be located in your ORACLE_HOME(Oracle install dir)\NETWORK\ADMIN directory or for a connection string like below

Code:
connection_name =
  (DESCRIPTION =
       (ADDRESS=(PROTOCOL = TCP)(HOST = ip_address)(PORT = listener_port))
       (CONNECT_DATA= (SERVICE_NAME = listener_service_name)
       (SERVER = DEDICATED))
 )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top