Article ID: 293758 - View products that this article applies to.
This article was previously published under Q293758
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 351698 (SHILOH_bugs)
BUG #: 101204 (SQLBUG_70)
The OLEDB provider for DB2 is unable to reliably determine the NULLABILITY of a column. Because the driver is unable to determine the NULLABILITY of a column, in some OpenQuery cases, the provider returns DBCOLUMNFLAGS_ISNULLABLE=0 (which means non-NULLable) when the query is prepared; however, the actual data indicates ISNULLABLE=1.
SQL Server relies on the NULLABILITY of column information for optimization and detects the mismatch at execution time, which then causes this error message to occur:
OLE DB provider 'DB2OLEDB' supplied inconsistent metadata for a column. Metadata information was changed at execution time
SQL Server 2000To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
(https://support.microsoft.com/kb/290211/EN-US/ )INF: How to Obtain the Latest SQL Server 2000 Service Pack
SQL Server 7.0To resolve this problem, obtain the latest service pack for Microsoft SQL Server 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
301511NOTE: The following hotfix was created prior to Microsoft SQL Server 7.0 Service Pack 4.
(https://support.microsoft.com/kb/301511/EN-US/ )INF: How to Obtain the Latest SQL Server 7.0 Service Pack
The English version of this fix should have the following file attributes or later:
NOTE: Because of file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.
File name Platform ---------------------- s70980i.exe X86 s70980a.exe Alpha
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
SQL Server 2000
This problem was first corrected in SQL Server 2000 Service Pack 1.
SQL Server 7.0
This problem was first corrected in Microsoft SQL Server 7.0 Service Pack 4.
This fix was performed for both SQL Server and the DB2 provider to determine the nullability properly. If the DB2 provider returns MAYBENULL at compile time, SQL Server does not error out at execution time if ISNULLABLE is set to 0 or 1, if it was previously MAYBENULL.
In order to get this issue addressed completely, you must obtain the DB2 provider fix in addition to this SQL Server fix. Details on the provider fix can be found in the following Microsoft Knowledge Base article:
(https://support.microsoft.com/kb/287761/EN-US/ )DB2OLEDB Provider Does Not Always Determine Nullability Of Data