How-to determine the SQL MI Failover Group & HA Replicas Details

Published Sep 14 2021 01:12 AM 850 Views
Microsoft

Continuing on the topic of High Availability and Failover Groups from the previous post on How-to determine the SQL MI Failover Group configuration, in this how-to we shall dive a little bit deeper into the information on the role of the replica we are connected to and the overall available details on the configuration of the High Availability.

 

If you are interested in other posts on how-to discover different aspects of SQL MI - please visit the http://aka.ms/sqlmi-howto, which serves as a placeholder for the series.

 

NikoNeugebauer_0-1631558988040.pngWe have decided to include 5 key attributes to show the relevant information about High Availability configuration. Given that as per current architecture, we are replicating the primary replica from the primary region to the primary replica on the secondary region, and on the Business Critical service tier, the 6 additional secondary replicas spread over the both regions (3 secondaries in primary region and 3 secondaries in the secondary region) are replicated out of the respective primaries and do not posses any information about the Failover – there is no sense to show the total number of replicas, but the total number of the visible replicas.
Even though right now on both available service tiers (General Purpose & Business Critical) it is easy to guess the total number of replicas, even when we are connected to one of the secondary replicas, we are going to provide you with the information that is visible, without guesses, because one day everything can change, but hopefully the T-SQL we are providing will still be able to deliver some good value.

 

The 5 key attributes are:

  • Are we connected to a Primary Replica (There can be 2 in a Failover Group configuration)
  • Are we connected to a Secondary Replica
  • Total number of locally visible secondary replicas (as mentioned above, even though when we are connected to a secondary replica, this information is limited, it is still valuable information when connected to the primary replica and serves High Availability purposes)
  • Are we connected to a GeoReplica from the Failover Groups
  • Is this replica is being Geo-Replicated (it can be replicated without Geo-replication just by the virtue of using Availability Groups on Business Critical service tier)

These 5 attributes will tell us the story about which replica in Failover Groups we are connected to, and if, for that matter, there is a Failover Group or if it visible.

 

Without a lot of further ado, I present you a query for determining those key attributes. These details are extracted from the 2 DMVs - sys.dm_hadr_database_replica_states and sys.dm_hadr_fabric_continuous_copy_status. We have already faced the first DMV in the previous blog post, and the second one is introduced here - it contain information about replication state, roles, replication lag and even more for each of the databases participating in the Failover Group. 

 

 

SELECT IsPrimaryReplica, 
		CASE WHEN DATABASEPROPERTYEX ('master', 'Updateability' ) = 'READ_ONLY' THEN 1 ELSE 0 END as IsHAReplica,
		LocallyVisibleHAReplicas,
		CASE WHEN GeoPartnerName IS NOT NULL AND ReplicaRole != 0 THEN 1 ELSE 0 END as IsGeoReplica,
		CASE WHEN GeoPartnerName IS NOT NULL AND ReplicaRole = 0 THEN 1 ELSE CASE WHEN GeoPartnerName IS NULL AND ReplicaRole IS NULL THEN NULL ELSE 0 END END as IsGeoReplicated
	FROM 
	(SELECT MAX( CAST(is_primary_replica AS INT) ) as IsPrimaryReplica,
			MAX( role ) as ReplicaRole,
			MAX( partner_server ) as GeoPartnerName,
			SUM( CASE WHEN is_primary_replica = 0 AND is_commit_participant = 1 THEN 1 ELSE 0 END ) as LocallyVisibleHAReplicas
		FROM sys.dm_hadr_database_replica_states rs
			LEFT JOIN sys.dm_hadr_fabric_continuous_copy_status fgc
				ON rs.group_id = fgc.physical_database_id
		WHERE rs.database_id = (SELECT ISNULL(MAX(maxsrc.database_id),4) FROM sys.dm_hadr_database_replica_states maxsrc WHERE maxsrc.database_id BETWEEN 5 AND 32759)
	) src;

 

 

Let's consider a simple General Purpose SQL MI, that has no Failover Groups configured, and the result is presented below:

