Database corruption can be resolved by restarting MSSQL or Windows or attaching and detaching databases

Source: Internet
Author: User
Tags mssql

Myth #21: Database corruption can be resolved by restarting SQL Server or Windows, or by attaching and detaching databases

Error

None of the operations in SQL Server can repair data corruption. Damaged pages need to be repaired or restored by some mechanism-but not by restarting SQL Server,windows or by detaching additional databases.

In fact, if your database is damaged to a crash recovery, then separating the attached database will be the worst decision you can make. This principle is because the attached database contains crash recovery steps, and if crash recovery fails, the attach fails. So the following tips are what you need: TechEd demo:creating, detaching, re-attaching, and fixing a suspect database. Remember, never detach a corrupted database.

The following types of errors are likely to be resolved by restarting:

If the page in memory is corrupted, but when the page on disk is intact, the reboot resolves the corruption problem

If the damage occurs, but a step in the restart process causes the page to be no longer allocated, it appears that the damage was resolved by rebooting, which I already have a blog post to elaborate on: misconceptions around Corruptions:can they Disappear?

If the IO subsystem is also restarted and SQL Server requirements for IO are "jammed" by the IO subsystem, the reboot seems to solve the problem, but it is not actually a repair damage, but rather a recovery of the faulty IO subsystem. I've only met three or four times in this category.

In any case, you should at least have a backup strategy or an easy system for recovery and failover. Restarting is not a solution, it will only waste time.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/SQLServer/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.