While restarting the MS SQL service you will get an error and MS SQL service on the server wont start . If you check the eventviewer  you will get the following  event logs

The log scan number passed to log scan in database ‘master’ is not valid. This error may indicate data corruption or that the log file (.ldf) does 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.

This usually occurs when the master.mdf or the mastlog.ldf gets corrupt . In order to solve the issue goto the following path

C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQL  , there you will find a  folder ” Template Data ” , copy the master.mdf and  mastlog.ldf  and replace it in

C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData folder .

Thats it . Now  start the MS SQL service and you are done .

 

Tags

Comments are closed