Deploying Azure SQL Databases for Hosting On-Premises SQL Server Databases

Implementing Azure Services for Hosting DB1 and DB2 with Server-Side Transactions

Question

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an app named App1 that uses data from two on-premises Microsoft SQL Server databases named DB1 and DB2.

You plan to move DB1 and DB2 to Azure.

You need to implement Azure services to host DB1 and DB2. The solution must support server-side transactions across DB1 and DB2.

Solution: You deploy DB1 and DB2 as Azure SQL databases each on a different Azure SQL Database server.

Does this meet the goal?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B.

B

Instead deploy DB1 and DB2 to SQL Server on an Azure virtual machine.

Note: Understanding distributed transactions.

When both the database management system and client are under the same ownership (e.g. when SQL Server is deployed to a virtual machine), transactions are available and the lock duration can be controlled.

https://docs.particular.net/nservicebus/azure/understanding-transactionality-in-azure

The proposed solution to deploy DB1 and DB2 as Azure SQL databases on different Azure SQL Database servers does not meet the stated goal of supporting server-side transactions across both databases.

Azure SQL Database is a fully managed relational database service provided by Microsoft. It provides features such as high availability, automatic backups, and scalability. However, when multiple databases are deployed in different Azure SQL Database servers, they are isolated from each other and cannot participate in a single distributed transaction.

A distributed transaction is a transaction that involves multiple databases or resource managers, and it must be atomic, consistent, isolated, and durable (ACID). In this scenario, App1 uses data from DB1 and DB2, and it requires a distributed transaction to ensure data consistency across both databases.

To support server-side transactions across DB1 and DB2, the recommended solution is to deploy them as instances of SQL Server on Azure virtual machines (VMs) and configure them to participate in a single distributed transaction using Microsoft Distributed Transaction Coordinator (DTC).

DTC is a transaction manager that coordinates distributed transactions across multiple databases and resource managers. It can be used to ensure data consistency and integrity in a distributed environment.

Therefore, the correct answer to this question is B. No. Deploying DB1 and DB2 as Azure SQL databases on different Azure SQL Database servers does not meet the goal of supporting server-side transactions across both databases. The recommended solution is to deploy them as instances of SQL Server on Azure VMs and configure them to participate in a single distributed transaction using DTC.