Invalid log scan number passed to the log scan operation in database ' master '

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

Error: When connecting to the database: SQL Server detected consistency-based logical I/O error checksum is incorrect

C:\Documents and settings\administrator> "C:\Program Files\Microsoft SQL Server\100\setup Bootstrap\release\ Setup.exe "/q/action=rebuilddatabase/instancename=mssqlserver/sqlsysadminaccounts=administrator/sapwd=password

After execution is OK, more details, see:

MS SQL Server R2 installed on the local computer may cause the SQL Server service to fail to start due to hard disk causes, and you will see several errors and information in Event Viewer with two hints that may be corrupted by master:
1. Error: The log scan number (184:416:1) passed to the log scan operation in 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 a backup.
2. Information: Unable to recover master database. SQL Server cannot run. Restore the master database with a full backup, repair it, or regenerate it. For more information about how to regenerate the master database, see SQL Server Books Online.

Reinstalling SQL Server issues is not difficult to resolve, but is too time-consuming. Google to a quick recovery method, share the following:

1, copy Model.mdf, Mastlog.ldf, Model.mdf, Modellog.ldf, Msdbdata.mdf, msdblog.ldf files.
From
X:\Program Files\Microsoft SQL Server\mssql10. Mssqlserver\mssql\binn\templates
To
X:\Program Files\Microsoft SQL Server\mssql10. Mssqlserver\mssql\data
Note: The above "X:\Program Files\Microsoft SQL Server" is the installation directory for SQL Server. The following "C:\Program Files\Microsoft SQL Server" is the directory under the system disk

2. Locate and execute the installation command

First find the installation command:
C:\Program Files\Microsoft SQL Server\100\setup Bootstrap\release\setup.exe

If you are just Windows Authentication mode, you only need the following syntax:
Setup/action=rebuilddatabase/quiet/instancename=<instance name>/sqlsysadminaccounts=<accounts>
In the case of composite authentication mode, you need to provide the password for the SA using the/SAPWD parameter:
Setup/action=rebuilddatabase/quiet/instancename=<instance name>/sqlsysadminaccounts=<accounts>/ Sapwd=<sa password>

I set up the composite authentication mode, the SQL Server system administrator account is the Administrators group, the SA password is 123456. And just one default instance: MSSQLSERVER.
So execute the following command at the command line:
setup/action=rebuilddatabase/quiet/instancename=mssqlserver/sqlsysadminaccounts=administrators/sapwd=123456

There is no prompt message (success or failure) after execution, but you can view the installation log in C:\Program Files\Microsoft SQL Server\100\setup Bootstrap\log\summary.txt immediately.

Finally, the SQL Server service starts successfully in SQL Server Configuration Manager.

Invalid log scan number passed to the log scan operation in database ' master '

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.