---
lang: ja-jp
breaks: true
---
# SQL Server 2012 「復元中にエラーが発生したので、データベース 'model' (3:0) は再開されません。」とエラーが発生し、起動できないときの対処 2022-05-17
```shell=
2022-05-17 12:09:34.53 spid9s WARNING: did not see LOP_END_CKPT.
2022-05-17 12:09:34.53 spid9s Error: 3414, Severity: 21, State: 3.
2022-05-17 12:09:34.53 spid9s An error occurred during recovery, preventing the database 'model' (3:0) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.
2022-05-17 12:09:34.53 spid9s SQL Server shutdown has been initiated
2022-05-17 12:09:34.53 spid9s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
```
基本的な復旧の流れは、トレースフラグ`-T3608` を付加してシングルユーザモードで起動し、`sqlcmd` を使用して `restore database model` を実行すればよいはずだが、この時は `sqlcmd` の接続がうまくいかなかった。。
```shell=
sqlservr.exe -m -s [instancename] -T3608
sqlcmd -E -s [instancename]
RESTORE DATABASE model FROM DISK = 'バックアップファイル' WITH REPLACE
```
> The SQL Server Instance That Will not Start
> https://www.red-gate.com/simple-talk/databases/sql-server/database-administration-sql-server/the-sql-server-instance-that-will-not-start/
> Unable to start sql server service
> https://www.sqlservercentral.com/forums/topic/unable-to-start-sql-server-service-1
```
It sounds like your Model database files could be corrupt. Most people never make changes to the Model database so this might work. Rename the files for you Model database. Copy the Model files from another server (can only be done while the server is stopped) to the server that you're having problems with and then try restarting the service.
```
## 正常に動作している環境(同じ設定)からmodelデータベースをコピーして上書きしたら正常に起動した。。。
###### tags: `SQL Server` `SQL Server 2012` `エラー` `起動できない`