Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

DB2OLEDB Provider: Access Violation When Doing INSERT into DB2 Table


View products that this article applies to.

This article was previously published under Q306427

↑ Back to the top


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<Xo2Db2Token,std::allocator<Xo2Db2Token> >::erase+00000321) 11E04010 Module(UNKNOWN+00000000)
NOTE: The INSERT into the DB2 table actually completes successfully even though the access violation occurs.

↑ Back to the top


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.

↑ Back to the top


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:

Collapse this tableExpand this table
File nameDateTime
Db2oledb.dll08/10/200109:10AM
Mseidrda.dll08/10/200109:10AM

NOTE: Because of file dependencies, the most recent fix that contains the preceding files may also contain additional files.

↑ Back to the top


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.

↑ Back to the top


Keywords: KB306427, kbhostintegserv2000sp1fix, kbhostintegserv2000presp1fix, kbfix, kbbug

↑ Back to the top

Article Info
Article ID : 306427
Revision : 3
Created on : 2/22/2007
Published on : 2/22/2007
Exists online : False
Views : 316