Blog Post

Azure SQL Blog
3 MIN READ

Online disaster recovery between SQL Server 2022 and Azure SQL Managed Instance is now GA

DjordjeJeremic's avatar
Oct 10, 2024

Today, we are announcing the general availability of the following two major capabilities of the Managed Instance link feature with SQL Server 2022:

 

  • Two-way failover between SQL Server 2022 and SQL Managed Instance through the link to unlock true disaster recovery (DR) with AzureBi-directional failover between SQL Server 2022 and SQL Managed Instance
  • Creating a link from SQL Managed Instance to SQL Server 2022 to unlock off-PaaS data mobility for regulatory and dev/test scenarios Creating the link from Azure SQL Managed Instance to SQL Server 2022

These two link feature capabilities have been previously in public preview.

 

We’re also really pleased to share the details of these notable updates within the link feature space.

 

Simplified T-SQL link failover

 

Starting with SSMS 20.2, you can now fail over a link by using Transact-SQL (T-SQL), which also simplifies the steps executed by the Failover wizard in SSMS.

 

You can now initiate a planned failover from the primary instance by using a single T-SQL command:

SQL

--Execute on the instance (SQL Server or SQL MI) hosting the primary database replica

ALTER AVAILABILITY GROUP [<DAGname>] FAILOVER

 

Similarly, you can now initiate a forced failover from the secondary instance using a single T-SQL command:

SQL

--Execute on the instance (SQL Server or SQL MI) hosting the secondary database replica

ALTER AVAILABILITY GROUP [<DAGname>] FORCE_FAILOVER_ALLOW_DATA_LOSS

 

These improvements help:

  • Link users manage multiple links simultaneously, so they can create a script to fail over multiple link failovers in parallel.
  • Simplify failover by removing external orchestration of planned failovers to eliminate possible user error.

For more details, please visit Fail over link - Azure SQL Managed Instance | Microsoft Learn.

 

Easily drop a link in SSMS

 

A dedicated wizard has been added to SSMS to easily drop a link, without waiting for data synchronization. Although in some scenarios (migration, or one-way failover to Azure SQL Managed Instance), the link is dropped automatically, there may be other situations where a user wants to drop a link manually. This new wizard makes it easy to do so, cleaning up artifacts and metadata on both SQL Server and Azure SQL Managed Instance.

 

For more details, please visit Configure link with SSMS - Azure SQL Managed Instance | Microsoft Learn.

 

New link feature how to guides and doc improvements

 

We’ve improved the quality and depth of our link feature documentation with the addition of several how to guides, and an expansion of the best practices article.  To explore this new content, please visit Configure & manage content reference - Azure SQL Managed Instance | Microsoft Learn.

 

Update policy for Azure SQL Managed Instance and the link feature

 

Recently, the update policy setting was added to Azure SQL Managed Instance, giving customers the powers to choose between a database format that aligns with SQL Server 2022, or a database format that allows early adoption of SQL engine features available to SQL Managed Instance customers.  

 

Please note that using the link with SQL Server 2022 requires your SQL Managed Instance to be configured with the SQL Server 2022 update policy. The SQL Server 2022 update policy supports data replication through the link, and database mobility between SQL Server 2022 and Azure SQL Managed Instance. After switching your instance to the Always-up-to-date update policy, you will no longer be able to restore your SQL Managed Instance database to SQL Server 2022, or replicate data from SQL Managed Instance to SQL Server 2022 through the link. Updating to the Always-up-to-date update policy is irreversible.

 

Improved Azure CLI and PowerShell support for the link

 

Azure CLI and Azure PowerShell support for the link is currently partial and limited to replication from SQL Server to Azure SQL Managed Instance. Full native Azure CLI and Azure PowerShell commands are scheduled to be released by the end of 2024, including two-way failover between SQL Server 2022 and SQL Managed Instance, and creating a link with Azure SQL Managed Instance as the initial primary to replicate from Azure to SQL Server 2022.

 

Links to Azure CLI and Azure PowerShell reference content will be added to this blog post once they're available, so stay tuned!

 

See also

Updated Oct 16, 2024
Version 4.0