I am facing problem where i am using database link. I am
giving detail.
We have two database server on different machines.
We have create two different strings for connection.
Say orcl1 for one server and orcl2 for second.
Individualy we connect both the server using above
string. But when we want to user Database Link its giving erros.
I am connected through orcl2 and
giving command
create database link test_ln
connect to scott identified by tiger
using "orcl1";
ok its giving message
Database link created.
now i am making a query for remote database
select * from dept@test_ln;
giving message
ERROR at line 1:
ORA-12154: TNS:could not resolve service name
Yo have to create the alias in each tnsnames.ora present at the sever network/admin directories
If u are creating database link from ORCL1 to ORCL2. then ,in ORCL1 server machine create a alias in tnsnames.ora to connect to ORCL2. test it by login to the ORCL1 server from the same machine (not from other client) and type SQL> connect scott/tiger@ORCL2. If this works fine then you are able to connect using database link
Bookmarks