I'm not a big fan of creating a db link in the tnsnames.ora file because during clones you need to start messing around with custom files. My preferred method is using a bit of SQL to create the db link.
Using the details from the tnsname.ora file of the target database:
Just remember you might want to not make it public and you may need to change user names and passwords to the target instance.
Using the details from the tnsname.ora file of the target database:
TEST=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=oradbtest.company.com)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=TEST)
(INSTANCE_NAME=TEST)
)
)
I can now create the database link as follows:create public database link TESTDBLINK connect to apps identified by apps using '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oradbtest.company.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=TEST)))';
Just remember you might want to not make it public and you may need to change user names and passwords to the target instance.
Comments
Post a Comment