Deploying SQLServer 2016 Failover Cluster on Windows Server 2016

  • 数据库安装包:
    cn_sql_server_2016_enterprise_with_service_pack_1_x64_dvd_9538279.iso

  • 数据库补丁:
    SQLServer2016SP2-KB4052908-x64-CHS.exe

  • 数据库管理工具:
    SSMS-Setup-CHS-18.8.exe

  • R Open / R Server 程序包:
    SRO_3.2.2.15000_1033.cab
    SRS_8.0.3.15000_1033.cab

  • JRE 软件包(Polybase)
    jre-7u80-windows-x64.exe

Installing failover cluster

  • AD:
    【添加角色和功能】-【Active Dirctory 域服务】
    【添加角色和功能】-【DNS 服务器】

  • Node:
    【添加角色和功能】-【故障转移群集】
    【JRE 7u51 x64 or latest】

架构如下:

Item Value Node01 Node02
Domain sj.com
Cluster IP Address 192.168.3.183, SQLCLUSTER
Msdtc 192.168.3.184, MSDTC-dtc
SQL IP Address 192.168.3.185, SQL-VIP
Quorum Disk 1Gb, Q:\
Msdtc Disk 1Gb, M:\
Data Disk 1Tb, H:\
Log Disk 500Gb, I:\
Hostname sj01.sj.com sj02.sj.com
Public IP 192.168.3.181 192.168.3.182
Heartbeat IP 10.10.10.181 10.10.10.182
PS C:\Users\administrator.SJ> Get-ClusterResource

Name State OwnerGroup ResourceType
---- ----- ---------- ------------
Analysis Services Online SQL Server (MSSQLSERVER) Generic Service
dtc Online dtc Network Name
IP 地址 192.168.3.184 Online dtc IP Address
MSDTC-dtc Online dtc Distributed Transaction Coordinator
SQL IP Address 1 (MSSQLSERVER) Online SQL Server (MSSQLSERVER) IP Address
SQL Network Name (MSSQLSERVER) Online SQL Server (MSSQLSERVER) Network Name
SQL Server Online SQL Server (MSSQLSERVER) SQL Server
SQL Server Agent Online SQL Server (MSSQLSERVER) SQL Server Agent
SQL Server Analysis Services CEIP Online SQL Server (MSSQLSERVER) Generic Service
SQL Server CEIP (MSSQLSERVER) Online SQL Server (MSSQLSERVER) Generic Service
SQL Server Polybase Dms (MSSQLSERVER) Online SQL Server (MSSQLSERVER) Generic Service
SQL Server Polybase Engine (MSSQLSERVER) Online SQL Server (MSSQLSERVER) Generic Service
存储 Qos 资源 Online 群集组 Storage QoS Policy Manager
群集 IP 地址 Online 群集组 IP Address
群集磁盘1 Online 群集组 Physical Disk
群集磁盘2 Online SQL Server (MSSQLSERVER) Physical Disk
群集磁盘3 Online dtc Physical Disk
群集名称 Online 群集组 Network Name

Installing a new sqlserver cluster

  • Node 1:























  • Node 2:










Deleting sqlserver node for cluster







Repairing bad of sqlserver installation




Errors

Fails the SCSI-3 Persistent Reservation test

测试磁盘 1 没有为故障转移群集使用的机制提供永久保留支持。某些存储设备需要特定的固件版本或设置才能正确处理故障转移群集。请与存储管理员或存储供应商联系以检查存储配置,以使存储设备能够正确处理故障转移群集。

verify-scsi-3-persistence-fail

原本是通过 VMware 挂载的共享硬盘,但是 SCSI-3 验证失败,随后通过 iscsi 方式挂载硬盘,验证通过。

Windows Server 2022 搭建 iSCSI 服务器全攻略

Test for node out to domain and join again

经过测试,将某个节点退域后重新加域,不影响 SQLServer 群集的正常切换使用。

The SQL Server service online pending

检查数据库日志 F:\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG

2024-07-19 23:14:40.39 Server      Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64)
Oct 28 2016 18:17:30
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows Server 2016 Standard 6.3 <X64> (Build 14393: ) (Hypervisor)

