Create Database Link [message #57413] |
Fri, 13 June 2003 03:20 |
Nikhil Patel
Messages: 4 Registered: November 2001
|
Junior Member |
|
|
Connecting from other database. set at another place.
SQL> create database link test
2 connect to scott identified by tiger using 'eeil'
3 ;
Database link created.
SQL> select * from receipt@test;
select * from receipt@test
*
ERROR at line 1:
ORA-12154: TNS:could not resolve service name
|
|
|
Re: Create Database Link [message #57414 is a reply to message #57413] |
Fri, 13 June 2003 04:42 |
Chandru
Messages: 12 Registered: July 2000
|
Junior Member |
|
|
Nikhil,
Check the global_names parameter value in your init.ora file. It is probably set to TRUE. If so then the problem is with the name you gave for the link. If this is the case then you will have to create the dblink with the same name as the Target DB.
Solution:
1. Set this Parameter to FALSE. now you can use any name for your dblink.
OR
2. If you don't want to or can't change the parameter in the Init.ora file, then name the DBLink the same as your target DB. If you are identifying you DB by domain(ex: PROD1.MyCo.US.COM ), Then your dblink name should include the domain name also.
HTH
Chandru
|
|
|
Re: Create Database Link [message #57429 is a reply to message #57413] |
Mon, 16 June 2003 01:17 |
Jürgen Lange
Messages: 2 Registered: June 2003
|
Junior Member |
|
|
Do you have an entry "test" in your tnsnames.ora on the database-server ? If "test" is only an entry in your local tnsnames.ora on your client, then the database-link can't work !
|
|
|