문제

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