Επεξεργασία

Κοινή χρήση μέσω


Use the New Availability Group Dialog Box (SQL Server Management Studio)

Applies to: SQL Server

This topic contains information about how to use the New Availability Group dialog box of SQL Server Management Studio to create an Always On availability group on instances of SQL Server that are enabled for Always On availability groups. An availability group defines a set of user databases that will fail over as a single unit and a set of failover partners, known as availability replicas, that support failover.

Note

For an introduction to availability groups, see Overview of Always On Availability Groups (SQL Server).

Note

For information about alternative ways to create an availability group, see Related Tasks, later in this topic.

Prerequisites

  • Before creating an availability group, verify that the instances of SQL Server that host availability replicas reside on different Windows Server Failover Clustering (WSFC) node within the same WSFC failover cluster. Also, verify that each of the server instance is enabled for Always On availability groups and meets all other Always On availability groups prerequisites. For more information, we strongly recommend that you read Prerequisites, Restrictions, and Recommendations for Always On Availability Groups (SQL Server).

  • Before you create an availability group, ensure that every server instance that will host an availability replica has a fully functioning database mirroring endpoint. For more information, see The Database Mirroring Endpoint (SQL Server).

  • To use the New Availability Group dialog box, you need to know the names of the server instances that will host availability replicas. Also, you need know the names of any databases that you intend to add to your new availability group, and you need to ensure that these databases meet the availability database prerequisites and restrictions described in Prerequisites, Restrictions, and Recommendations for Always On Availability Groups (SQL Server). If you enter invalid values, the new availability group will not work.

Limitations

The New Availability Group dialog box does not:

  • Create an availability group listener.
  • Join secondary replicas to the availability group.
  • Perform initial data synchronization.

For information about these configuration tasks, see Follow Up: After Creating an Availability Group, later in this topic.

Permissions

Requires membership in the sysadmin fixed server role and either CREATE AVAILABILITY GROUP server permission, ALTER ANY AVAILABILITY GROUP permission, or CONTROL SERVER permission.

Using the New Availability Group Dialog Box (SQL Server Management Studio)

To create an availability group

  1. In Object Explorer, connect to the server instance that hosts the primary replica, and click the server name.

  2. Expand the Always On High Availability node.

  3. Right-click the Availability Groups node, and select the New Availability Group command.

  4. This command opens up the New Availability Group dialog box.

  5. On the General page, use the Availability group name field to enter a name for the new availability group. This name must be a valid SQL Server identifier that is unique across all availability groups in the WSFC cluster. The maximum length for an availability group name is 128 characters.

  6. In the Availability Databases grid, click Add and enter the name of a local database that you want to belong to this availability group. Repeat this for every database to be added. When you click OK, the dialog will verify whether your specified database meet the prerequisites for belonging to an availability group. For information about these prerequisites, see Prerequisites, Restrictions, and Recommendations for Always On Availability Groups (SQL Server).

  7. In the Availability Databases grid, click Add and enter the name of a server instance to host a secondary replica. The dialog will not attempt to connect to these instances. If you specify an incorrect server name, a secondary replica will be added but you will be unable to connect to that replica.

    Tip

    If you have added a replica and cannot connect to the host server instance, you can remove the replica and add a new one. For more information, see Remove a Secondary Replica from an Availability Group (SQL Server) and Add a Secondary Replica to an Availability Group (SQL Server).

  8. On the Select a page pane of the dialog box, click Backup Preferences. Then, on the Backup Preferences page, specify where backups should occur based on replica role and assign backup priorities to each server instances that will host an availability replica for this availability group. For more information, see Availability Group Properties: New Availability Group (Backup Preferences Page).

  9. To create the availability group, click OK. This causes the dialog to verify whether that specified databases meet the prerequisites.

    To exit the dialog box without creating the availability group, click Cancel.

Follow Up: After Using the New Availability Group Dialog Box to Create an Availability Group

Related Tasks

To configure availability group and replica properties

To complete availability group configuration

Alternative ways to create an availability group

To enable Always On Availability Groups

To configure a database mirroring endpoint

To troubleshoot Always On Availability Groups configuration

Related Content

See Also

Overview of Always On Availability Groups (SQL Server)
The Database Mirroring Endpoint (SQL Server)
Availability Group Listeners, Client Connectivity, and Application Failover (SQL Server)
Prerequisites, Restrictions, and Recommendations for Always On Availability Groups (SQL Server)