Creating a SQL Server Availability Group


Before you begin

BMC Database Automation (BDA) can discover SQL Server Availability Groups which you can then approve to use in BDA. For a walkthrough, see Walkthrough-Discovering-and-approving-SQL-Server-Availability-Groups.

Note

There must be two or more SQL Server Instances on two or more different nodes of a WSFC cluster, and there must be at least one database with a full backup on one of those instances. Databases must meet all of Microsoft's stated requirements for participating in Available Groups. BDA performs checks against these requirements.

Prerequisites for creating a SQL Server Availability Group

The following are Microsoft's prerequisites for creating Availability Groups:

  • Availability Groups can only be created for SQL Server 2012 or later.
  • Computers hosting the SQL Server instance that is part of the Availability Group must be nodes in the same Windows Server Failover Cluster (WSFC).
  • You cannot have more than one instance on the same node participating in an Availability Group.
  • Each instance participating in an Availability Group can only host one replica of the Availability Group.
  • Only a single SQL Server instance can host the primary replica of the databases in an Availability Group at one time.
  • You cannot have instances of different SQL Server versions in the same Availability Group, and Microsoft only supports SQL Server Enterprise Edition Instances for creating Availability Groups.

To create a SQL Server Availability Group

  1. From the Management Console, navigate to the cluster on which you want to add an Availability Group.
  2. Select Provision > Add SQL Server Availability Group.
  3. In the Naming page, populate the following fields, and click Next.

  4. In the Databases Selection page, populate the following fields, and click Next.

  5. In the Replicas Selection page, populate the following fields, and click Next.

  6. In the Endpoints page, configure the endpoint settings for the selected instances and click Next.

    The [confluence_table-plus] macro is a standalone macro and it cannot be used inline.
    In the Backup Settings and Priorities page, populate the following fields, and click Next.

  7. In the Listener Configuration page, configure the Availability Group listener, and click Next.

  8. In the Synchronization Settings page, select what type of synchronization is used to create the Availability Group, and click Next.

  9. In the Custom Scripts Configuration page, select any pre-provisioning or post-provisioning scripts that you want to run as follows, and click Next.

  10. In the Job Options page, specify any of the following Job options, and click Next.

  11. If the Change Control page displays, populate the following fields, and click Next.

    Note

    The Change Control page appears only when change control is configured for your environment. See Configuring-change-control.

  12. In the Summary page, review the provisioning information.
    To make changes, do the following:
    1. Click Go to to return to the provisioning step that you want to edit.
    2. Make your changes.
    3. Click Save and Review to return to the Summary page.
  13. Specify your verification preferences.
     For additional information, see Understanding-pre-verification-tests.
    • To continue creating the Availability Group after the pre-verification tests have been successfully run without manual intervention, select Automatically Continue If All Tests Succeed.
    • To create the Availability Group without having to first run the pre-verification steps, select Skip Pre-Verification Tests.

      Note

      The Skip Pre-Verification Tests option should only be used when you are certain all tests can succeed. The option skips verification and advances directly to the actual provisioning activity.

  14. Click Create SQL Server Availability Group.
    A progress page appears followed by a success message upon completion. The databases, replicas, and listeners now appear in the Contents page for this SQL Server Availability Group. The new Availability Group appears as a child of a Windows Cluster in the Grid, designated by a double-database icon (AvGp Context Tree icon.gif). For more information about the information on the Availability Group Configuration page, see Walkthrough-Discovering-and-approving-SQL-Server-Availability-Groups.

    Note

    Detailed current and historical information about this action can be viewed in the Jobs section of the Management Console. See Monitoring-jobs-and-viewing-job-history.

    To add a database to an Availability Group, see Adding-a-database-to-a-SQL-Server-Availability-Group. To configure failover, see Failing-over-a-SQL-Server-Availability-Group.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*