Selecting NVARCHAR2 Data Using the Oracle Provider for OLE 11.2 Fails With: Msg 7356, Level 16, State 1, Line 1 inconsistent metadata for a column
(Doc ID 1106034.1)
Last updated on FEBRUARY 26, 2019
Applies to:Oracle Provider for OLE DB - Version 184.108.40.206 to 220.127.116.11 [Release 11.2]
Information in this document applies to any platform.
Executing a select query against a NVARCHAR2 column using the Oracle Provider for OLE DB 11.2 fails with:
Msg 7356, Level 16, State 1, Line 1
The OLE DB provider "OraOLEDB.Oracle" for linked server "LINKEDSERVERNAME" supplied inconsistent metadata for a column. The column "C1" (compile-time ordinal 1) of object ""SCHEMANAME"."TABLENAME"" was reported to have a "LENGTH" of <nn> at compile time and <nnn> at run time.
*Where <nn> is the actual size of the column defined in the database and <nnn> is a number double that size.
The error is specific to using the three part query syntax:
select count(*) from LINKEDSERVERNAME..SCHEMA.TABLENAME
Using OpenQuery works and can be utilized as a workaround:
select * from OpenQuery(LINKEDSERVERNAME,'SELECT COUNT(*) FROM SCHEMA.TABLENAME')
Upgraded the Oracle Provider for OLE DB to 18.104.22.168.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