What are the _mssql solutions for master database corruption?

Source: Internet
Author: User
Tags microsoft sql server sql server books

After the SQL Server 2008 master database is corrupted, the SQL Server service fails to start, viewing the error log, and you receive the following error message:

2015-10-27 10:15:21.01 spid6s starting up database ' master '.
2015-10-27 10:15:23.01 spid6s Error: 9003, severity: 20, Status: 1.
2015-10-27 10:15:23.01 spid6s The log scan number (227:418:1) passed to log scan in database ' master ' are not valid. This error could indicate data corruption or that the log file (. ldf) does to not match the data file (. mdf). If This error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.
2015-10-27 10:15:23.01 spid6s cannot recover the master database. SQL Server is unable to run. Restore Master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, on SQL Server books Online.

If the database version is a Chinese version, you will see an error message similar to the following:

The log scan number (227:418:1) passed to the log scan operation in the database ' master ' is invalid. This error may indicate data corruption, or the log file (. ldf) does not match the data file (. mdf). If this error occurs during replication, recreate the publication. Otherwise, if the problem causes an error during startup, restore from backup.

There are roughly three ways to resolve the corruption of the master database at this point:

1: Restore master database from backup

The prerequisite for restoring the master database is that your master has a backup. Keep in mind that Master must also back up. Many times, some people ignore these system databases when they back up. General master, msdb backups are required.

2: Copy master database template

If you do not have master backup, then ask for a copy of the master database file from the installation directory to the corresponding directory. If you have SQL Server installed in the C disk and have not modified the installation path, it may be C:\Program Files\Microsoft SQL Server\mssql10. Mssqlserver\mssql\binn\templates

3: Rebuilding the master database

Locate the installation media for SQL Server 2008 (insert CD or copy media to the corresponding directory), change the directory to the directory of the Setup.exe file in the command window, and then run the following command (modify the relevant parameters in combination with the actual situation)

Setup.exe
/quiet
/action=rebuilddatabase
/instancename=instance_name
/sqlsysadminaccounts= Accounts
[/sapwd=password]
[/sqlcollation=collation_name]

Of course, there are a lot of details, if the database has been installed after the patch, did upgrade, you may need to reapply these patches.

The above content is about master database damage solution, hope to help everyone.

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.