This article was previously published under Q249119
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 56117 (SQLBUG_70)
If all of the following conditions are true, executing a Transact-SQL BULK INSERT may cause the SQL Server to stop responding or cause a stack overflow or access violation (AV):
A table has an int data type field and some other data type fields. At least one field follows the int data type field.
A format file is used.
The field is defined as the fixed data length in the format file.
Only the space character is in the data file.
If SQL Server stops responding, you must restart SQL Server. This problem does not occur in the bulk copy program (BCP) utility.
To work around this problem, do any one of the following:
Make sure a value other than the space character is specified in the data file.
Use the field terminator in the data file and format file.
Use the BCP utility instead of BULK INSERT.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.
Steps to Reproduce the Problem
The following is a case where SQL Server may stop responding without any information:
Create a data file named Test1.txt containing only two space characters and a <CRLF>.
Create a format file named Test1.fmt containing the following: