This is going to be a bit of a quick post but one about something that I see coming up time and time again on SQL Undercover's search terms. How do I find an availability group's primary server? A while back, Adrian put together a bunch of queries for Always On Availability Groups, 7 ways... Continue Reading →
Availability Groups and Redo Latency, Data Committed on a Primary isn’t Visible on a Synchronous Secondary
If you're running availability groups it may seem like a great idea to offload your read only reporting workloads to a secondary. There are a couple of ways that you could do that, you could use read only routing or simply just point those reports directly at a read only secondary (read only routing is... Continue Reading →
To use ALTER DATABASE, the database must be in a writable state in which a checkpoint can be executed. – when moving files on an Availability Group secondary.
Here's a little error that I stumbled across the other day when trying to migrate the data files of an Availability Group secondary node onto a nice new SAN. I started off by running the following command against the secondary server. ALTER DATABASE SQLUndercover MODIFY FILE (NAME = 'AG01', FILENAME = 'E:\DATA\AG01.mdf') There's nothing wrong... Continue Reading →
7 more ways to Query Always on Availability groups
Post Updated: Replaced Query 3 with transactions/sec query. When we first published 7 ways to Query Always On Availability Groups using SQL we had no idea it would so popular! So here is a quick post with 7 more ways to query Always on availability groups using TSQL, its always handy to have a few little... Continue Reading →
sp_AGReconfigure 1.1 is now available
sp_AGReconfigure 1.1 is now available HERE and on GitHub V1.1 includes a new Parameter and some minor bug fixes: @Readable NULL - DEFAULT: Ignore Readable secondary check (acts as though you are using V1) 0 - Produce a statement to switch readable secondary off if switched on 1 - Produce a statement to switch readable... Continue Reading →
Creating a SQL Server Test Lab On Your Workstation – Part Three, Creating a Windows Failover Cluster and a SQL Server Availability Group
Welcome along to the third part of our series 'Creating a SQL Server Test Lab On Your Workstation'. If you've followed along with the first two parts, you should have a domain setup and a SQL Server joined to it. In this part, we're going to look at building a cluster and creating an Availability... Continue Reading →
UNDERCOVER TOOLBOX: sp_AGReconfigure – Manage Always on Sync & Failover settings from a single stored procedure.
08 Jan 2018 - V1.1 released - Details here Most of the time the goto is to use the GUI which is a nice graphical way of doing it which can make configuring the settings somewhat easier , but this comes with a cost - the cost being time! I have lost count of the... Continue Reading →
Failed to perform AlwaysOn Manual Failover using the wizard – Availability-group DDL Operations are permitted only when you are using the master database .
Routine maintenance rolls around and it's time to failover your AG's to new Primary's to allow for patching and restarts... the weapon of choice will be the SSMS Failover wizard - and why not its does the job nicely and give us some nice visuals as it progresses through each failover. On this... Continue Reading →
7 ways to Query Always On Availability Groups using SQL
There are multiple ways to query availability group information, below are some of my favourite goto queries when I need to obtain information about Always on Availability groups for various tasks. Show All availability groups visible to this server where this Server is the Primary replica Show All availability... Continue Reading →
View your Failover Cluster from the DMV’s
Just a quick post this time , I was fumbling around the DMV's the other day looking for a specific Availability group DMV that I just couldn't remember the name of - I think we have all been there before with some of the DMV names! 🙂 Whilst I was combing through various combinations of... Continue Reading →