Thursday, December 8, 2011

How to: creating Private Database Link to database on remote server (Oracle DB)

If you was somewhat confused about the problems with the 'ad hoc' data link to a remote database, I propose tested solution. Sometimes you can't edit TNSNAMES and you need directly put the TNSNAME entry information directly in the database link connection string. There is my example:


CREATE DATABASE LINK my_link
CONNECT TO my_schema_user IDENTIFIED BY my_password
USING '(DESCRIPTION =(ADDRESS = (PROTOCOL=TCP)(Host=my_host_ip)(Port=1521))(CONNECT_DATA=(SERVICE_NAME=my_service_name)))';

No comments:

Post a Comment