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

Error after creating DBLink

I have made a DBLink, inside the same database from one user to another, just to learn how to make DBLinks. The DBLink was created succesfully, but when I tried 'select sysdate from dual@link_name' I got the following error:

1.1.- create database link user1.remotedb connect to user1 identified 
by user1 using 'remotedb'
1.2.- select sysdate from dual@user1.remotedb
ERROR:ORA-02085 database link user1.remotedb connects to 
remotedb.world

The ORA-2085 error is telling you that the database link name, USER1.REMOTEDB in your case, must match the database name it is connecting to, REMOTEDB.WORLD. They do not, so an error is raised.

The first option is to create the database link with the same name as the database you are trying to connect to. You can get around this limitation if you set your GLOBAL_NAMES initialization parameter to FALSE. If GLOBAL_NAMES=FALSE, then your database link name can be anything. If you are using Advanced Replication, then you do not want to set GLOBAL_NAMES=FALSE, otherwise, feel free to change the parameter.

This was last published in November 2004

Dig Deeper on Oracle database design and architecture

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.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close