• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1137
  • Last Modified:

Database link to local machine

There are 2 databases, A and B on 2 machines in production.
We need to export/import these two databases on one single machine.
Production database A has a database link to B.
I would like to create the database link on test system in the database A so that it will point to database B on this same machine. I hope to avoid reports at importing by doing this and to make PL/SQL using the database link working on the test system.
Is possible to create a database link to the localhost database?
0
matejak
Asked:
matejak
1 Solution
 
BobMcCommented:
Theres no problem doing this - you can even point the database link back into the same instance if you so desire.
Your database link will have an alias specified that tells it where to connect to - this will be the bit specified in the USING clause of the CREATE DATABASE LINK command, or the HOST column in DBA_DB_LINKS view.

If you have sure you have this alias in your tnsnames.ora file (in the Oracle home that holds database A), that points to database B, it will be seamless.

You will need to build and import database B first if you wish to avoid errors at import time, so that the import of database A can verify any references to remote objects.

HTH
Bob
0
 
baonguyen1Commented:
matejak, sure you can. You can create any link to other dbs.
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now