URGENT: ORA 12154 on use of DB-Link [message #58323] |
Thu, 14 August 2003 05:16 |
Xenofon Grigoriadis
Messages: 33 Registered: May 2002
|
Member |
|
|
Hi there,
I try to create a db-link between two Oracle9 DBs.
Creating them goes ok.
But then using testing like this,
select * from /table_name/@/db-link/;
I get the message ORA-12154 "The TNS-Service name could not be resolved" or so (translation).
What's the problem? The service name and the TNSNAMES.ORA are OK because I can connect on both DBs. Creating the link is also ok. Only using the link in SQL produces this error.
Does anybody have a hint? Do you need the TNSNAMES.ORA? I could publish it, if neccessary.
Thanks in advance,
Xenofon Grigoriadis
|
|
|
|
|
Re: URGENT: ORA 12154 on use of DB-Link [message #58326 is a reply to message #58325] |
Thu, 14 August 2003 07:47 |
Xenofon Grigoriadis
Messages: 33 Registered: May 2002
|
Member |
|
|
Thanks for the reply,
here is my create-statement:
CREATE DATABASE LINK /SID/.WORLD CONNECT TO /USER/ IDENTIFIED BY /PASSWD/ USING '/SID/'
Here is my client TNSNAMES.ORA:
/SID/xxx.de =
(DESCRIPTION =
(FAILOVER=ON)
(LOAD_BALANCE = ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = aaa.xxx.de)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME =/SID/)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
)
)
)
One thing I have never been quite sure of is, how Oracle handles those strings after the dot, like ".world". How can I be sure if I need that string, when using the link or when creating it? But still I think I tried all possible ways and still it did not work.
Thanks in advance,
Xenofon Grigoriadis
|
|
|
Re: URGENT: ORA 12154 on use of DB-Link [message #58328 is a reply to message #58326] |
Thu, 14 August 2003 08:37 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
as per your posting
[i] USING '/SID/' [/i]
are u usid sid or the connectstring?
you must use the connectstring not the sid
your statement should be somehting like
CREATE DATABASE LINK [b]dblinkname[/b]
CONNECT TO USER IDENTIFIED BY PASSWD
USING [b]'/SID/xxx.de' [/b]-- as appearing in tnsnames.ora
-- and this tnsnnames.ora should be in server, NOT in your client
|
|
|