Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

Phase 6: Create Availability Groups on Virtual Machines

Updated: April 2, 2014

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

This is the sixth and final phase of deploying SharePoint with SQL Server AlwaysOn in Azure Infrastructure Services, which includes creating availability groups on virtual machines.

For the previous phase, see Phase 5: Configure AlwaysOn Availability Groups.

For all of the phases of this deployment, see Deploying SharePoint with SQL Server AlwaysOn in Azure.

This deployment of SharePoint with SQL Server AlwaysOn is designed to accompany the SharePoint with SQL Server AlwaysOn Infographic and incorporate the latest recommendations.

Create the Availability Group and Add Databases

You can now add databases to the Availability Group. SharePoint creates several databases as part of the initial configuration. Those databases must be prepared, and the preparation consists of two steps. For each database:

  1. Take a full backup and a transaction log backup of the database on the primary machine.

  2. Restore the full and log backups on the backup machine.

Once the databases have been both backed up and restored, they can be added to the availability group. SQL Server only allows databases that have been backed up (at least once), and restored on another machine, to be in the group.

Share the Backup Folders

To enable backup and restore, the backup files (.bak) must be accessible from the second SQL Server host VM. Use the following procedure:

  1. Log on to the primary SQL Server Host as <domainName>.com\sp_farm_db.

  2. Navigate to the F:\ disk.

  3. Right-click the Backup folder and click Share with and click specific people.

  4. In the File sharing dialog, type sqlservice@<domainName>.com.

  5. Then click Add.

  6. Click the Permission Level column for the account name, and click Read/Write. On the backup SQL Server host, give the account only Read permission.

  7. Click the Share button.

  8. Click the Done button.

Backing Up and Restoring a Database

The procedure here must be repeated for every database that needs to be part of the availability group.

To back up a database

  1. Log on to the primary SQL Server host machine as <domainName>.com\sp_farm_db.

  2. Open SQL Server Management Studio and log in as sp_farm_db.

  3. Expand the Databases node.

  4. Right-click a database to back up and click Tasks, then click Backup.

  5. In the Source section, keep Backup type set to Full. In the Destination section, click Remove to remove the default file path for the backup file.

  6. In the File name text box, type \\<machineName>\backup\<databaseName>.bak. Then, click OK, and then click OK again to back up the database. When the backup operation completes, click OK again to close the dialog.

  7. Next, take a transaction log backup of the database. In the Object Explorer, expand Databases, then right-click <databaseName>, then point to Tasks, and then click Back Up.

  8. In Backup type, select Transaction Log. Keep the Destination file path set to the one you specified earlier and click OK. Once the backup operation completes, click OK again.

  9. Keep the remote desktop session open if you have not yet created the Availability group.

To restore a database

  1. Log on to the second SQL Server host machine as <domainName>.com\sp_farm_db.

  2. Open SQL Server Management Studio and log in as sp_farm_db.

  3. In the Object Explorer, right-click Databases and click Restore Database.

  4. In the Source section, select Device, and click the button

  5. In Select backup devices, click Add.

  6. In Backup file location, type \\<machineName>\backup, then click Refresh, then select <databaseName>.bak, then click OK, and then click OK again. You should now see the full backup and the log backup in the Backup sets to restore pane.

  7. Go to the Options page. In Recovery state select RESTORE WITH NORECOVERY, and then click OK to restore the database. Once the restore operation completes, click OK.

Creating an Availability Group

After at least one database is prepared (using the backup and restore method), create an Availability Group.

To create an Availability Group

  1. Return to the remote desktop session (the primary SQL Server host VM).

  2. In SQL Server Management Studio, in the Object Explorer, right-click AlwaysOn High Availability and click New Availability Group Wizard.

    Availability Group Wizard
  3. In the Introduction page, click Next.

  4. In the Specify Availability Group Name page, type AG1 in Availability group name. Then click Next.

  5. In the Select Databases page, select the database that was backed up, and click Next. The database meets the prerequisites for an availability group because you have taken at least one full backup on the intended primary replica.

    Select a prepared database
  6. In the Specify Replicas page, click Add Replica.

  7. The Connect to Server dialog appears. In the Server name box type the name of the second SQL Server host: <BackupMachineName>. Then click Connect.

  8. In the Specify Replicas page, the backup SQL Server host is listed in Available Replicas. For both instances, set the following option values:

     

    Server Option Value

    Primary SQL Server

    Automatic Failover (Up to 2)

    Selected

    Backup SQL Server

    Automatic Failover (Up to 2)

    Selected

    Primary SQL Server

    Synchronous Commit (Up to 3)

    Selected

    Backup SQL Server

    Synchronous Commit (Up to 3)

    Selected

    Primary SQL Server

    Readable Secondary

    Yes

    Backup SQL Server

    Readable Secondary

    Yes

  9. Click Next.

  10. On the Select Initial Data Synchronization page, select Join only and click Next. Data synchronization is executed manually by taking the full and transaction backups on the primary server, and restoring it on the backup. You can instead choose to select Full to let the New Availability Group Wizard perform data synchronization for you. However, synchronization is not recommended for large databases that are found in some enterprises.

  11. On the Validation page, click Next. There is a warning for a missing listener configuration because an availability group listener is not configured. This step is skipped because availability group listeners are not currently supported on Azure Virtual Machines.

  12. On the Summary page, click Finish. Once the wizard is finished, inspect the Results page to verify that the availability group is successfully created. If so, click Close to exit the wizard.

  13. From the Start menu, open the Server Manager again. Expand Features, Failover Cluster Manager, <DomainName>.com, and then expand Services and applications. A new clustered service called AG1 appears in Cluster1. AG1 does not have an IP address by which database clients can connect to the availability group. This lack is by design, because the Azure Virtual Network does not support static IP addresses.

Next Steps

For more information about operating the SharePoint deployment, see Operate and maintain SharePoint farm on Azure. For a list of resources, see SharePoint 2013 Resource Centers.

For all of the phases of this deployment, see Deploying SharePoint with SQL Server AlwaysOn in Azure.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.