# Database Discussions > MS SQL Server 7/MS SQL Server 2000 >  DBCOLUMNFLAGS_ISNULLABLE error on linked server....

## DLu

Server: Msg 7356, Level 16, State 1, Line 1 OLE DB provider 'SQLOLEDB' supplied inconsistent metadata for a column. Metadata information was changed at execution time.
OLE DB error trace [Non-interface error:  Column 'customerID' (compile-time ordinal 1) of object '"ABCDB"."dbo"."vwCustomer_xxxxk"' was reported to have a DBCOLUMNFLAGS_ISNULLABLE of 0 at compile time and 32 at run time].

above error messages occurs when I try to run a proc which inside a query statement of select to a linked SQL6.5 database. The thing puzzled me is that 
linked query to run outside the proc is just fine, but errors within the proc. the running server is MSDE 2k with sp3. Look at knowledgebase about "
DBCOLUMNFLAGS_ISNULLABLE" is only related to DB2 or SQL7 or SQL2000 before sp3.... man...
thanks

----------


## skhanal

Just throwing out few ideas,

try running stored procedure using WITH RECOMPILE option.

Is customerid nullable or not nullable?

It could be an issue with oledb driver?. Try creating linked server with ODBC driver?

----------


## DLu

customerID is the PK, and tried about with recompile, still same error.

further investigation: since the inside part of the query to the linked 6.5 is via a view, change to table, then found the error gone.

looks like via view, the linked server is kind of confusing.
thanks skhanal
-D

----------


## DJDataDude

I opened a case with Microsoft and got the following code from them.  The operative clause in the connect string is "Early Metadata=True".  Setting this gave me a working linked server.  Here is the code that I used to create the linked server.

EXEC sp_addlinkedserver
   @server='AXUSIR01',
   @srvproduct='Microsoft OLE DB Provider for DB2',
   @catalog='S102CD5C',
   @provider='DB2OLEDB',
   @provstr='Provider=DB2OLEDB;User ID=DTLD;Password=Dataload2;Initial Catalog=S102CD5C;Network Transport Library=TCP;Host CCSID=37;PC Code Page=1252;Network Address=10.100.200.4;Network Port=446;Package Collection=QGPL;Default Schema=XUNMDTTAXS;Process Binary as Character=False;Units of Work=RUW;DBMS Platform=DB2/AS400;Early Metadata=True;Defer Prepare=True;Rowset Cache Size=0;Persist Security Info=True;Mode=Read;Connection Pooling=True;Derive Parameters=False;Cache Authentication=True;'


Hope this helps someone in the future.

----------