NikoNeugebauer_2-1631560213683.png

We are connected to the primary replica, and there are no other HA Replicas, no Geo Replicas and of course it is not a Geo-Replica.

 

Failover Group on General Purpose service tier

Next step would be to test a General Purpose (GP) SQL Managed Instance that has Failover Group configured and the result is presented below, with the only difference being presented that this primary replica is being Geo-Replicated (see the last column).

NikoNeugebauer_3-1631560355208.pngOf course, we are unable to connect to a local secondary replica, in this case, because the secondary replica in stand-by mode is totally invisible to the customer, until it is needed.

 

Connecting to the other primary replica, that is being replicated to, gives us the identification "10010", meaning that we are connected to a primary read-only replica that is receives replication information from the original, writable replica:

NikoNeugebauer_4-1631560569986.png

 

Failover Group on Business Critical service tier

Switching to a Business Critical (BC) primary replica will get us the following information:

NikoNeugebauer_2-1631565473694.png

We are dealing with a primary replica that has 3 locally visible secondary replicas and it is being replicated to a Geo-Replica in another reigon.

 

Connecting to a secondary read-only replica on Business Critical service tier will produce the following result:

NikoNeugebauer_1-1631564561833.pngThere is no visible secondary replicas and nothing is being replicated from the secondary replica.

 

Failover Group secondary replicas

On the Business Critical primary replica on the secondary region we shall have confirmation of it being a primary replica and the visibility of the local secondary replicas (3 of them), plus the information that this replica serves as a geo-replica:

NikoNeugebauer_0-1631564341154.png

 

Connecting to the readable secondary replica will produce the following result, that corresponds the reality - the replica that we connected to with the help of the parameter (ApplicationIntent=ReadOnly) is just a secondary replica, and it is not being itself a Geo-Replica in the first degree or being geo-replicated (only the primary replica can be geo-replicated). 

NikoNeugebauer_1-1631564561833.png

 

Failover Group with no databases

The last case to consider in our how-to is an empty SQL Managed Instance - without any customer databases, where Failover Groups are not replicating any database yet. In this case we have NULL for the [IsGeoReplicated] column, since without any actual replication, there is no information about the partner server and hence would be a much bigger effort to discover:

NikoNeugebauer_3-1631566541748.png

 

In the next post we shall focus on some of the troubleshooting queries that can be used in order to verify if the replication between different replicas is doing fine.

