开发者

OCCI - Connecting to a remote database

I'm fairly new to Oracle. I'm trying to connect to a remote Oracle database using OCCI. All the examples i've fou开发者_开发问答nd 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))
 )
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