This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,747 Users
  • 2,269,776 Discussions


OLEDB provider issue

newbiegal Member Posts: 396
edited May 21, 2013 6:12AM in Oracle Provider for OLE DB
Hi all,

I'm setting up linked server from sql server to oracle. I installed Oracle client on the server, configured ODBC to the Oracle database using OraOLEDB.Oracle provider. Created linked server on sql server, but getting the below error:


OLE DB provider "ORAOLEDB.ORACLE" for linked server "TestLink" returned message "ORA-12154: TNS:could not resolve the connect identifier specified".
Msg 7303, Level 16, State 1, Line 2
Cannot initialize the data source object of OLE DB provider "ORAOLEDB.ORACLE" for linked server "TestLink".

tnsping to the oracle database works from the server and the ODBC connection testlink to the oracle database is successful. I tried checking Allow inprocess in the provider option by right clicking linked server properties on the management studio also.. Nothing seemed to work..

Please help.. thanks


  • IlicAlex
    IlicAlex Member Posts: 4
    edited Nov 15, 2011 5:57AM
    TNS_ADMIN used in command prompt is somehow ignored (added comment afterwards: mapped drive used in TNS_ADMIN may not be accessable, use UNC path in TNS_ADMIN instead).
    Create TNSNAMES entry through Oracle Net Configuration Assistant.

    Test Connection on Linked server must work before any SELECT can work.

    To use insert from linked server data change provider options:
    Allow inprocess = checked

    Restart SQL server windows service and try again.

    Best regards,

    Edited by: user4580124 on Dec 15, 2010 1:40 PM

    Edited by: user4580124 on Nov 15, 2011 2:56 AM
  • newbiegal
    newbiegal Member Posts: 396
    Thanks Alex. I installed Oracle client, created linked server and followed the steps above and it worked. But get the following error for some selects..


    Invalid data for type "numeric".

    I researched on this error that it is fixed in ODAC I first installed Oracle client ( and then tried installing ODAC (Oracle 10g Release 2 ODAC but get a "runtime error" during the install.. Not sure if I'm missing something...

    Please help
  • IlicAlex
    IlicAlex Member Posts: 4
    Whenever I detect strange behavior of an Oracle installation I first check the paths:
    Installation folder and destination paths should not have blanks or empty space characters.
    I can tell you for 11g x64 client installation. It does not work if the installation folder contains blank.

    Do you have only problem with numeric tables? How about tables with string values only?

    Best regards,
  • 1010089
    1010089 Member Posts: 2
    You get this error because the Oracle data dictionary is case sensitive. Oracle object names are all uppercase by default. The linked-server query must exactly match the case of all referenced Oracle metadata, such as schema and table names. So, the following query works:
    SELECT * FROM oradb..SCOTT.DEPT WHERE deptno = 10
This discussion has been closed.