%3CLINGO-SUB%20id%3D%22lingo-sub-2746995%22%20slang%3D%22en-US%22%3EHow-to%20determine%20the%20SQL%20MI%20Failover%20Group%20%26amp%3B%20HA%20Replicas%20Details%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2746995%22%20slang%3D%22en-US%22%3E%3CP%3EContinuing%20on%20the%20topic%20of%20High%20Availability%20and%20Failover%20Groups%20from%20the%20previous%20post%20on%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Fhow-to-determine-the-sql-mi-failover-group-configuration%2Fba-p%2F2744255%22%20target%3D%22_self%22%3EHow-to%20determine%20the%20SQL%20MI%20Failover%20Group%20configuration%3C%2FA%3E%2C%20in%20this%20how-to%20we%20shall%20dive%20a%20little%20bit%20deeper%20into%20the%20information%20on%20the%20role%20of%20the%20replica%20we%20are%20connected%20to%20and%20the%20overall%20available%20details%20on%20the%20configuration%20of%20the%20High%20Availability.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20are%20interested%20in%20other%20posts%20on%20how-to%20discover%20different%20aspects%20of%20SQL%20MI%20-%20please%20visit%20the%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Faka.ms%2Fsqlmi-howto%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Faka.ms%2Fsqlmi-howto%3C%2FA%3E%2C%20which%20serves%20as%20a%20placeholder%20for%20the%20series.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-left%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22NikoNeugebauer_0-1631558988040.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F310081i1778B2FD95D80886%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22NikoNeugebauer_0-1631558988040.png%22%20alt%3D%22NikoNeugebauer_0-1631558988040.png%22%20%2F%3E%3C%2FSPAN%3EWe%20have%20decided%20to%20include%20%3CU%3E5%20key%20attributes%3C%2FU%3E%20to%20show%20the%20relevant%20information%20about%20High%20Availability%20configuration.%20Given%20that%20as%20per%20current%20architecture%2C%20we%20are%20replicating%20the%20primary%20replica%20from%20the%20primary%20region%20to%20the%20primary%20replica%20on%20the%20secondary%20region%2C%20and%20on%20the%20Business%20Critical%20service%20tier%2C%20the%206%20additional%20secondary%20replicas%20spread%20over%20the%20both%20regions%20(3%20secondaries%20in%20primary%20region%20and%203%20secondaries%20in%20the%20secondary%20region)%20are%20replicated%20out%20of%20the%20respective%20primaries%20and%20do%20not%20posses%20any%20information%20about%20the%20Failover%20%E2%80%93%20there%20is%20no%20sense%20to%20show%20the%20total%20number%20of%20replicas%2C%20but%20the%20total%20number%20of%20the%20visible%20replicas.%3CBR%20%2F%3EEven%20though%20right%20now%20on%20both%20available%20service%20tiers%20(General%20Purpose%20%26amp%3B%20Business%20Critical)%20it%20is%20easy%20to%20guess%20the%20total%20number%20of%20replicas%2C%20even%20when%20we%20are%20connected%20to%20one%20of%20the%20secondary%20replicas%2C%20we%20are%20going%20to%20provide%20you%20with%20the%20information%20that%20is%20visible%2C%20without%20guesses%2C%20because%20one%20day%20everything%20can%20change%2C%20but%20hopefully%20the%20T-SQL%20we%20are%20providing%20will%20still%20be%20able%20to%20deliver%20some%20good%20value.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-left%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%205%20key%20attributes%20are%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAre%20we%20connected%20to%20a%20Primary%20Replica%20(There%20can%20be%202%20in%20a%20Failover%20Group%20configuration)%3C%2FLI%3E%0A%3CLI%3EAre%20we%20connected%20to%20a%20Secondary%20Replica%3C%2FLI%3E%0A%3CLI%3ETotal%20number%20of%20locally%20visible%20secondary%20replicas%20(as%20mentioned%20above%2C%20even%20though%20when%20we%20are%20connected%20to%20a%20secondary%20replica%2C%20this%20information%20is%20limited%2C%20it%20is%20still%20valuable%20information%20when%20connected%20to%20the%20primary%20replica%20and%20serves%20High%20Availability%20purposes)%3C%2FLI%3E%0A%3CLI%3EAre%20we%20connected%20to%20a%20GeoReplica%20from%20the%20Failover%20Groups%3C%2FLI%3E%0A%3CLI%3EIs%20this%20replica%20is%20being%20Geo-Replicated%20(it%20can%20be%20replicated%20without%20Geo-replication%20just%20by%20the%20virtue%20of%20using%20Availability%20Groups%20on%20Business%20Critical%20service%20tier)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThese%205%20attributes%20will%20tell%20us%20the%20story%20about%20which%20replica%20in%20Failover%20Groups%20we%20are%20connected%20to%2C%20and%20if%2C%20for%20that%20matter%2C%20there%20is%20a%20Failover%20Group%20or%20if%20it%20visible.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWithout%20a%20lot%20of%20further%20ado%2C%20I%20present%20you%20a%20query%20for%20determining%20those%20key%20attributes.%20These%20details%20are%20extracted%20from%20the%202%20DMVs%20-%20%3CSTRONG%3Esys.dm_hadr_database_replica_states%3C%2FSTRONG%3E%20and%20%3CSTRONG%3Esys.dm_hadr_fabric_continuous_copy_status%3C%2FSTRONG%3E.%20We%20have%20already%20faced%20the%20first%20DMV%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Fhow-to-determine-the-sql-mi-failover-group-configuration%2Fba-p%2F2744255%22%20target%3D%22_self%22%3Eprevious%20blog%20post%3C%2FA%3E%2C%20and%20the%20second%20one%20is%20introduced%20here%20-%20it%20contain%20information%20about%20replication%20state%2C%20roles%2C%20replication%20lag%20and%20even%20more%20for%20each%20of%20the%20databases%20participating%20in%20the%20Failover%20Group.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-sql%22%3E%3CCODE%3ESELECT%20IsPrimaryReplica%2C%20%0A%20%20CASE%20WHEN%20DATABASEPROPERTYEX%20('master'%2C%20'Updateability'%20)%20%3D%20'READ_ONLY'%20THEN%201%20ELSE%200%20END%20as%20IsHAReplica%2C%0A%20%20LocallyVisibleHAReplicas%2C%0A%20%20CASE%20WHEN%20GeoPartnerName%20IS%20NOT%20NULL%20AND%20ReplicaRole%20!%3D%200%20THEN%201%20ELSE%200%20END%20as%20IsGeoReplica%2C%0A%20%20CASE%20WHEN%20GeoPartnerName%20IS%20NOT%20NULL%20AND%20ReplicaRole%20%3D%200%20THEN%201%20ELSE%20CASE%20WHEN%20GeoPartnerName%20IS%20NULL%20AND%20ReplicaRole%20IS%20NULL%20THEN%20NULL%20ELSE%200%20END%20END%20as%20IsGeoReplicated%0A%20FROM%20%0A%20(SELECT%20MAX(%20CAST(is_primary_replica%20AS%20INT)%20)%20as%20IsPrimaryReplica%2C%0A%20%20%20MAX(%20role%20)%20as%20ReplicaRole%2C%0A%20%20%20MAX(%20partner_server%20)%20as%20GeoPartnerName%2C%0A%20%20%20SUM(%20CASE%20WHEN%20is_primary_replica%20%3D%200%20AND%20is_commit_participant%20%3D%201%20THEN%201%20ELSE%200%20END%20)%20as%20LocallyVisibleHAReplicas%0A%20%20FROM%20sys.dm_hadr_database_replica_states%20rs%0A%20%20%20LEFT%20JOIN%20sys.dm_hadr_fabric_continuous_copy_status%20fgc%0A%20%20%20%20ON%20rs.group_id%20%3D%20fgc.physical_database_id%0A%20%20WHERE%20rs.database_id%20%3D%20(SELECT%20ISNULL(MAX(maxsrc.database_id)%2C4)%20FROM%20sys.dm_hadr_database_replica_states%20maxsrc%20WHERE%20maxsrc.database_id%20BETWEEN%205%20AND%2032759)%0A%20)%20src%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet's%20consider%20a%20simple%20General%20Purpose%20SQL%20MI%2C%20that%20has%20no%20Failover%20Groups%20configured%2C%20and%20the%20result%20is%20presented%20below%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22NikoNeugebauer_2-1631560213683.png%22%20style%3D%22width%3A%20570px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F310095iDCCC992ADEB7B571%2Fimage-dimensions%2F570x50%3Fv%3Dv2%22%20width%3D%22570%22%20height%3D%2250%22%20role%3D%22button%22%20title%3D%22NikoNeugebauer_2-1631560213683.png%22%20alt%3D%22NikoNeugebauer_2-1631560213683.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWe%20are%20connected%20to%20the%20primary%20replica%2C%20and%20there%20are%20no%20other%20HA%20Replicas%2C%20no%20Geo%20Replicas%20and%20of%20course%20it%20is%20not%20a%20Geo-Replica.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-2144709903%22%20id%3D%22toc-hId-2144762693%22%3EFailover%20Group%20on%20General%20Purpose%20service%20tier%3C%2FH3%3E%0A%3CP%3ENext%20step%20would%20be%20to%20test%20a%20General%20Purpose%20(GP)%20SQL%20Managed%20Instance%20that%20has%20Failover%20Group%20configured%20and%20the%20result%20is%20presented%20below%2C%20with%20the%20only%20difference%20being%20presented%20that%20this%20primary%20replica%20is%20being%20Geo-Replicated%20(see%20the%20last%20column).%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22NikoNeugebauer_3-1631560355208.png%22%20style%3D%22width%3A%20565px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F310096iCFE598765B0383DC%2Fimage-dimensions%2F565x47%3Fv%3Dv2%22%20width%3D%22565%22%20height%3D%2247%22%20role%3D%22button%22%20title%3D%22NikoNeugebauer_3-1631560355208.png%22%20alt%3D%22NikoNeugebauer_3-1631560355208.png%22%20%2F%3E%3C%2FSPAN%3EOf%20course%2C%20we%20are%20unable%20to%20connect%20to%20a%20local%20secondary%20replica%2C%20in%20this%20case%2C%20because%20the%20secondary%20replica%20in%20stand-by%20mode%20is%20totally%20invisible%20to%20the%20customer%2C%20until%20it%20is%20needed.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EConnecting%20to%20the%20other%20primary%20replica%2C%20that%20is%20being%20replicated%20to%2C%20gives%20us%20the%20identification%20%2210010%22%2C%20meaning%20that%20we%20are%20connected%20to%20a%20primary%20read-only%20replica%20that%20is%20receives%20replication%20information%20from%20the%20original%2C%20writable%20replica%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22NikoNeugebauer_4-1631560569986.png%22%20style%3D%22width%3A%20561px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F310097iEC93DBBE29A4A1E1%2Fimage-dimensions%2F561x44%3Fv%3Dv2%22%20width%3D%22561%22%20height%3D%2244%22%20role%3D%22button%22%20title%3D%22NikoNeugebauer_4-1631560569986.png%22%20alt%3D%22NikoNeugebauer_4-1631560569986.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-337255440%22%20id%3D%22toc-hId-337308230%22%3EFailover%20Group%20on%20Business%20Critical%20service%20tier%3C%2FH3%3E%0A%3CP%3ESwitching%20to%20a%20Business%20Critical%20(BC)%20primary%20replica%20will%20get%20us%20the%20following%20information%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22NikoNeugebauer_2-1631565473694.png%22%20style%3D%22width%3A%20566px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F310115iF4E958C8AAAF54B4%2Fimage-dimensions%2F566x53%3Fv%3Dv2%22%20width%3D%22566%22%20height%3D%2253%22%20role%3D%22button%22%20title%3D%22NikoNeugebauer_2-1631565473694.png%22%20alt%3D%22NikoNeugebauer_2-1631565473694.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWe%20are%20dealing%20with%20a%20primary%20replica%20that%20has%203%20locally%20visible%20secondary%20replicas%20and%20it%20is%20being%20replicated%20to%20a%20Geo-Replica%20in%20another%20reigon.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EConnecting%20to%20a%20secondary%20read-only%20replica%20on%20Business%20Critical%20service%20tier%20will%20produce%20the%20following%20result%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22NikoNeugebauer_1-1631564561833.png%22%20style%3D%22width%3A%20559px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F310112iBEBE42751DC00736%2Fimage-dimensions%2F559x45%3Fv%3Dv2%22%20width%3D%22559%22%20height%3D%2245%22%20role%3D%22button%22%20title%3D%22NikoNeugebauer_1-1631564561833.png%22%20alt%3D%22NikoNeugebauer_1-1631564561833.png%22%20%2F%3E%3C%2FSPAN%3EThere%20is%20no%20visible%20secondary%20replicas%20and%20nothing%20is%20being%20replicated%20from%20the%20secondary%20replica.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1470199023%22%20id%3D%22toc-hId--1470146233%22%3EFailover%20Group%20secondary%20replicas%3C%2FH3%3E%0A%3CP%3EOn%20the%20Business%20Critical%20primary%20replica%20on%20the%20%3CU%3Esecondary%20region%3C%2FU%3E%20we%20shall%20have%20confirmation%20of%20it%20being%20a%20primary%20replica%20and%20the%20visibility%20of%20the%20local%20secondary%20replicas%20(3%20of%20them)%2C%20plus%20the%20information%20that%20this%20replica%20serves%20as%20a%20geo-replica%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22NikoNeugebauer_0-1631564341154.png%22%20style%3D%22width%3A%20565px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F310110i87B687CE495C50C4%2Fimage-dimensions%2F565x47%3Fv%3Dv2%22%20width%3D%22565%22%20height%3D%2247%22%20role%3D%22button%22%20title%3D%22NikoNeugebauer_0-1631564341154.png%22%20alt%3D%22NikoNeugebauer_0-1631564341154.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EConnecting%20to%20the%20readable%20secondary%20replica%20will%20produce%20the%20following%20result%2C%20that%20corresponds%20the%20reality%20-%20the%20replica%20that%20we%20connected%20to%20with%20the%20help%20of%20the%20parameter%20(ApplicationIntent%3DReadOnly)%20is%20just%20a%20secondary%20replica%2C%20and%20it%20is%20not%20being%20itself%20a%20Geo-Replica%20in%20the%20first%20degree%20or%20being%20geo-replicated%20(only%20the%20primary%20replica%20can%20be%20geo-replicated).%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22NikoNeugebauer_1-1631564561833.png%22%20style%3D%22width%3A%20547px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F310112iBEBE42751DC00736%2Fimage-dimensions%2F547x44%3Fv%3Dv2%22%20width%3D%22547%22%20height%3D%2244%22%20role%3D%22button%22%20title%3D%22NikoNeugebauer_1-1631564561833.png%22%20alt%3D%22NikoNeugebauer_1-1631564561833.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1017313810%22%20id%3D%22toc-hId-1017366600%22%3EFailover%20Group%20with%20no%20databases%3C%2FH3%3E%0A%3CP%3EThe%20last%20case%20to%20consider%20in%20our%20how-to%20is%20an%20empty%20SQL%20Managed%20Instance%20-%20without%20any%20customer%20databases%2C%20where%20Failover%20Groups%20are%20not%20replicating%20any%20database%20yet.%20In%20this%20case%20we%20have%20NULL%20for%20the%20%5B%3CSTRONG%3EIsGeoReplicated%3C%2FSTRONG%3E%5D%20column%2C%20since%20without%20any%20actual%20replication%2C%20there%20is%20no%20information%20about%20the%20partner%20server%20and%20hence%20would%20be%20a%20much%20bigger%20effort%20to%20discover%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22NikoNeugebauer_3-1631566541748.png%22%20style%3D%22width%3A%20545px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F310117iA4C919EACD1EBC31%2Fimage-dimensions%2F545x45%3Fv%3Dv2%22%20width%3D%22545%22%20height%3D%2245%22%20role%3D%22button%22%20title%3D%22NikoNeugebauer_3-1631566541748.png%22%20alt%3D%22NikoNeugebauer_3-1631566541748.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20next%20post%20we%20shall%20focus%20on%20some%20of%20the%20troubleshooting%20queries%20that%20can%20be%20used%20in%20order%20to%20verify%20if%20the%20replication%20between%20different%20replicas%20is%20doing%20fine.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2746995%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22NikoNeugebauer_0-1631564341154.png%22%20style%3D%22width%3A%20565px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F310110i87B687CE495C50C4%2Fimage-dimensions%2F565x47%3Fv%3Dv2%22%20width%3D%22565%22%20height%3D%2247%22%20role%3D%22button%22%20title%3D%22NikoNeugebauer_0-1631564341154.png%22%20alt%3D%22NikoNeugebauer_0-1631564341154.png%22%20%2F%3E%3C%2FSPAN%3EDiscover%20a%20way%20to%20determine%20the%20details%20for%20SQL%20MI%20Failover%20Groups%20and%20High%20Availability%20Replicas%2C%20such%20as%20the%20type%20of%20the%20replica%2C%20Geo-Replication%20role%20and%20total%20number%20of%20locally%20visible%20HA%20replicas.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2746995%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20SQL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20SQL%20Managed%20Instance%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Sep 14 2021 01:12 AM
Updated by: