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.
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.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
To prevent this problem, use one of the following methods:
Note We recommend that you use this method if possible.
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.
Note You can use this method when you cannot afford downtime to make password changes.
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.
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
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.
Microsoft SQL Server 2005 Developer Edition, Microsoft SQL Server 2005 Enterprise Edition, Microsoft SQL Server 2005 Standard Edition, Microsoft SQL Server 2008 Developer, Microsoft SQL Server 2008 Enterprise, Microsoft SQL Server 2008 Standard, Microsoft SQL Server 2008 R2 Developer, Microsoft SQL Server 2008 R2 Enterprise, Microsoft SQL Server 2008 R2 Standard, Microsoft SQL Server 2012 Developer, Microsoft SQL Server 2012 Enterprise, Microsoft SQL Server 2012 Standard