Which Azure SQL Service Handles Cross-Database Queries with Least Effort?
You have an Azure subscription. You plan to deploy an app that will store data across multiple databases. You need to recommend a storage solution for the app. The solution must meet the following requirements: • Ensure that queries can be executed simultaneously across all the databases. • Minimize development effort. • Minimize query latency. What should you include in the recommendation?
Community Insight
The question tests cross-database query support in managed Azure SQL options; the trap is assuming Azure SQL Database natively supports cross-database T-SQL without Elastic Query setup.
Azure SQL Managed Instance is the recommended relational store when an app needs to query data across multiple databases because it supports native cross-database T-SQL queries. This page explains why it beats Azure SQL Database Elastic Query on development effort and latency.
Choosing Azure SQL Database because it is the default PaaS choice, while overlooking that cross-database queries require Elastic Query external data sources and external tables, which adds development work.
Community Discussion (1 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Azure SQL Managed Instance runs multiple user databases on the same managed instance and supports cross-database queries with native T-SQL, so a query can reference tables in several databases without building a sharding or Elastic Query layer. That directly minimizes development effort because developers do not need to create master keys, scoped credentials, external data sources, or external tables for every database. Keeping the databases on the same managed instance also avoids network hops between separate logical servers, helping minimize query latency. The instance remains a PaaS offering, so Microsoft handles patching and infrastructure, unlike SQL Server on Azure Virtual Machines. Therefore option D satisfies all three requirements.Why the Other Options Are Wrong
Azure SQL Database can span databases only with Elastic Query, which requires per-database external data sources and external tables and therefore does not minimize development effort. SQL Server on Azure Virtual Machines supports cross-database T-SQL, but it is IaaS, so you must manage the OS, patching, high availability, and tuning, which conflicts with minimizing development effort. Azure SQL Edge is an edge/IoT-optimized engine, not a central multi-database storage recommendation for an Azure app, and it does not simplify cross-database querying. None of these options align as well as Managed Instance with the combination of simultaneous cross-database queries, low effort, and low latency.Community Comment Notes
The community comment from gpais argues that Azure SQL Managed Instance provides "Zero-Code Cross-Queries" and "Native T-SQL" cross-database support, avoiding the manual setup of database master keys, scoped credentials, external data sources, and external tables that Elastic Query requires. That aligns with the exam's emphasis on minimizing development effort rather than merely making cross-database queries possible. The comment also notes that SQL Server on Azure Virtual Machines can support cross-database queries, but it does not remove the managed-platform advantage of Managed Instance. This reinforces D as the best recommendation for the stated requirements.Official Reference
Exam Strategy
When a scenario asks for cross-database queries, first separate native T-SQL support from Elastic Query. Count the setup objects each option requires—Managed Instance needs none for same-instance databases, while Azure SQL Database needs credentials, data sources, and external tables. Then use the 'minimize development effort' requirement to eliminate IaaS and edge options.
Frequently Asked Questions
Why is Azure SQL Database not the best fit for cross-database queries here?
Azure SQL Database requires Elastic Query objects such as external data sources and external tables, which adds setup work compared with Managed Instance's native T-SQL.
Does SQL Server on Azure VMs also support cross-database queries?
Yes, but it is IaaS and requires OS patching, HA, and performance tuning, so it does not minimize development effort like Managed Instance.
Related Analysis
Practice All AZ-305 Questions
Access 95 questions with complete answers and detailed explanations.
View Full AZ-305 Practice Test →