Azure SQL MI how to stop sync from primary node to secondary node in failover group

Li, Jindong 46 Reputation points
2025-04-15T01:48:42.3533333+00:00

Hi,

In our case, I need migration data to Azure SQL MI, and the SQL MI have failover group and a secondary node.

I want know how to stop syncing data from primary node to secondary node when we are migrating data to primary node. Or if I remove secondary node, before I add it back to failover group, what operation need I do for secondary node?

best regards,

Jindong

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. PratikLad 800 Reputation points Microsoft External Staff
    2025-04-23T12:24:12.78+00:00

    Hi Li, Jindong,

    There is no built-in tool to just "pause" or "stop" synchronization from the portal or single command, as geo-replication is designed for high availability.

    In SQL MI, failover groups replicate all user databases between the primary and secondary instances. You cannot remove individual databases from the failover group. it’s an all-or-nothing setup.

    To delete the secondary instance from the failover group, you need to delete the failover group in Azure SQL Managed Instance. The secondary MI becomes a standalone copy of the primary as of the time replication was broken. You can later re-establish the failover group if needed.

    • To Removes an Azure SQL Database managed instance Failover Group, follow below command:
    
    Remove-AzSqlDatabaseFailoverGroup -ResourceGroupName "ResourceGroup" -ServerName "PrimaryServer" -FailoverGroupName "FailoverGroup"
    
    

    https://learn.microsoft.com/en-us/powershell/module/az.sql/remove-azsqldatabasefailovergroup?view=azps-13.4.0

    • To Add Secondary Node Back to the Failover Group use below command:
    
    Add-AzSqlDatabaseFailoverGroup -ResourceGroupName "ResourceGroup" -ServerName "PrimaryServer" -PartnerServerName "SecondaryServer" -FailoverGroupName "FailoverGroup"
    
    

    https://learn.microsoft.com/en-us/powershell/module/az.sql/add-azsqldatabasetofailovergroup?view=azps-13.4.0


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.