Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server error on update command - "A severe error occurred on the current command"

Running the following query in SQL Server Management Studio gives the error below.

update table_name set is_active = 0 where id  = 3

A severe error occurred on the current command. The results, if any, should be discarded.

  • The logs have been truncated
  • there is an update trigger but this isnt the issue
  • the transaction count is zero (@@trancount)

I have tried the same update statement on a couple of other tables in the database and they work fine.

DBCC CHECKTABLE('table_name');

gives

DBCC results for 'table_name'.
There are 13 rows in 1 pages for object "table_name".
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
like image 963
Paul Rowland Avatar asked Jul 24 '09 00:07

Paul Rowland


3 Answers

I just had the same error, and it was down to a corrupted index. Re-indexing the table fixed the problem.

like image 173
LauraB Avatar answered Nov 07 '22 09:11

LauraB


In my case,I was using SubQuery and had a same problem. I realized that the problem is from memory leakage.

Restarting MSSQL service cause to flush tempDb resource and free huge amount of memory. so this was solve the problem.

like image 41
ARZ Avatar answered Nov 07 '22 08:11

ARZ


Run DBCC CHECKTABLE('table_name');

Check the LOG folder where the isntance is installed (\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG usually) for any file named 'SQLDUMP*'

like image 6
Remus Rusanu Avatar answered Nov 07 '22 10:11

Remus Rusanu