Error "Could not execute query against OLE DB provider 'OraOLEDB.Oracle'" when Querying Against an Oracle Database using Microsoft SQL Server Linked Server and the Oracle Provider for OLE DB
(Doc ID 333327.1)
Last updated on AUGUST 02, 2021
Applies to:Oracle Provider for OLE DB - Version 10.2.0.1 and later
Microsoft Windows (32-bit)
***Checked for relevance on 28-Dec-2018***
You are unable to connect to the Oracle database when using Microsoft SQL Server's Linked Server and the Oracle Provider for OLE DB. When issuing the following query from Microsoft's SQL Query Analyzer
SELECT * FROM DEV..SCOTT.EMP
You receive the following error
Server: Msg 7320, Level 16, State 2, Line 1 Could not execute query against OLE DB provider 'OraOLEDB.Oracle'. OLE DB error trace [OLE/DB Provider 'OraOLEDB.Oracle' ICommandText::Execute returned 0x80040155].
If you change the query so that it will not return any rows it runs successfully
SELECT * FROM DEV..SCOTT.EMP where 1=0
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document