Verify an Availability Group with SharePoint 2013

I’ve been working in the lab recently on a SharePoint 2013 farm. My coworker Adam and I were experimenting with setting up an AlwaysOn availability group for the Content database. After setting up our availability group with a  couple database servers, HA1 and HA2, we wanted to run through a quick series of steps to make sure everything was functioning normally. So here’s what we did:

After checking that our availability-group dashboard was showing green/Healthy, we uploaded a document to a document library in our farm. Our goal was to see if the document made it to both HA1 and HA2 at the database layer. It’s fairly easy to check the primary database. You can use SQL Server Management Studio to connect to the primary database server and run a query like the following against the Content database: select * from AllDocs order by TimeCreated desc (The LeafName column contains the name of the uploaded document – see AllDocs Table.)

Checking the secondary database isn’t quite as simple, because you typically can’t run queries against the secondary. We shut down our primary database-server virtual machine (see Failover and Failover Modes for more info) and waited a few minutes. After the secondary took over the primary role, which didn’t take too long – a couple minutes, we were able to run our query against the new primary and check that the document had indeed made it into both databases.

Comments (0)

Skip to main content