FIX: SQL Server May an Encounter Access Violation During a BULK IMPORT (308112)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q308112
BUG #: 354380 (SHILOH_BUGS)
BUG #: 354785 (SHILOH_BUGS)
SYMPTOMS
If you use a BULK INSERT to transfer data from a text file into a SQL Server database, SQL Server may encounter an access violation if the length of the data in the text data file does not match the related column's length in the destination database.
CAUSE
When the character set of the data file matches the character set of the server, no conversion is needed while transporting data from the text data file into the database. Under this condition, SQL Server trusts the data from the provider and does not check the length of the input data. If the input data length is greater than the related column length in SQL Server, a buffer overrun is possible, which leads to the server access violation.
RESOLUTIONTo 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
HotfixNOTE: The following hotfix was created prior to Microsoft SQL Server 2000 Service Pack 2.
The English version of this fix should have the following file attributes or later:
Version File name Platform
-------------------------------------
8.00.413 Sqlservr.exe i386
NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.
WORKAROUND
To work around the problem, modify the input data file to make sure that the length of the source data matches the destination column's length.
STATUSMicrosoft has confirmed that this is a problem in Microsoft SQL Server 2000. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.
Modification Type: | Major | Last Reviewed: | 10/9/2003 |
---|
Keywords: | kbbug kbfix kbSQLServ2000preSP2Fix KB308112 |
---|
|