1

This question already has an answer here:

I got below error after rebooting one of my production SQL server 2012 enterprise,

The log scan number (151082:691:0) 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 seems master database is corrupted, the SQL server service is not starting, I have latest full back of master, where do I restore master when sql service is not running and can I start sql server in single user mode on same server when master corrupt? If I restore master what will happen to user dbs? is there any difference in restoring master and re-installing sql server?

Very much appreciate your replies.

Thanks

marked as duplicate by LowlyDBA, BradC, Erik Darling, RDFozz, John Eisbrener Jun 21 '18 at 17:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Did you know for SQL 2012 and higher, there is a master database template? This is created during the first installation of your SQL Server. By default it can be found under this path: C:\Program Files\Microsoft SQL Server\MSSQL12.XXXXX\MSSQL\Binn\Templates. You can copy the master database files (.mdf and .ldf) to the current location. This would get your sql server started but remember you would not have your current settings. To restore your master backup: this is a great link: blog.sqlauthority.com/2009/02/14/… HTH – samosql Jun 21 '18 at 16:10
  • You need to rebuild the system databases if they become corrupted. The SQL Server doc explains how to do that (although the 2012 doc is no longer online, it seems) and you can find tutorials online as well. – Bacon Bits Jun 21 '18 at 16:11
  • I've never dealt with this, but if it's the ldf for the master database can you use the Paul Randall method to recreate the log? – Alen Jun 21 '18 at 17:23

Browse other questions tagged or ask your own question.