I am facing problem where i am using database link. I am
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
create database link test_ln
connect to scott identified by tiger
ok its giving message
Database link created.
now i am making a query for remote database
select * from dept@test_ln;
ERROR at line 1:
ORA-12154: TNS:could not resolve service name
could i get help please?
This is a guess.
Probably you have set the tnsnames of the client machine. Trying setting the tnsnames present in the server.
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
In the source Server machine, in init.ora parameter file, change the parameter global_names=false.
This will definitely workout.
If it again gives the problem saying
"unable to connect destination.."
there might be pbms in tnsnames.ora
Click Here to Expand Forum to Full Width