Home » RDBMS Server » Networking and Gateways » DB link
DB link [message #66711] Sat, 16 November 2002 02:09 Go to next message
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 #66715 is a reply to message #66711] Mon, 18 November 2002 07:03 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
as per your posting, your service name appears to be
datatwo.IN.COM.
but you are using only "datatwo".
so,
first check the validity of the serviceName by connecting through sqlplus or using TNSPING

Re: DB link [message #67612 is a reply to message #66711] Thu, 18 November 2004 10:23 Go to previous message
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!
Previous Topic: Oracle Internet Directory 10g (9.0.4)
Next Topic: TNS: Could resolve service name
Goto Forum:
  


Current Time: Wed May 01 19:17:26 CDT 2024