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 '