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

Dblink explanation

I want to know the significance of the dblink and an explanation of its syntax.

First of all, I want to know the significance of the dblink and an explanation of its syntax, since I have problems...

understanding the exact flow on this concept.

Further I am facing the following issue: When a user is trying to insert values from a source db to a destination db, he is getting the following error:

ERROR at line 1:
ORA-01031: insufficient privileges
ORA-02063: preceding line from XXXX.XXX.COM

The user is using a synonym to insert the remote table.

The database link lets you connect to a remote database from inside your local database. This lets you query the remote database without disconnnecting your current session. The syntax to create the database link is as follows:
CREATE DATABASE LINK link_name CONNECT TO 
username IDENTIFIED BY password USING 'tns_alias';
The tns_alias points to the remote database. You will sign on to the remote database with the username and password you defined when you created the database link. To insert into the remote database, use the following format:
INSERT INTO table_name@link_name VALUES ...;
If you are getting the ORA-1031 error with this operation, then the username specified when you created the database link does not have appropriate permissions to insert data into the table.
This was last published in July 2006

Dig Deeper on Oracle database design and architecture

PRO+

Content

Find more PRO+ content and other member only offers, here.

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

SearchFinancialApplications

Close