Home » RDBMS Server » Networking and Gateways » Db link gives "Could not resolve service name" error
Db link gives "Could not resolve service name" error [message #182050] Wed, 12 July 2006 13:41 Go to next message
sujatha
Messages: 15
Registered: May 1999
Junior Member
I have two tables in two servers. I created a dblink in one of them to connect to the second server. I see the dblink. But When I say "select * from table_name@dblink" it gives "Could not resolve service name"

What is the problem? What am I doing wrong?

Please help and I am new to dblink.

Thanks,
Re: Db link gives "Could not resolve service name" error [message #182051 is a reply to message #182050] Wed, 12 July 2006 13:44 Go to previous messageGo to next message
aciolac
Messages: 242
Registered: February 2006
Senior Member
What resul are
SQL>select * from dual@dblink;
Re: Db link gives "Could not resolve service name" error [message #182053 is a reply to message #182050] Wed, 12 July 2006 13:56 Go to previous messageGo to next message
sujatha
Messages: 15
Registered: May 1999
Junior Member
It gives the same error "could not resolve service name". It is said in another forum that I need to configure the tnsnames.ora in the second database server. Meaning that the second database server should have a service name entry of the first database server. But I don't know how to do that. Most of all I don't have dba rights to the first server. Is there any way to do it even if I dont have rights
Re: Db link gives "Could not resolve service name" error [message #182054 is a reply to message #182053] Wed, 12 July 2006 14:00 Go to previous messageGo to next message
aciolac
Messages: 242
Registered: February 2006
Senior Member
If you have not right to some information, Oracle will not give you them - this is rule Smile. For creating correct dblink, see examples. It is not so hard, but for me need many time to write.
Re: Db link gives "Could not resolve service name" error [message #182057 is a reply to message #182050] Wed, 12 July 2006 14:12 Go to previous messageGo to next message
sujatha
Messages: 15
Registered: May 1999
Junior Member
examples from where?
Re: Db link gives "Could not resolve service name" error [message #182059 is a reply to message #182057] Wed, 12 July 2006 14:18 Go to previous messageGo to next message
aciolac
Messages: 242
Registered: February 2006
Senior Member
create public database link link1
connect to your_username
identified by "passwd"
using 'YOUR_SID'

command
>tnsping YOUR_SID
runned from machine, where placed database, where you create dblink, must return OK. If not, then edit your tnsmanes.ora for setting up YOUR_SID. The test for correct work of dblink is
SQL>select * from dual@dblink;
which must return result, not error.
icon6.gif  Re: Db link gives "Could not resolve service name" error [message #182121 is a reply to message #182057] Thu, 13 July 2006 03:19 Go to previous message
ullahsd
Messages: 2
Registered: June 2006
Location: Dhaka,Bangladesh
Junior Member
Laughing Hi friend it very simple example.
example for emp table.


select ename
from emp
where empno=7369;


output is

SMITH
Previous Topic: Firewall issue: TCP connection timeout while processing long query
Next Topic: How to connect SQL Server to a Oracle Database (linked server)
Goto Forum:
  


Current Time: Sun Apr 28 15:39:55 CDT 2024