Link feature for Managed Instance (MI link) was launched to the public preview back in March of 2022, as a solution that reimagines the hybrid connection between SQL Server hosted anywhere and Azure SQL Managed Instance. Today we are excited to announce general availability (GA) of the link feature for managed instance for SQL Server 2022. We are also excited to announce a limited public preview of the managed disaster recovery (DR) between SQL Server 2022 and Azure SQL Managed Instance.
About MI link
With an approach that uses near real-time data synchronization to Azure using Always On technology, you can scale workloads, or analytics to read-only secondaries in Azure to take advantage of a fully managed database platform, performance, and scale. The link can be operated for as long as you need it – months and years at a time, empowering you to get all the modern benefits of Azure today without migrating to the cloud.
Databases synchronized through the link feature from SQL Server 2022 to Azure SQL Managed Instance can be used with several scenarios, such are:
The link feature offers the following functionality:
What’s new – improvements made
Since our announcement of the public preview of the MI link, we have made a number of improvements to the link, as follows:
Disaster Recovery with SQL Server 2022
There are two types of disaster recovery for SQL Server 2022 possible:
Online DR Technology
The tech behind the two-way failover is based on Distributed Availability Groups allowing near real-time synchronization of data between SQL Server and Managed Instance. The solution supports single-node systems without existing availability groups, or multiple node systems with existing availability groups. The link communication mode is asynchronous. Secure connectivity, such as VPN or Express Route is used between an on-premises network and Azure. If SQL Server is hosted on an Azure VM, the internal Azure backbone can be used between the VM and managed instance for connectivity.
The base scenario supported is forced failover between SQL Server and Managed Instance using the built-in capability in the engine to reverse the roles of Distributed Availability Groups (one link). The failover on the SQL Server side is initiated by reversing the role using the T-SQL and then initiating API call to Managed Instance to reverse the link role on the Azure side. The same process is applied for forced failover in both directions. As with the existing Always On technology solutions, forced failover could allow a data loss on the failover.
Planned failover whereas data loss on failover is controlled, is possible through either careful execution of manual steps, or through help of SSMS wizard. The steps involve changing the link communication mode from asynchronous to synchronous for the duration of the failover. Further, we have implemented Required Synchronized Secondaries to Commit (RSStC) for Distributed Availability Groups on SQL Server 2022 in the engine which when enabled ensures that transaction on the SQL Server in the role of primary, is not considered as committed unless secondary, in this case SQL MI, confirms it has committed the transaction. This ensures that transactions could not be considered as committed on SQL Server 2022 unless they are also committed on SQL MI. Upon the failover execution, the link communication mode is switched back to asynchronous for the performance purposes. Reversing the roles back again takes similar steps, executing first the link role change on SQL MI from primary to secondary using an API call, and then reversing the role through T-SQL on SQL Server 2022.
It needs to be noted that primary\secondary relationship is per each link. This means that there exists a capability to choose which databases to failover from SQL Server 2022 to MI, which is especially useful if MI is a secondary DR site for multiple SQL Servers. In this respect, links could be established from multiple SQL Servers to a single Managed Instance, and DR managed for each link individually.
Hands-on with the link
One-way synchronization: To start using the link for one-way synchronization from SQL Server 2016-2022, go to MI link page on Azure docs, and follow the instructions provided. You will be able to create one-way synchronization using SSMS 19.0, or manually through scripts. One-way synchronization from SQL Server 2022 is now in GA.
Offline DR: To restore database from SQL MI back to SQL Server, make a COPY ONLY backup of SQL MI database and store it to an Azure Blob Storage account. On SQL Server 2022, restore backup files from the Azure Blob Storage account. This functionality is also generally available.
Online DR: The online two-way failover between SQL Server and Managed Instance is available in a limited public preview. This means that customers need to sign up first requesting access to this feature. The product group will evaluate each request and will need to enable the functionality on customer’s subscription. Private build of SSMS will be available to enrolled customers to evaluate this feature and provide feedback to the product group. The purpose of this phase is to closely with our customers perfecting the feature before the open public preview. As a limited number of seats is available, acceptance in the limited public preview cannot be guaranteed for all customers showing interest. The open public preview and general availability of this feature will be announced at a future date.
Figure 1: Sneak peek at SSMS private build experience for participants of the limited public preview.
Providing feedback to the product group
We hope that our improvements in this space have further improved our services to you. For any comments or feedback, use the comments section below, or post your feedback directly to the product group.
Closing remarks
If you find this article useful, please like it on this page and share through social media. To share this article, you can use the Share button below, or this short link: https://aka.ms/mi-link-gadr-blogpost.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.