четверг, 5 октября 2017 г.

Восстановление SQL Server 2016

Возникла неприятная ошибка: служба инстанса SQL Server 2016 запускалась и тут же останавливалась. Что нужно делать?

Шаг 1. Посмотреть логи

Они находятся в файле

C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERV\MSSQL\Log\ERRORLOG

Обнаружилась следующая ошибка:

2017-10-03 16:28:46.66 spid6s      The log scan number (34:2952:1) passed to log scan in database 'model' 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.