FIX: Nullability Changes Not Handled by SQL Server with Linked Server Queries to DB2

Article translations Article translations
Article ID: 293758 - View products that this article applies to.
This article was previously published under Q293758
BUG #: 351698 (SHILOH_bugs)
BUG #: 101204 (SQLBUG_70)
Expand all | Collapse all

On This Page

SYMPTOMS

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

RESOLUTION

SQL Server 2000

To 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:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

SQL Server 7.0

To 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:
301511 INF: How to Obtain the Latest SQL Server 7.0 Service Pack
NOTE: The following hotfix was created prior to Microsoft SQL Server 7.0 Service Pack 4.

The English version of this fix should have the following file attributes or later:
   File name   Platform
   ----------------------

   s70980i.exe  X86
   s70980a.exe  Alpha
				
NOTE: Because of file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.

STATUS

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.

MORE INFORMATION

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:
287761 DB2OLEDB Provider Does Not Always Determine Nullability Of Data

Properties

Article ID: 293758 - Last Review: October 31, 2003 - Revision: 3.1
APPLIES TO
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbbug kbfix kbqfe kbsqlserv2000sp1fix KB293758

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com