Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Cannot create a high-availability group in Microsoft SQL Server 2012


View products that this article applies to.

Symptoms

When you try to create a high-availability group in Microsoft SQL Server 2012, you receive the following error message:

Msg 41131, Level 16, State 0, Line 2
Failed to bring availability group 'availability_group' online. The operation timed out. Verify that the local Windows Server Failover Clustering (WSFC) node is online. Then verify that the availability group resource exists in the WSFC cluster. If the problem persists, you might need to drop the availability group and create it again.

↑ Back to the top


Cause

This issue occurs if the [NT AUTHORITY\SYSTEM] account is missing from the SQL Server logon or if the account lacks the necessary permissions to create the high-availability group.

↑ Back to the top


Resolution

To resolve this issue, use one of the following methods.

Method 1: Use manual steps
  1. Create a logon in SQL Server for the [NT AUTHORITY\SYSTEM] account on each SQL Server computer that hosts a replica in your availability group.
  2. Grant the [NT AUTHORITY\SYSTEM] account the following server-level permissions:
    • Alter Any Availability Group
    • Connect SQL
    • View server state

    Note Make sure that no other permissions are granted to the account.
Method 2: Use script
  1. To create the [NT AUTHORITY\SYSTEM] account, run the following in a query window:

    USE [master]
    GO
    CREATE LOGIN [NT AUTHORITY\SYSTEM] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
    GO

  2. To grant the permissions to the [NT AUTHORITY\SYSTEM] account, run the following in a query window:

    GRANT ALTER ANY AVAILABILITY GROUP TO [NT AUTHORITY\SYSTEM]
    GO
    GRANT CONNECT SQL TO [NT AUTHORITY\SYSTEM]
    GO
    GRANT VIEW SERVER STATE TO [NT AUTHORITY\SYSTEM]
    GO

↑ Back to the top


More Information

The [NT AUTHORITY\SYSTEM] account is used by SQL Server AlwaysOn health detection to connect to the SQL Server computer and to monitor health. When you create an availability group, health detection is initiated when the primary replica in the availability group comes online. If the [NT AUTHORITY\SYSTEM] account does not exist or does not have sufficient permissions, health detection cannot be initiated, and the availability group cannot come online during the creation process.

Make sure that these permissions exist on each SQL Server computer that could host the primary replica of the availability group.  

Note The Resource Host Monitor Service process (RHS.exe) that hosts SQL Resource.dll can be run only under a System account.

For more information, see Troubleshooting automatic failover problems in SQL Server 2012 AlwaysOn environments .

↑ Back to the top


Keywords: kbexpertiseinter, kbprb, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2847723
Revision : 1
Created on : 1/7/2017
Published on : 6/6/2013
Exists online : False
Views : 206