Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem connecting DataBase Link from windows oracle to oracle on Linux

1008748May 14 2013 — edited May 15 2013
I'm facing a problem with database links from windows oracle to Oracle hosted on Linux server.

I'm able to successfully create the Database Link using the following query on oracle database hosted on a windows server


CREATE DATABASE LINK SampleDB
CONNECT TO myuser IDENTIFIED BY password
USING 'sample';

The tns names entry on windows for database in Linux server is as follows

DSOFT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = sample)
)
)

But while executing the query "select count(*) from doctor@SampleDB;" in sql developer on windows, I'm getting the following error

SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
12154. 00000 - "TNS:could not resolve the connect identifier specified"

*Cause: A connection to a database or other service was requested using
a connect identifier, and the connect identifier specified could not
be resolved into a connect descriptor using one of the naming methods
configured. For example, if the type of connect identifier used was a
net service name then the net service name could not be found in a
naming method repository, or the repository could not be
located or reached.

Using the above tns entries, i'm successfully able to connect to the database in Linux server through sql developer installed on the windows machine. Then why i'm getting this error while executing the query on Database Link?. Can any one help me?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2013
Added on May 14 2013
6 comments
1,286 views