My sqlsever cannot start after a suddenly shutdown [migrated]

Today I found that I could not connect to my SQL server. It was working well yesterday until my computer shut down suddenly. enter image description here

Here is text information.

   在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
   在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   在 System.Data.SqlClient.SqlConnection.Open()
   在 Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
   在 Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

And I find that it seems I can't start up the service now, so I think it may be that the database instance has some problem because of the sudden shut down. I'm sorry my English is not good because I'm not native. Could you help me?enter image description here

Here is the ErrorLog.

2022-01-19 14:59:35.79 Server      Microsoft SQL Server 2012 - 11.0.2218.0 (X64) 
    Jun 12 2012 13:05:25 
    Copyright (c) Microsoft Corporation
    Business Intelligence Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: )

2022-01-19 14:59:35.79 Server      (c) Microsoft Corporation.
2022-01-19 14:59:35.79 Server      All rights reserved.
2022-01-19 14:59:35.79 Server      Server process ID is 13848.
2022-01-19 14:59:35.79 Server      System Manufacturer: 'HASEE Computer', System Model: 'P65_67HSHP'.
2022-01-19 14:59:35.79 Server      Authentication mode is MIXED.
2022-01-19 14:59:35.79 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2022-01-19 14:59:35.79 Server      The service account is 'NT Service\MSSQLSERVER'. This is an informational message; no user action is required.
2022-01-19 14:59:35.79 Server      Registry startup parameters: 
     -d C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\master.mdf
     -e C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\ERRORLOG
     -l C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2022-01-19 14:59:35.79 Server      Command Line Startup Parameters:
     -s "MSSQLSERVER"
2022-01-19 14:59:36.32 服务器         SQL Server detected 1 sockets with 4 cores per socket and 8 logical processors per socket, 8 total logical processors; using 8 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2022-01-19 14:59:36.32 服务器         SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2022-01-19 14:59:36.32 服务器         Detected 8068 MB of RAM. This is an informational message; no user action is required.
2022-01-19 14:59:36.32 服务器         Using conventional memory in the memory manager.
2022-01-19 14:59:36.60 服务器         This instance of SQL Server last reported using a process ID of 8400 at 2022/1/19 14:22:43 (local) 2022/1/19 6:22:43 (UTC). This is an informational message only; no user action is required.
2022-01-19 14:59:36.60 服务器         Node configuration: node 0: CPU mask: 0x00000000000000ff:0 Active CPU mask: 0x00000000000000ff:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2022-01-19 14:59:36.62 服务器         Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2022-01-19 14:59:36.65 服务器         Software Usage Metrics is disabled.
2022-01-19 14:59:36.65 spid4s      Starting up database 'master'.
2022-01-19 14:59:36.70 spid4s      15 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
2022-01-19 14:59:36.71 spid4s      0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2022-01-19 14:59:36.74 Server      CLR version v4.0.30319 loaded.
2022-01-19 14:59:36.87 服务器         Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
2022-01-19 14:59:36.89 spid4s      SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2022-01-19 14:59:36.89 spid4s      SQL Server Audit has started the audits. This is an informational message. No user action is required.
2022-01-19 14:59:36.93 spid4s      SQL Trace ID 1 was started by login "sa".
2022-01-19 14:59:36.93 spid4s      Server name is 'DESKTOP-JVORPKA'. This is an informational message only. No user action is required.
2022-01-19 14:59:37.08 spid13s     A self-generated certificate was successfully loaded for encryption.
2022-01-19 14:59:37.09 spid13s     Server is listening on [ 'any' <ipv6> 1433].
2022-01-19 14:59:37.09 spid13s     Server is listening on [ 'any' <ipv4> 1433].
2022-01-19 14:59:37.09 spid13s     Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
2022-01-19 14:59:37.09 spid13s     Server local connection provider is ready to accept connection on [ \\.\pipe\sql\query ].
2022-01-19 14:59:37.10 服务器         Server is listening on [ ::1 <ipv6> 1434].
2022-01-19 14:59:37.10 服务器         Server is listening on [ 127.0.0.1 <ipv4> 1434].
2022-01-19 14:59:37.10 服务器         Dedicated admin connection support was established for listening locally on port 1434.
2022-01-19 14:59:37.11 spid13s     SQL Server is now ready for client connections. This is an informational message; no user action is required.
2022-01-19 14:59:37.11 服务器         SQL Server is attempting to register a Service Principal Name (SPN) for the SQL Server service. Kerberos authentication will not be possible until a SPN is registered for the SQL Server service. This is an informational message. No user action is required.
2022-01-19 14:59:37.11 服务器         The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/DESKTOP-JVORPKA ] for the SQL Server service. Windows return code: 0xffffffff, state: 63. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2022-01-19 14:59:37.12 服务器         The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/DESKTOP-JVORPKA:1433 ] for the SQL Server service. Windows return code: 0xffffffff, state: 63. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2022-01-19 14:59:37.35 spid14s     A new instance of the full-text filter daemon host process has been successfully started.
2022-01-19 14:59:37.53 spid9s      Starting up database 'mssqlsystemresource'.
2022-01-19 14:59:37.53 spid19s     Starting up database 'LawEvent'.
2022-01-19 14:59:37.53 spid18s     Starting up database 'ReportServer'.
2022-01-19 14:59:37.53 spid17s     Starting up database 'msdb'.
2022-01-19 14:59:37.56 spid9s      The resource database build version is 11.00.2218. This is an informational message only. No user action is required.
2022-01-19 14:59:37.61 spid18s     1 transactions rolled forward in database 'ReportServer' (5:0). This is an informational message only. No user action is required.
2022-01-19 14:59:37.62 spid18s     0 transactions rolled back in database 'ReportServer' (5:0). This is an informational message only. No user action is required.
2022-01-19 14:59:37.62 spid9s      Starting up database 'model'.
2022-01-19 14:59:37.63 spid17s     1 transactions rolled forward in database 'msdb' (4:0). This is an informational message only. No user action is required.
2022-01-19 14:59:37.63 spid17s     0 transactions rolled back in database 'msdb' (4:0). This is an informational message only. No user action is required.
2022-01-19 14:59:39.18 spid9s      Error: 824, Severity: 24, State: 2.
2022-01-19 14:59:39.18 spid9s      SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x83635096; actual: 0x83634816). It occurred during a read of page (2:0) in database ID 3 at offset 0000000000000000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\modellog.ldf'.  Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
2022-01-19 14:59:39.18 spid9s      Error: 5105, Severity: 16, State: 1.
2022-01-19 14:59:39.18 spid9s      A file activation error occurred. The physical file name 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\modellog.ldf' may be incorrect. Diagnose and correct additional errors, and retry the operation.
2022-01-19 14:59:39.18 spid9s      File activation failure. The physical file name "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\modellog.ldf" may be incorrect.
2022-01-19 14:59:39.18 spid9s      The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure.
2022-01-19 14:59:39.18 spid9s      Error: 945, Severity: 14, State: 2.
2022-01-19 14:59:39.18 spid9s      Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.
2022-01-19 14:59:39.18 spid9s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

The error message says a system database, model has it's log file broken:

SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x83635096; actual: 0x83634816). It occurred during a read of page (2:0) in database ID 3 at offset 0000000000000000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\modellog.ldf'.

A very good resource written by Gail Shaw: The SQL Server Instance That Will not Start has detailed repair steps, which are too long to copy here.

The fixing options are:

  1. Rebuild the system databases.
  2. Restore model from a backup by starting the DB with trace flags -T3608 -T3609 to get the system up. See Gail's article for details.
  3. Copy model's files from another a SQL Server installation.