views:

1048

answers:

4

Running the following query in Management studio

update table_name set is_active = 0 where id  = 3

gives the following error,

Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.
Msg 0, Level 20, State 0, Line 0
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.

Any ideas?

Update

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.
+2  A: 

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*'

Remus Rusanu
checktable didnt give anything, I will try to get access to the log files - thanks.
Paul Rowland
Also try DBCC CHECKDB(yourdb) to extend the check to the entire database. If you find dump files, look inside the newer sqldump*.txt files.
Remus Rusanu
+3  A: 

Are there other connections, lots of transactions? Have you tried SET NOCOUNT ON?

Are there any triggers on the table?

MarkB
+1 for suggesting triggers.
Rick
yes there are triggers and I had checked them already... sorry should have mentioned in the origial question
Paul Rowland
and had checked already checked @@trancount, should have mentioned that in original question as well :-)
Paul Rowland
+1  A: 

There are 3 possibilities on the MS KB

When I see stuff like this: I always think hotfix, engine, server errors etc.

4 results: search for ""Msg 0, Level 11,State 0, Line 0" A severe error occurred on the current command"

Edit: It's on MS Connect too

gbn
+1  A: 

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

I realise this thread is a year old, but I thought it would be worth mentioning incase someone comes across it in future (like I just did).

LauraB