Adding an availability database to an Availability Group

In this recipe, we will add an availability database to an Availability Group.

Getting ready

Before we proceed with this recipe, ensure that you have already created the availability group in the primary instance.

The prerequisites for adding an availability database, as documented on MSDN, are as follows:

  • You must be connected to the server instance that hosts the primary replica
  • The database must reside on the server instance that hosts the primary replica and comply with the prerequisites and restrictions for availability databases

How to do it...

Perform the following steps to add an availability database to an existing availability group:

  1. Open PowerShell ISE as an administrator.
  2. Add the following ...

Get SQL Server 2014 with PowerShell v5 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.