3

My maintenance plan fails with the following error on one of my databases does anyone know how I can fix this problem? is is a corrupt table?

Executing the query

UPDATE STATISTICS [dbo].[Contact] 
WITH FULLSCAN
...

Failed with the following error:

A severe error occurred on the current command. The results, if any, should be discarded.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

3
  • in-case anyone asks CHECKDB found 0 allocation errors and 0 consistency errors in database May 30 '12 at 8:57
  • 7
    Contact product support May 30 '12 at 9:21
  • What SQL version are you using
    – AmmarR
    May 30 '12 at 12:05
1

there could be many reasons for this error

it can be a corrupted index or data corruption in your database

check this post https://stackoverflow.com/questions/1175244/sql-server-error-on-update-command-a-severe-error-occurred-on-the-current-com

and this post

http://sqlanddotnetdevelopment.blogspot.com/2011/03/severe-error-occurred-on-current.html

Microsoft has a FIX for this problem, they say if you get this error while "You update the statistics of the table." then this fix is for you... they say This issue occurs because the database engine is trying to load dangling statistics, check this link its a Cumulative update

http://support.microsoft.com/kb/2498796

2

I hit this kind of error updating statistics for a database that contained a buggy database trigger FOR DDL_DATABASE_LEVEL_EVENTS.

Here's how I found it. I looked at the history for the job (a maintenance plan that updates statistics). In the log file viewer for the failed job is a link "View T-SQL".

Clicking this link opens a window containing thousands of T-SQL statements:

    USE [DATABASE_NAME]
    GO
    UPDATE STATISTICS [dbo].[Some_Table]
    WITH FULLSCAN
    GO
    ...

I copied the T-SQL to a query window, and found the table mentioned in the error message. That gave me the database name.

I highlighted the USE [DATABASE_NAME] and UPDATE STATISTICS commands -- for the table I was looking for -- and executed them.

This yielded an error mentioning a procedure named trAuditChangeDB. The "tr" in the procedure name was a clue to look for a trigger.

The trigger contained some buggy code that tried to insert a row into a non-existent table.

The solution for me was to disable the buggy trigger. Evidently a trigger FOR DDL_DATABASE_LEVEL_EVENTS fires when statistics are updated.

0

yesterday I encountered the same error message when executing the update integrity check on my Dynamics CRM Organization database.

Finally I found out, what the reason for this was and it was quite simple. There was not enough space on the disk to perform this action, as mentioned in the event viewer. We already planned to resize the partition holding the DB file, but wanted to check in the integrity in advance.

So we will change the size of the partition holding the databse files and will then run the maintenance plan again.

Regards

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.