This video is a deep dive into the world of Mirroring for Azure SQL Managed Instance. Currently in public preview, this powerful tool provides the ability to continuously replicate your existing SQL Managed Instance databases directly into Azure Data Lake. This creates a read-only, always up-to-date copy of the database, unlocking all the cool stuff you can do in Azure in terms of analytics and machine learning scenarios. It’s an innovation that could revolutionize the way we handle data, and I’m here to guide you through the details.
This video is from Microsoft Developer.
Let’s start with a broad understanding of the analytics space today. It’s a bit of a complex landscape, and there’s often friction between people, processes, and tools. Getting new data into your analytics systems can be a lengthy process. This is where fabric mirroring comes into play, offering a streamlined solution to these challenges.
Fabric mirroring is essentially an ability to continuously replicate your existing SQL Managed Instance databases into Azure Data Lake. This creates a read-only, always up-to-date copy of the database that unlocks a myriad of possibilities in terms of analytics, data, and machine learning scenarios. It’s a zero ETL process, meaning there are no projects to run, tooling, or timelines to get the data flowing and your analytics running.
What’s more, this process also includes any Data Definition Language (DDL) changes that may occur in your source database. This essentially provides a bronze layer of your medallion architecture with no tools or code needed, and you can proceed from there at a rapid pace. Since the data is copied into Azure Data Lake, it also relieves your operational database of analytical queries, thus improving performance.
The process for setting up mirroring for SQL Managed Instance is relatively straightforward. Initially, an initial snapshot is taken and the data from your chosen tables is sent into Azure Data Lake. From that point on, any new changes identified in the transaction log of the SQL Managed Instance database, including any inserts, updates, deletes, etc., are streamed into Azure Data Lake. The data becomes delta files in Azure Data Lake, which you can use just like any other data in the lake.
To illustrate this, let’s consider a demo. When creating a new item in your workspace, you can choose to mirror Azure SQL Managed Instance. You will be asked to provide a connection string to your SQL Managed Instance, after which Azure will display a list of tables found in your SQL Managed Instance database. You can choose the tables you want to mirror and give a name to your mirrored SQL Managed Instance artifact in Azure. Once you click to create the mirror database, three artifacts will be created in your workspace: the mirror database, the semantic model, and an analytics endpoint.
One of the most exciting features of mirroring is its ability to propagate changes from the source to the destination without the need for manual intervention. This includes any changes to the structure of the tables in your database. For example, if you add an extra column to a table in your SQL Managed Instance, mirroring will automatically replicate this change in the mirrored copy of your database in Azure Data Lake.
It’s important to note that mirroring is supported on all SQL Managed Instance service tiers, including business critical, general purpose, and next-gen general purpose. However, you should ensure that your SQL Managed Instance is configured as ‘always up to date’ to guarantee that you’re receiving new engine features, as mirroring is an engine feature.
Additionally, your SQL Managed Instance needs to expose a public endpoint and allow Azure cloud or PowerBI service tags to enable fabric to connect and initialize mirroring. System-assigned managed identity should be turned on in your SQL Managed Instance to authenticate to fabric and send data there, and it should be the primary identity for your SQL Managed Instance.
In conclusion, mirroring for Azure SQL Managed Instance is a groundbreaking feature that simplifies the process of replicating data for analytics purposes. It offers near real-time updates and requires minimal setup, making it an attractive option for those looking to streamline their data management processes. The future looks promising as the product team continues to innovate and improve upon this feature, with developments like VNET data gateways and private endpoints on the horizon. As we continue to embrace and navigate the digital age, tools like mirroring will undoubtedly play a pivotal role in helping businesses harness the power of their data more efficiently and effectively.
