Knowledge.ToString()

The OLE DB Provider “ORAOLEDB.Oracle” for Linked Server Supplied Inconsistent Metadata for a Column.

You have setup an Oracle linked server. It seems successful but when you are trying to get the data from Oracle using following simple SQL statement:

SELECT TOP 10 * FROM ABC..DEF.GHI

The Oracle linked server throws following error:

The OLE DB provider "ORAOLEDB.Oracle" for linked server "XYZ" supplied inconsistent metadata for a column. The column "ABC" (compile-time ordinal 2) of object ""DEF"."GHI"" was reported to have a "DBCOLUMNFLAGS_ISFIXEDLENGTH" of 16 at compile time and 0 at run time.

You may be scratching your head why it does not work. Here is the reason.

Is your Oracle database on Oracle 11g? – Yes

Is Oracle driver installed on SQL server is Oracle 12 driver? – Yes

Then it will throw the above error.

Solution

Install Oracle 11g driver on SQL Server to fetch data from Oracle 11g database and linked server will work.

Wait a minute… but Oracle said Oracle 12g driver works to fetch data from Oracle 11g database.

Well… It is true that you can use Oracle 12g driver to fetch data from Oracle 11g database when you use it from any application (like Website) but does not with the linked server.

Share

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *