Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Linked Server and remote TNSNAMES

Linked Server and remote TNSNAMES

From: Jay Hostetter <>
Date: Wed, 30 Jul 2003 07:59:39 -0800
Message-ID: <>

We have a SQL Server database that needs to link to an Oracle database. I have been able to successfully setup this "linked server" entry in SQL Server, but only when I am using a local TNSNAMES.ORA. We typically have all of our Win2000 machines point to a central TNSNAMES.ORA file that is on a file server using ifile (in the local tnsnames). For example:

< this works for SQL*Plus only>

Using the above "ifile" entry in the local TNSNAMES file, I am able to connect to databases from this box using SQL*Plus. However, my SQL Server "linked server" reports a "ORA-12154: TNS:could not resolve service name". If I change my ifile entry to use a local tnsnames file, I no longer get this error from SQL Server. For example:

< this works for SQL*Plus and SQL Server>

SQL Plus works for both scenarios. SQL Server works only for the second scenario. What has me stumped is that SQL*Plus works, but SQL Server does not. I think it might be some type of network rights issue, but I have not confirmed it. Does anybody use SQL Server to link to an Oracle database, using a TNSNAMES file that is remote?


This e-mail message and any files transmitted with it are intended for the use of the individual or entity to which they are addressed and may contain information that is privileged, proprietary and confidential. If you are not the intended recipient, you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received this communication in error, please notify the sender and delete this e-mail message. The contents do not represent the opinion of D&E except to the extent that it relates to their official business.

Please see the official ORACLE-L FAQ:
Author: Jay Hostetter

Fat City Network Services    -- 858-538-5051
San Diego, California        -- Mailing list and web hosting services
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Jul 30 2003 - 10:59:39 CDT

Original text of this message