Adding a database to a SQL Server Availability Group


Before you begin

  • You must have a SQL Server Availability Group and a database not in the Availability Group but on an instance hosting a replica of the group.

To add a database to a SQL Server Availability Group

  1. From the Management Console, navigate to the Availability Group on which you want to add the database.
  2. Make sure that the primary replica of the Availability Group is on the SQL Server instance that contains the database you want to add. If it is not, follow the instructions in Failing-over-a-SQL-Server-Availability-Group to fail the primary replica over to the appropriate instance.
  3. Select Provision > Add Database to SQL Server Availability Group.
  4. In the General page, populate the following fields, and click Next.

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

    The [confluence_table-plus] macro is a standalone macro and it cannot be used inline. Click on this message for details.

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

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

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

  8. 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.

  9. 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.
  10. Specify your verification preferences.
    For additional information, see Understanding-pre-verification-tests.
    • To continue with adding the databases to the Availability Group after the pre-verification tests have been successfully run without manual intervention, select Automatically Continue If All Tests Succeed.
    • To add the database to the Availability Group without first having 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.

  11. Click Add Database to SQL Server Availability Group.
    A progress page appears followed by a success message upon completion. The new databases now appear in the Contents page for this SQL Server Availability Group.

    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.

 

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