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 MARCH 24, 2022
Applies to:
Oracle Provider for OLE DB - Version 11.2.0.1 to 11.2.0.1 [Release 11.2]Information in this document applies to any platform.
Symptoms
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')
Changes
Upgraded the Oracle Provider for OLE DB to 11.2.0.1.0.
Cause
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
Symptoms |
Changes |
Cause |
Solution |
References |