We will go through an example to ensure an AG failover does not break Managed Instance Link.
Updated Sep 19, 2025
Version 2.0This guide is out of date.. Probably needs to look like this or something similar:
New-AzSqlInstanceLink -InstanceName $ManagedInstanceName -Name $DAGName -PartnerAvailabilityGroupName $AGNameOnSQLServer -ResourceGroupName $ResourceGroup -InstanceAvailabilityGroupName $AGNameOnSQLMI -PartnerEndpoint $SourceIP -Database $DatabaseName
Hi Mario, thank you for the post. I have updated the post to reflect the current version on Azure Cloud Shell.