I have 2 databases on the same machine and they are called sid7 and sid8.
The service names for them are
louise_company and louise_news.
Now I am trying to connect a database link in the company database(sid7) which will point to the news_owner user in the sid8 database.
This is the command I am giving to create the link
SQL> CREATE PUBLIC DATABASE LINK "NEWS_DBLINK" CONNECT TO
2 "NEWS_OWNER" IDENTIFIED BY "sid8" USING 'LOUISE_NEWS' ;
Database link created.
BUT WHEN i TRY TO USE THE DATABASE LINK IT GIVES ME THE FOLOWING ERROR
SQL> select * from company@NEWS_DBLINK
select * from company@NEWS_DBLINK
ERROR at line 1:
ORA-02085: database link NEWS_DBLINK.HEROLD.COM connects to SID8.WORLD
The error message indicates that
ORA-02085 database link name connects to name
Cause The database link attempted to connect to a database with a different name. The name of the database link must be the same name as the name of the database.
Action Create a database link with the same name as the database to which it connects.
Why should I be forced to give the link name same as the database name.
Infact I even tried that but stil it doesnt work. Please Help
Appreciation is a wonderful thing;
It makes what is excellent in others belong to us as well.