SQL Server Failover Cluster Instance is taken offline when you change the password for the service account on the passive node

Applies to: Microsoft SQL Server 2005 Developer EditionMicrosoft SQL Server 2005 Enterprise EditionMicrosoft SQL Server 2005 Standard Edition

Source: Microsoft Support

RAPID PUBLISHING


RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

Symptom


Consider the following scenario:
  • You have a SQL Server Failover instance that has 2 or more nodes.
  • You try to change the password for a SQL Server virtual instance on one of the passive nodes by using SQL Server Management Studio or by using the WMI Provider for Configuration Management.

In this scenario, you expect that the SQL Server instance remains online on the active node. Instead, you find that the instance actually goes offline.


Status


Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

Workaround


To prevent this problem, use one of the following methods:

Method 1

Note We recommend that you use this method if possible.

Schedule the password change during a maintenance window and change the password of the service accounts on each node of the failover cluster with the instance actively running on that node. The password must be changed through Configuration Manager as discussed in How to: Change the Password of the Accounts Used by SQL Server (SQL Server Configuration Manager).

Note When you change the password of the SQL Server service account by using the configuration manager on the active node, this does not change the password for the service account on the passive node. So if you do not change the password on each of the nodes as mentioned above, when a failover occurs, the service account uses the old password and the services using the account will fail to come online on that node with the following error message:

The SQL Server (MSSQLSERVER) service failed to start due to the following error:
The service did not start due to a logon failureThe MSSQLSERVER service was unable to log on as <Domain\ServiceAcct> with the currently configured password due to the following error:
Login failure: unknown user name or bad password.


Method 2

Note You can use this method when you cannot afford downtime to make password changes.
  1. On the current active node change the password using SQL Server Configuration manager as discussed in How to: Change the Password of the Accounts Used by SQL Server (SQL Server Configuration Manager).
  2. On each of the passive nodes, change the password of the SQL Service account using Service Control manager (Services.msc), immediately after the passwords are changed on the active node through Configuration Manager.

More Information


If you change the password programmatically by using the WMI Provider for Configuration Manager, find the owner node and connect to it when you get the SQLService Class object.

Refer to the following example script if you use this method:

Option Explicit 

Dim oCluster, oResource, oClusProperty ' Cluster Object, Resource Object, ClusProperty Object Dim strCluster, strResource ' Cluster name, Resource name Dim strWQL, strInstance, strOwnerNode, strPassword ' WMI Query, SQL Server Instance name, Owner node hostname, Password Dim oSqlSvc ' SqlService ClassstrCluster = "ClusterName" ' Cluster Network Name strResource = "SQL Server" ' Resource Name of SQL Server Resource strInstance = "MSSQLSERVER" ' Instance Name. MSSQL$InstanceName if named instances strPassword = "password" ' New password

' Get the owner node of the resource

Set oCluster = CreateObject("MSCluster.Cluster") oCluster.Open strCluster For Each oResource In oCluster.Resources If oResource.Name = strResource Then If oResource.State = 2 Then ' Online For Each oClusProperty in oResource.OwnerNode.CommonROProperties If oClusProperty.Name = "NodeName" Then strOwnerNode = oClusProperty End If Exit For
Next

Else

strOwnerNode = "." ' Connect to the local node if the resource is offline
End If
Exit For
End If
Next

' Create WMI Query string

strWQL = "" strWQL = strWQL & "WINMGMTS:\\" & strOwnerNode & "\root\Microsoft\SqlServer\ComputerManagement" strWQL = strWQL & ":SqlService.ServiceName='" & strInstance & "'" strWQL = strWQL & ",SQLServiceType=1" 'Set the password.

Set oSqlSvc = GetObject(strWQL) oSqlSvc.SetServiceAccountPassword "", strPassword


References


For more information, see the following:

DISCLAIMER


MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.


TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.