?
Solved

Database link to local machine

Posted on 2004-07-30
2
Medium Priority
?
1,131 Views
Last Modified: 2013-12-11
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
Comment
Question by:matejak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
BobMc earned 375 total points
ID: 11685352
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
 
LVL 8

Expert Comment

by:baonguyen1
ID: 11722719
matejak, sure you can. You can create any link to other dbs.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious sideā€¦
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question