FIX: BULK INSERT Fails with BATCHSIZE=1, FIRE_TRIGGERS, and TABLOCK (281409)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q281409
BUG #: 351227 (SHILOH_bugs)
SYMPTOMS
Running a BULK INSERT statement with the following parameters may cause an access violation:
BATCHSIZE = 1, FIRE_TRIGGERS, TABLOCK
If the TABLOCK parameter is omitted but the table option Table lock on bulk load is set to true, the access violation still occurs.
Running the statement in the SQL Server Query Analyzer gives the following result:
ODBC: Msg 0, Level 19, State
SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Server: Msg 1203, Level 20, State 1, Procedure t_ins, Line 5
Process ID 51 attempting to unlock unowned resource TAB: 10:386100416 [].
ODBC: Msg 0, Level 16, State 1
Communication link failure
ODBC: Msg 0, Level 16, State 1
Communication link failure
RESOLUTIONTo resolve this problem, obtain the latest service pack for 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
WORKAROUND
To work around this problem, use any one of these methods:
- Do not use the TABLOCK option with the BULK INSERT statement.
- Do not set the table option Table lock on bulk load to true.
- If you must use a table lock, specify BATCHSIZE to be something other than 1.
STATUSMicrosoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
Modification Type: | Major | Last Reviewed: | 10/17/2003 |
---|
Keywords: | kbBug kbfix kbSQLServ2000sp1fix KB281409 |
---|
|