Microsoft Knowledge Base Email Alertz

(277894) - 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...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 277894 - Last Review: March 10, 2004 - Revision: 2.1

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

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  (http://kbalertz.com/Feedback.aspx?kbNumber=215838/EN-US/ ) 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

APPLIES TO
  • Microsoft OLE DB Provider for DB2
  • Microsoft OLE DB Provider for DB2
Keywords: 
kbbug kbfix kbsna400presp4fix kbqfe kbsna400sp4fix KB277894
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Anonymous User Report As Irrelevant  
Written: 12/2/2004 4:47 PM
You'll see similar problems with UPDATES & DELETES via linked servers to DB2. I found the solution to be creating journals on the AS/400. More on this topic here: http://www.itjungle.com/tfh/tfh072803-story04.html