Search

Friday, January 14, 2011

Repairing Error 5235 when the DBCC command fails in MS SQL Server 2008 database

In MS SQL Server, the DBCC command is used to perform checks on the databases and repair the errors, if any. Also, there are several repair clauses that can be used with this command to repair different types of corruption cases. However, there are some types of errors that are not repaired even by this command. In such cases, the most optimum SQL recovery would be made possible by using a third-party MDF file recoverysoftware.

For instance, consider that you are using the DBCC command on an MS SQL Server 2008 database. However, the process terminates abruptly and could not get completed. An error message is displayed, in the process, which is:

[EMERGENCY] DBCC DBCC_COMMAND_DETAILS executed by USER_NAME terminated abnormally due to error state ERROR_STATE. Elapsed time: HOURS hours MINUTES minutes SECONDS seconds.”

Cause:

The aforementioned summary message appears whenever the DBCC command faces some problems during its execution. The reasons for failure at each state are:

  • State 0: There is fatal metadata corruption in the database, which is causing the issue.

  • State 1: This state was cancelled because of an internal check failure.

  • State 2: This state failed as the basic checks for the system tables has failed.

  • State 3: This state failed as the database failed to restart after the transaction log rebuilding.

  • State 4: An access violation has occurred during this state.

  • State 5: An unknown error has occurred that has made the DBCC command to end abruptly.

Resolution:

For each of the aforementioned problems in every state, you can perform the following recovery acts:

  • Restore from backup: If the problem has occurred during the State 0, State 2, or State 3, then you should restore the database from its backup. However, before this you must ensure that the backup is updated and clean.

  • Contact MS Customer Service and Support (CSS): If the problem has occurred in the State 1 or State 4, then you should contact Microsoft Customer Service and Support (CSS) for all kind of assistance.

  • Rerun the DBCC command: If the problem has occurred in the State 5, then you should try to run the command again. However, if the resolution does not work then you should contact CSS in this case as well.

If the problem does not get fixed, then there is a need of using a third-party MS SQL Server recovery software to recover MDF files. These tools use highly advanced and sophisticated algorithms to scan the original database without modifying it.

2 comments:

  1. Very nice post, there is one more blog provides solution for fixing SQL error 5235.

    http://www.sqlrecoverysoftware.net/blog/sql-error-5235.html

    ReplyDelete
  2. SQL Error 5235 is really annoying issue that caused due to some adverse situation database gets damaged and you fails to access any of the stored data. I too have same issue but this solution helped me lot:-http://en.mssqldatabaserepair.org/

    ReplyDelete