DB link [message #66711] |
Sat, 16 November 2002 02:09 |
Agnello
Messages: 1 Registered: November 2002
|
Junior Member |
|
|
I hav the following configurtion.
there r two databases on the same servere named "dataone" and "datatwo"
my configuration setting for "dataone" is
global_names=true
db_domain=
db_name=dataone
the value in global_name is
dataone.IN.COM
my configuration setting for "datatwo" is
global_names=true
db_domain=
db_name=datatwo
the value in global_name is
datatwo.IN.COM
I am accsing this databases thru oracle client which has following TNSnames entry for the two dbs
dataone.IN.COM=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.IN.COM)
(PROTOCOL = TCP)
(Host = 140.17.4.5)
(Port = 1521)
)
(ADDRESS =
(COMMUNITY = tcp.IN.COM)
(PROTOCOL = TCP)
(Host = 140.17.4.5)
(Port = 1526)
)
)
(CONNECT_DATA = (SID = dataone
)
)
)
datatwo.IN.COM=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.IN.COM)
(PROTOCOL = TCP)
(Host = 140.17.4.5)
(Port = 1521)
)
(ADDRESS =
(COMMUNITY = tcp.IN.COM)
(PROTOCOL = TCP)
(Host = 140.17.4.5)
(Port = 1526)
)
)
(CONNECT_DATA = (SID = datatwo)
)
)
I have created a db link on "dataone" as follows
CREATE DATABASE LINK datatwo
CONNECT TO user IDENTIFIED BY pass
USING 'datatwo';
but when using the link in query like
select * from emp@datatwo
I get the following error
ORA-12154 TNS could not resolve service name
i hv tried setting global_names=false , but no success
Kindly help
Thnking in anticipation
|
|
|
|
Re: DB link [message #67612 is a reply to message #66711] |
Thu, 18 November 2004 10:23 |
shafi
Messages: 1 Registered: October 2004
|
Junior Member |
|
|
give service_name instead of sid in the connect_data of the connect string of tns.ora config. file ;try tns ping from local towards remote;lsnrctl stop and start;will work!
|
|
|