Q
Problem solve Get help with specific problems with your technologies, process and projects.

Making DB links and synonyms

I'm using Oracle 9i rel 2 and I have two databases. I want to know how to make DB links and also how to make synonyms and in which database it has to be done.

I'm using Oracle 9i rel 2 and I have two databases. I want to know how to make DB links and also how to make synonyms and in which database it has to be done.
The best place to see how database links are created is the Oracle documentation.

The above link describes database links, details when you would use them and shows you how to create and use them....

There are even example CREATE DATABASE LINK commands. Once you have created a database link, you can create a synonym for an object accessed through the link as follows:

CREATE SYNONYM remote_table FOR remote_table@link_name;
You can create database links in any Oracle database. So which database do you create the link in? The rule of thumb is to create the link in the database that your application will connect to. Assume that your application connects to the database ORCL. While connected to ORCL, the application can query its tables stored in ORCL without any problems. However, you may also want the application to query tables in database ORCL2. So in ORCL, you would create a database link which connects to ORCL2. This way, your application can issue queries to ORCL which are passed to ORCL2 through the database link.
This was last published in November 2006

Dig Deeper on Oracle DBA jobs, training and certification

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close