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

有帮助吗?

解决方案

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))
 )
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top