0

We are having an issue with openquery() after our source database upgraded to ORACLE 19c. We had no issues before. However now when we query against the database using openquery the primary keys seem to be associated with the incorrect records. IF we include a where clause in the openquery portion defining a particular ID (primary key) then we get the correct result.

I have queried the ORACLE db directly and the IDs/record associations are correct. It is only when using openquery() and only after the 19c upgrade that this issue occurred. Admin is stating we are using the correct ODBC driver.

Anyone else ever seen an issue like this?

Thanks!

------------------------------UPDATE 1 !!!!!!!!

Additional Info Added:
I looked a bit further and it looks like only CLOB column is being attached to the wrong record using openquery. The rest of the columns are correct. Name Null? Type


REC_ID NOT NULL VARCHAR2(8) SEQ_NBR NOT NULL NUMBER
BEGIN_DATE CHAR(8)
END_DATE CHAR(8)
RC_ID NOT NULL VARCHAR2(4) ID_DESC CLOB

------------------------------UPDATE 2 !!!!!!!! Our work around We rolled back our ODBC driver and this fixed our issues. We were also able to band aid a few fixes before the driver downgrade by casting the CLOB as a varchar in the OPENQUERY statement.

  • Are you using a supported Oracle OleDb provider for your linked server? – David Browne - Microsoft Nov 16 at 20:12
  • 1
    We are. After digging further it looks like the record is correct for the key value but the CLOB column is not matching. I found someone having the same issue on another support board. It was his drivers. He rolled them back and the CLOB column came back correctly. I got with a counterpart at another institution who use the same database and had them openquery the table and they seem to be fine but they are using the old drivers. One response on the other site requested casting the CLOB to a varchar. I tried this and it worked. It pulled back the correct CLOB column data. – Shane Nov 17 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.