I am facing the issue while querying the ORACLE database from linked server.
The error message which I get is:
An error occurred while preparing the query
SELECT COUNT(*) FROM OracleDBInstance.testTable
for execution against OLE DB providerADsDSOObject
for linked serverlnk_server
.
My query is:
select * from openquery(lnk_server,'SELECT COUNT(*) FROM OracleDBInstance.testTable')
I have searched a lot, but everyone is providing solution for Active Directory query.
Can any one provide the correct solution?
I had the same problem
In some cases when using the SSMS interface to create a linked server using Oracle Provider for OLE DB, in the background it instead uses ADsDSOObject.
To resolve the issue I followed these steps:
This worked for me to use OraOLEDB.Oracle rather than ADsDsOObject.