Microsoft KB Archive/306427

= DB2OLEDB Provider: Access Violation When Doing INSERT into DB2 Table =

Article ID: 306427

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft Host Integration Server 2000 Standard Edition

-



This article was previously published under Q306427



SYMPTOMS
When you are using the Microsoft OLE DB Provider for DB2 (DB2OLEDB) that is included with Host Integration Server 2000 to do an INSERT into a DB2 table from a SQL linked server and you are doing this by SELECTing data from a Microsoft SQL Server table by using either a four-part naming convention or OPENQUERY, an access violation (AV) occurs.

This problem can occur when the INSERT contains more than 145 columns.

SQL Server may generate a stack dump and write out information to the ERRORLOG file and a symptom dump file when the access violation occurs. The beginning of the stack dump in the ERRORLOG file may appear similar to the following:

Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL\log\SQL00097.dmp

2001-07-18 13:35:24.59 spid54 Error: 0, Severity: 19, State: 0

2001-07-18 13:35:24.59 spid54 SqlDumpExceptionHandler: Process 54 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION.

SQL Server is terminating this process..

Short Stack Dump

752150B1 Module(MSEIDRDA+000150B1) (std::deque >::erase+00000321) 11E04010 Module(UNKNOWN+00000000)

NOTE: The INSERT into the DB2 table actually completes successfully even though the access violation occurs.



CAUSE
If the INSERT has more than 145 columns, a pointer is being overwritten when the OLE DB Provider's SQL parser is trying to clean up its queue after the INSERT has been processed. The overwriting of the pointer results in the access violation. Because this occurs after the INSERT is processed, the DB2 table is successfully updated by the INSERT command.



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

328152 How to Obtain the Latest Host Integration Server 2000 Service Pack

The English version of this fix should have the following file attributes or later:

NOTE: Because of file dependencies, the most recent fix 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. This problem was first corrected in Host Integration Server 2000 Service Pack 1.

Keywords: kbbug kbfix kbhostintegserv2000presp1fix kbhostintegserv2000sp1fix KB306427

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.