Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with database link
On Tue, 7 Sep 1999 16:06:29 -0500, "ahsanudm" <mdahsan_at_hotmail.com>
wrote:
>Version : Oracle 8.0.3 on Windows NT 4
>I am trying to create a private database link with the following statement
>CREATE DATABASE LINK abcd CONNECT TO 'username' IDENTIFIED BY 'password'
>USING 'abcd';
>
>I have a service name called 'abcd' too..but when I try to access a table
>through the database link I get a 12154 error ..i.e ORA-12154: TNS:could not
>resolve service name.
>
>However I am able to connect to this service from SQL PLUS directly.
Is your client (SQL*Plus) from the same ORACLE_HOME as your database server (and of course, on the same machine)? If not, check if the service "abcd" is defined in the tnsnames.ora of your *server*.
When you connect to the remote service with the database link, the target service is resolved from the tnsnames.ora on the server side, not on the client side.
HTH,
Jurij Modic <jmodic_at_src.si>
Certified Oracle DBA (7.3 & 8.0 OCP)
![]() |
![]() |