Consecutive Inserts to DB2 from SQL Server by way of Linked Server Fail (277894)



The information in this article applies to:

  • Microsoft OLE DB Provider for DB2 4.0 SP2
  • Microsoft OLE DB Provider for DB2 4.0 SP3

This article was previously published under Q277894

SYMPTOMS

When a Linked Server to DB2 is configured by using the Microsoft OLE DB Provider for DB2 from Microsoft SQL Server, and INSERT statements are issued in a loop, the following error message may be reported:
Could not open table '<DB2 table name>' from OLE DB provider 'DB2OLEDB'. Unknown provider error.

-or-

OLE DB provider 'DB2OLEDB' reported an error. The provider did not give any information about the error.

RESOLUTION

To resolve this problem, obtain the latest service pack for SNA Server 4.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

215838 How to Obtain the Latest SNA Server Version 4.0 Service Pack


STATUS

Microsoft has confirmed that this is a problem in Microsoft SNA Server version 4.0 Service Pack 2 (SP2) and 4.0 SP3.

This problem was first corrected in SNA Server 4.0 Service Pack 4.

MORE INFORMATION

To reproduce this problem, configure a Linked Server to DB2 from SQL Server by using DB2OLEDB, and then run the following script from Query Analyzer:

DECLARE @CTR INT
SELECT @CTR = 10
WHILE (SELECT @CTR) < 100
BEGIN
INSERT INTO LinkedServerName.CatalogName.SchemaName.TableName (COL1) VALUES (@CTR)
PRINT @CTR
SELECT @CTR = @CTR + 1
END


Modification Type:MinorLast Reviewed:3/10/2004
Keywords:kbbug kbfix kbQFE kbSNA400PreSP4fix kbSNA400sp4fix KB277894