2024-07-19 23:14:40.40 Server UTC adjustment: 8:00
2024-07-19 23:14:40.40 Server (c) Microsoft Corporation.
2024-07-19 23:14:40.41 Server All rights reserved.
2024-07-19 23:14:40.41 Server Server process ID is 6560.
2024-07-19 23:14:40.41 Server System Manufacturer: 'VMware, Inc.', System Model: 'VMware7,1'.
2024-07-19 23:14:40.41 Server Authentication mode is MIXED.
2024-07-19 23:14:40.41 Server Logging SQL Server messages in file 'F:\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2024-07-19 23:14:40.41 Server The service account is 'SJ\administrator'. This is an informational message; no user action is required.
2024-07-19 23:14:40.41 Server Registry startup parameters:
-d F:\MSSQL13.MSSQLSERVER\MSSQL\DATA\master.mdf
-e F:\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG
-l F:\MSSQL13.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2024-07-19 23:14:40.41 Server Command Line Startup Parameters:
-s "MSSQLSERVER"
2024-07-19 23:14:40.42 Server SQL Server detected 2 sockets with 2 cores per socket and 2 logical processors per socket, 4 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2024-07-19 23:14:40.42 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2024-07-19 23:14:40.42 Server Detected 4095 MB of RAM. This is an informational message; no user action is required.
2024-07-19 23:14:40.42 Server Using conventional memory in the memory manager.
2024-07-19 23:14:40.47 Server Default collation: Chinese_PRC_CI_AS (简体中文 2052)
2024-07-19 23:14:40.50 Server Buffer pool extension is already disabled. No action is necessary.
2024-07-19 23:14:40.53 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2024-07-19 23:14:40.53 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2024-07-19 23:14:40.55 Server The maximum number of dedicated administrator connections for this instance is '1'
2024-07-19 23:14:40.55 Server This instance of SQL Server last reported using a process ID of 2412 at 2024/7/19 23:14:24 (local) 2024/7/19 15:14:24 (UTC). This is an informational message only; no user action is required.
2024-07-19 23:14:40.55 Server Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2024-07-19 23:14:40.56 Server 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.
2024-07-19 23:14:40.56 Server Database Instant File Initialization: 已启用. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
2024-07-19 23:14:40.57 Server Query Store settings initialized with enabled = 1,
2024-07-19 23:14:40.57 spid4s Starting up database 'master'.
2024-07-19 23:14:40.66 Server CLR version v4.0.30319 loaded.
2024-07-19 23:14:40.71 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
2024-07-19 23:14:40.85 spid4s Resource governor reconfiguration succeeded.
2024-07-19 23:14:40.85 spid4s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2024-07-19 23:14:40.85 spid4s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2024-07-19 23:14:41.15 spid4s SQL Trace ID 1 was started by login "sa".
2024-07-19 23:14:41.18 spid4s Server name is 'MSSQLSERVER'. This is an informational message only. No user action is required.
2024-07-19 23:14:41.18 spid4s The NETBIOS name of the local node that is running the server is 'SJ02'. This is an informational message only. No user action is required.
2024-07-19 23:14:41.25 spid10s A self-generated certificate was successfully loaded for encryption.
2024-07-19 23:14:41.29 spid10s Server is listening on [ 192.168.3.185 </i><ipv4> 1433].
2024-07-19 23:14:41.29 spid10s Started listening on virtual network name 'MSSQLSERVER'. No user action is required.
2024-07-19 23:14:41.29 spid10s Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
2024-07-19 23:14:41.29 spid10s Server named pipe provider is ready to accept connection on [ \\.\pipe\$$\MSSQLSERVER\sql\query ].
2024-07-19 23:14:41.29 spid10s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2024-07-19 23:14:41.29 Server 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.
2024-07-19 23:14:41.32 Server The SQL Server Network Interface library successfully registered the Service Principal Name (SPN) [ MSSQLSvc/MSSQLSERVER.sj.com ] for the SQL Server service.
2024-07-19 23:14:41.32 Server The SQL Server Network Interface library successfully registered the Service Principal Name (SPN) [ MSSQLSvc/MSSQLSERVER.sj.com:1433 ] for the SQL Server service.
2024-07-19 23:14:41.57 spid12s A new instance of the full-text filter daemon host process has been successfully started.
2024-07-19 23:14:41.60 spid4s Database mirroring has been enabled on this instance of SQL Server.
2024-07-19 23:14:41.60 spid19s Always On: The availability replica manager is starting. This is an informational message only. No user action is required.
2024-07-19 23:14:41.60 spid16s Starting up database 'msdb'.
2024-07-19 23:14:41.60 spid19s Always On Availability Groups: Waiting for local Windows Server Failover Clustering service to start. This is an informational message only. No user action is required.
2024-07-19 23:14:41.60 spid18s Starting up database 'DWConfiguration'.
2024-07-19 23:14:41.61 spid17s Starting up database 'DWDiagnostics'.
2024-07-19 23:14:41.61 spid6s Starting up database 'mssqlsystemresource'.
2024-07-19 23:14:41.61 spid20s Starting up database 'DWQueue'.
2024-07-19 23:14:41.61 spid21s Starting up database 'ipmsprod'.
2024-07-19 23:14:41.61 spid19s Always On Availability Groups: Local Windows Server Failover Clustering service started. This is an informational message only. No user action is required.
2024-07-19 23:14:41.61 spid19s Always On Availability Groups: Waiting for local Windows Server Failover Clustering node to start. This is an informational message only. No user action is required.
2024-07-19 23:14:41.61 spid19s Always On Availability Groups: Local Windows Server Failover Clustering node started. This is an informational message only. No user action is required.
2024-07-19 23:14:41.61 spid19s Always On Availability Groups: Waiting for local Windows Server Failover Clustering node to come online. This is an informational message only. No user action is required.
2024-07-19 23:14:41.61 spid19s Always On Availability Groups: Local Windows Server Failover Clustering node is online. This is an informational message only. No user action is required.
2024-07-19 23:14:41.61 spid19s Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
2024-07-19 23:14:41.61 spid19s Always On: The local replica of availability group 'ag-ipmsprod' is starting. This is an informational message only. No user action is required.
2024-07-19 23:14:41.64 spid6s The resource database build version is 13.00.4001. This is an informational message only. No user action is required.
2024-07-19 23:14:41.64 spid19s The state of the local availability replica in availability group 'ag-ipmsprod' has changed from 'NOT_AVAILABLE' to 'RESOLVING_NORMAL'. The state changed because the local instance of SQL Server is starting up. For more information, see the SQL Server error log, Windows Server Failover Clustering (WSFC) management console, or WSFC log.
2024-07-19 23:14:41.67 spid21s Error: 35262, Severity: 17, State: 1.
2024-07-19 23:14:41.67 spid21s Skipping the default startup of database 'ipmsprod' because the database belongs to an availability group (Group ID: 65536). The database will be started by the availability group. This is an informational message only. No user action is required.
2024-07-19 23:14:41.85 spid6s Starting up database 'model'.
2024-07-19 23:14:42.29 spid6s Polybase feature initialization successful, hadoop connectivity 0x7, node role: 0x1.
2024-07-19 23:14:42.29 spid6s Clearing tempdb database.
2024-07-19 23:14:42.30 Logon 错误: 18470,严重性: 14,状态: 1。
2024-07-19 23:14:42.30 Logon Login failed for user 'SJ\SJ02$'. Reason: The account is disabled. [客户端: 192.168.3.182]
2024-07-19 23:14:42.32 spid4s Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
2024-07-19 23:14:42.46 Server Software Usage Metrics is enabled.
2024-07-19 23:14:42.85 spid6s Starting up database 'tempdb'.
2024-07-19 23:14:43.53 spid6s The tempdb database has 4 data file(s).
2024-07-19 23:14:43.53 spid6s TEMPDB configuration for Polybase completed successfully.
2024-07-19 23:14:43.53 spid28s The Service Broker endpoint is in disabled or stopped state.
2024-07-19 23:14:43.56 spid28s Server is listening on [ 192.168.3.185 </i><ipv4> 5022].
2024-07-19 23:14:43.56 spid28s Started listening on virtual network name 'MSSQLSERVER'. No user action is required.
2024-07-19 23:14:43.56 spid28s The Database Mirroring endpoint is now listening for connections.
2024-07-19 23:14:43.71 spid28s Service Broker manager has started.
2024-07-19 23:14:43.72 spid4s Recovery is complete. This is an informational message only. No user action is required.
2024-07-19 23:14:43.82 spid51 Attempting to load library 'xpstar.dll' into memory. This is an informational message only. No user action is required.
2024-07-19 23:14:43.83 spid51 Using 'xpstar.dll' version '2015.130.1601' to execute extended stored procedure 'xp_instance_regread'. This is an informational message only; no user action is required.
2024-07-19 23:14:47.32 Logon 错误: 18470,严重性: 14,状态: 1。
2024-07-19 23:14:47.32 Logon Login failed for user 'SJ\SJ02$'. Reason: The account is disabled. [客户端: 192.168.3.182]
2024-07-19 23:14:52.33 Logon 错误: 18470,严重性: 14,状态: 1。
2024-07-19 23:14:52.33 Logon Login failed for user 'SJ\SJ02$'. Reason: The account is disabled. [客户端: 192.168.3.182]
2024-07-19 23:14:57.35 Logon 错误: 18470,严重性: 14,状态: 1。
2024-07-19 23:14:57.35 Logon Login failed for user 'SJ\SJ02$'. Reason: The account is disabled. [客户端: 192.168.3.182]
2024-07-19 23:15:02.37 Logon 错误: 18470,严重性: 14,状态: 1。
2024-07-19 23:15:02.37 Logon Login failed for user 'SJ\SJ02$'. Reason: The account is disabled. [客户端: 192.168.3.182]
2024-07-19 23:15:07.39 Logon 错误: 18470,严重性: 14,状态: 1。
2024-07-19 23:15:07.39 Logon Login failed for user 'SJ\SJ02$'. Reason: The account is disabled. [客户端: 192.168.3.182]
2024-07-19 23:15:12.41 Logon 错误: 18470,严重性: 14,状态: 1。
2024-07-19 23:15:12.41 Logon Login failed for user 'SJ\SJ02$'. Reason: The account is disabled. [客户端: 192.168.3.182]
2024-07-19 23:15:15.73 spid62 Attempting to load library 'xpsqlbot.dll' into memory. This is an informational message only. No user action is required.
2024-07-19 23:15:15.73 spid62 Using 'xpsqlbot.dll' version '2015.130.1601' to execute extended stored procedure 'xp_qv'. This is an informational message only; no user action is required.
2024-07-19 23:15:17.42 Logon 错误: 18470,严重性: 14,状态: 1。
2024-07-19 23:15:17.42 Logon Login failed for user 'SJ\SJ02$'. Reason: The account is disabled. [客户端: 192.168.3.182]
2024-07-19 23:15:22.44 Logon 错误: 18470,严重性: 14,状态: 1。
2024-07-19 23:15:22.44 Logon Login failed for user 'SJ\SJ02$'. Reason: The account is disabled. [客户端: 192.168.3.182]
2024-07-19 23:15:27.46 Logon 错误: 18470,严重性: 14,状态: 1。
2024-07-19 23:15:27.46 Logon Login failed for user 'SJ\SJ02$'. Reason: The account is disabled. [客户端: 192.168.3.182]
2024-07-19 23:17:31.94 spid21s Error: 41065, Severity: 16, State: 0.
2024-07-19 23:17:31.94 spid21s Cannot bring the Windows Server Failover Clustering (WSFC) resource (ID: 'c7bc648e-8d1c-43fa-911d-9379059cea14') online at this time. The WSFC resource is not in a state that can accept the request. Wait for the WSFC resource to enter a terminal state, and retry the operation. For information about this error, see error code 5023 in "System Error Codes" in the Windows Development documentation.
2024-07-19 23:17:31.94 spid21s Error: 41160, Severity: 16, State: 0.
2024-07-19 23:17:31.94 spid21s Failed to designate the local availability replica of availability group 'ag-ipmsprod' as the primary replica. The operation encountered SQL Server error 41065 and has been terminated. Check the preceding error and the SQL Server error log for more details about the error and corrective actions.

从日志上看,数据库是能正常启动的,但是在群集管理上看 SQL Server 服务一直处于联机挂起状态。联机挂起期间可正常登录数据库,但是短时间后数据库又会重启(故障转移群集不断联机尝试,直到失败阈值)。

Solution:

故障转移集群 WSFC 通过 NT AUTHORITY\SYSTEM 用户登录数据库并检查数据库状态,该用户不存在或权限丢失将导致群集无法正常识别数据库状态。

登录 SSMS,查看用户 NT AUTHORITY\SYSTEM 是否存在及权限是否正确,可用以下命令创建该用户并授权:

use [master]
GO
CREATE LOGIN [NT AUTHORITY\SYSTEM] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[简体中文]
GO
GRANT VIEW SERVER STATE TO [NT AUTHORITY\SYSTEM] AS [sa]
GO

The SQL Server service online failed

Analysis ServicesSQL Server 服务失败。

sqlserver-service-fail

2024-07-25 16:48:04.24 Server      Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64)
Oct 28 2016 18:17:30
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows Server 2016 Standard 6.3 <X64> (Build 14393: ) (Hypervisor)

2024-07-25 16:48:04.27 Server UTC adjustment: 8:00
2024-07-25 16:48:04.27 Server (c) Microsoft Corporation.
2024-07-25 16:48:04.28 Server All rights reserved.
2024-07-25 16:48:04.28 Server Server process ID is 5928.
2024-07-25 16:48:04.29 Server System Manufacturer: 'VMware, Inc.', System Model: 'VMware7,1'.
2024-07-25 16:48:04.29 Server Authentication mode is MIXED.
2024-07-25 16:48:04.29 Server Logging SQL Server messages in file 'F:\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2024-07-25 16:48:04.29 Server The service account is 'SJ\administrator'. This is an informational message; no user action is required.
2024-07-25 16:48:04.30 Server Registry startup parameters:
-d F:\MSSQL13.MSSQLSERVER\MSSQL\DATA\master.mdf
-e F:\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG
-l F:\MSSQL13.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2024-07-25 16:48:04.30 Server Command Line Startup Parameters:
-s "MSSQLSERVER"
2024-07-25 16:48:04.39 Server SQL Server detected 2 sockets with 2 cores per socket and 2 logical processors per socket, 4 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2024-07-25 16:48:04.39 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2024-07-25 16:48:04.40 Server Detected 8191 MB of RAM. This is an informational message; no user action is required.
2024-07-25 16:48:04.40 Server Using conventional memory in the memory manager.
2024-07-25 16:48:05.82 Server Default collation: Chinese_PRC_CI_AS (简体中文 2052)
2024-07-25 16:48:07.40 Server Buffer pool extension is already disabled. No action is necessary.
2024-07-25 16:48:09.62 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2024-07-25 16:48:09.62 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2024-07-25 16:48:11.33 Server The maximum number of dedicated administrator connections for this instance is '1'
2024-07-25 16:48:11.39 Server This instance of SQL Server last reported using a process ID of 8452 at 2024/7/25 11:36:18 (local) 2024/7/25 3:36:18 (UTC). This is an informational message only; no user action is required.
2024-07-25 16:48:11.54 Server Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2024-07-25 16:48:11.72 Server 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.
2024-07-25 16:48:11.84 Server Database Instant File Initialization: 已启用. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
2024-07-25 16:48:12.04 Server Query Store settings initialized with enabled = 1,
2024-07-25 16:48:12.46 spid5s Starting up database 'master'.
2024-07-25 16:48:13.39 Server CLR version v4.0.30319 loaded.
2024-07-25 16:48:13.96 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
2024-07-25 16:48:14.97 Server Software Usage Metrics is enabled.
2024-07-25 16:48:15.09 spid5s Resource governor reconfiguration succeeded.
2024-07-25 16:48:15.10 spid5s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2024-07-25 16:48:15.13 spid5s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2024-07-25 16:48:16.49 spid5s SQL Trace ID 1 was started by login "sa".
2024-07-25 16:48:16.55 spid5s Server name is 'MSSQLSERVER'. This is an informational message only. No user action is required.
2024-07-25 16:48:16.55 spid5s The NETBIOS name of the local node that is running the server is 'SJ01'. This is an informational message only. No user action is required.
2024-07-25 16:48:16.97 spid15s A self-generated certificate was successfully loaded for encryption.
2024-07-25 16:48:17.00 spid15s Server is listening on [ 192.168.3.185 </i><ipv4> 1433].
2024-07-25 16:48:17.00 spid15s Started listening on virtual network name 'MSSQLSERVER'. No user action is required.
2024-07-25 16:48:17.00 spid15s Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
2024-07-25 16:48:17.00 spid15s Server named pipe provider is ready to accept connection on [ \\.\pipe\$$\MSSQLSERVER\sql\query ].
2024-07-25 16:48:17.01 spid15s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2024-07-25 16:48:17.01 Server 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.
2024-07-25 16:48:17.12 Server The SQL Server Network Interface library successfully registered the Service Principal Name (SPN) [ MSSQLSvc/MSSQLSERVER.sj.com ] for the SQL Server service.
2024-07-25 16:48:17.14 Server The SQL Server Network Interface library successfully registered the Service Principal Name (SPN) [ MSSQLSvc/MSSQLSERVER.sj.com:1433 ] for the SQL Server service.
2024-07-25 16:48:17.95 spid17s A new instance of the full-text filter daemon host process has been successfully started.
2024-07-25 16:48:18.17 spid5s Database mirroring has been enabled on this instance of SQL Server.
2024-07-25 16:48:18.17 spid20s Always On: The availability replica manager is starting. This is an informational message only. No user action is required.
2024-07-25 16:48:18.17 spid20s Always On Availability Groups: Waiting for local Windows Server Failover Clustering service to start. This is an informational message only. No user action is required.
2024-07-25 16:48:18.17 spid23s Starting up database 'DWDiagnostics'.
2024-07-25 16:48:18.17 spid20s Always On Availability Groups: Local Windows Server Failover Clustering service started. This is an informational message only. No user action is required.
2024-07-25 16:48:18.17 spid6s Starting up database 'mssqlsystemresource'.
2024-07-25 16:48:18.17 spid25s Starting up database 'DWConfiguration'.
2024-07-25 16:48:18.17 spid22s Starting up database 'msdb'.
2024-07-25 16:48:18.17 spid20s Always On Availability Groups: Waiting for local Windows Server Failover Clustering node to start. This is an informational message only. No user action is required.
2024-07-25 16:48:18.17 spid27s Starting up database 'ipmsprod'.
2024-07-25 16:48:18.17 spid26s Starting up database 'DWQueue'.
2024-07-25 16:48:18.17 spid20s Always On Availability Groups: Local Windows Server Failover Clustering node started. This is an informational message only. No user action is required.
2024-07-25 16:48:18.17 spid20s Always On Availability Groups: Waiting for local Windows Server Failover Clustering node to come online. This is an informational message only. No user action is required.
2024-07-25 16:48:18.17 spid20s Always On Availability Groups: Local Windows Server Failover Clustering node is online. This is an informational message only. No user action is required.
2024-07-25 16:48:18.17 spid20s Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
2024-07-25 16:48:18.24 spid6s The resource database build version is 13.00.4001. This is an informational message only. No user action is required.
2024-07-25 16:48:18.54 spid6s Starting up database 'model'.
2024-07-25 16:48:20.23 spid6s Polybase feature initialization successful, hadoop connectivity 0x7, node role: 0x1.
2024-07-25 16:48:20.23 spid6s Clearing tempdb database.
2024-07-25 16:48:23.60 spid6s Starting up database 'tempdb'.
2024-07-25 16:48:26.32 spid6s The tempdb database has 4 data file(s).
2024-07-25 16:48:26.38 spid6s TEMPDB configuration for Polybase completed successfully.
2024-07-25 16:48:26.38 spid20s The Service Broker endpoint is in disabled or stopped state.
2024-07-25 16:48:26.41 spid20s Server is listening on [ 192.168.3.185 </i><ipv4> 5022].
2024-07-25 16:48:26.41 spid20s Started listening on virtual network name 'MSSQLSERVER'. No user action is required.
2024-07-25 16:48:26.41 spid20s The Database Mirroring endpoint is now listening for connections.
2024-07-25 16:48:26.80 spid20s Service Broker manager has started.
2024-07-25 16:48:26.81 spid5s Recovery is complete. This is an informational message only. No user action is required.
2024-07-25 16:48:27.29 spid52 Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
2024-07-25 16:48:27.55 spid52 Configuration option 'Agent XPs' changed from 0 to 1. Run the RECONFIGURE statement to install.
2024-07-25 16:48:27.84 spid52 Configuration option 'show advanced options' changed from 1 to 0. Run the RECONFIGURE statement to install.
2024-07-25 16:48:28.70 spid52 Attempting to load library 'xpsqlbot.dll' into memory. This is an informational message only. No user action is required.
2024-07-25 16:48:28.71 spid52 Using 'xpsqlbot.dll' version '2015.130.1601' to execute extended stored procedure 'xp_qv'. This is an informational message only; no user action is required.
2024-07-25 16:48:28.84 spid52 Attempting to load library 'xpstar.dll' into memory. This is an informational message only. No user action is required.
2024-07-25 16:48:28.90 spid52 Using 'xpstar.dll' version '2015.130.1601' to execute extended stored procedure 'xp_sqlagent_notify'. This is an informational message only; no user action is required.
2024-07-25 16:48:52.99 spid103 Attempting to load library C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\Polybase\SharedMemory.dll
2024-07-25 16:48:53.02 spid103 Shared memory segment initialized with name Global\4d5c9fbf9e1947c188003a47aa31c811
2024-07-25 16:53:04.67 spid52 Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
2024-07-25 16:53:04.70 spid52 Configuration option 'Agent XPs' changed from 1 to 0. Run the RECONFIGURE statement to install.
2024-07-25 16:53:04.73 spid52 Configuration option 'show advanced options' changed from 1 to 0. Run the RECONFIGURE statement to install.
2024-07-25 16:53:04.95 spid5s Always On: The availability replica manager is going offline because SQL Server is shutting down. This is an informational message only. No user action is required.
2024-07-25 16:53:04.95 spid5s SQL Server is terminating in response to a 'stop' request from Service Control Manager. This is an informational message only. No user action is required.
2024-07-25 16:53:05.63 spid20s The Database Mirroring endpoint has stopped listening for connections.
2024-07-25 16:53:05.63 spid20s Service Broker manager has shut down.
2024-07-25 16:53:12.39 spid5s .NET Framework runtime has been stopped.
2024-07-25 16:53:13.15 spid5s SQL Server shutdown has been initiated
2024-07-25 16:53:13.15 spid5s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
2024-07-25 16:53:13.28 spid15s The SQL Server Network Interface library successfully deregistered the Service Principal Name (SPN) [ MSSQLSvc/MSSQLSERVER.sj.com ] for the SQL Server service.
2024-07-25 16:53:13.28 spid15s The SQL Server Network Interface library successfully deregistered the Service Principal Name (SPN) [ MSSQLSvc/MSSQLSERVER.sj.com:1433 ] for the SQL Server service.

Solution:

用户 SJ/Administrator 密码过期。

C:\Users\Administrator>net user administrator
用户名 Administrator
全名
注释 管理计算机(域)的内置帐户
用户的注释
国家/地区代码 000 (系统默认值)
帐户启用 Yes
帐户到期 从不

上次设置密码 2023-03-23 09:52:00
密码到期 2023-03-28 09:52:00
密码可更改 2023-03-24 09:52:00
需要密码 Yes
用户可以更改密码 Yes

允许的工作站 All
登录脚本
用户配置文件
主目录
上次登录 2024-07-25 16:50:56

可允许的登录小时数 All

本地组成员 *Administrators
全局组成员 *Domain Admins *Schema Admins
*Enterprise Admins *Group Policy Creator
*Domain Users
命令成功完成。

设置密码永不过期或更改密码。

SQL Server database stuck in restoring

由于 SQLServer 服务反复宕机,恢复联机后,部分数据库处于正在还原... 状态,无法正常使用。

Solution:

数据库事务未回滚,需要手动回滚事务。

RESTORE DATABASE [ipmsprod] WITH RECOVERY
GO