Case q11 · fact
Does Azure SQL Database (not Managed Instance) support database links / cross-database queries like Oracle?
Expected: Azure SQL Database lacks linked servers and cross-database queries (elastic query is the partial workaround); SQL MI supports linked servers; answer must distinguish DB from MI.
No tools
larger model · 1 turn · 20 s · 16.5k in / 1.9k out✓ verdict ✗ grounded ✓ cited
Grader: Correct DB/MI split; SSMA, trust-group, GA claims unsourced
Answer
Does Azure SQL Database support Oracle-style database links?
No, not in the Oracle sense. Azure SQL Database has no linked servers and no cross-database db.schema.table queries. The only built-in workaround is Elastic Query, which is limited and still in preview. If you need linked servers, use Azure SQL Managed Instance.
What Azure SQL Database lacks
- No linked servers (
sp_addlinkedserver), so there's no equivalent ofSELECT … FROM tab@remote_db. - No three- or four-part names across databases.
OtherDb.dbo.Tablefails even when both databases are on the same logical server. Onlytempdband the current database can be referenced. - No outbound connection to Oracle or other non-SQL sources from inside the engine. You can't point a link at the old Oracle database during a phased cutover.
- No DTC or MSDTC distributed transactions.
- Docs: https://learn.microsoft.com/azure/azure-sql/database/transact-sql-tsql-differences-sql-server
What it does offer
- Elastic Query (preview): https://learn.microsoft.com/azure/azure-sql/database/elastic-query-overview
- You create an
EXTERNAL DATA SOURCE(typeRDBMS) andEXTERNAL TABLEs that point at another Azure SQL Database. You then query them like local tables. - External tables are read-only. You can't run INSERT, UPDATE or DELETE through them.
- Filters are pushed down to the remote database only partly. Large joins pull the data across the network and perform poorly.
- It has been in preview for years with no GA date, so it's risky for production-critical paths.
- The only targets are other Azure SQL Databases.
- You create an
sp_execute_remote: runs any T-SQL, including DML, on a remote Azure SQL Database through an Elastic Query data source. It's the closest match to calling a remote procedure over a DB link.- Elastic transactions: atomic transactions across Azure SQL Databases, driven mainly from .NET (
TransactionScope). https://learn.microsoft.com/azure/azure-sql/database/elastic-transactions-overview
How to handle DB links in a migration
- Consolidate: in most Oracle migrations, the linked Oracle databases or schemas become separate schemas in one Azure SQL Database. Cross-database calls then become normal same-database queries. This is the cleanest fix.
- Use Managed Instance if you need real linked servers. MI supports linked servers and cross-database queries within the instance, plus distributed transactions through server trust groups. Its linked servers mainly target SQL Server and Azure SQL, not Oracle.
- Move integration out of the database: use Azure Data Factory or Fabric pipelines for data movement, and APIs or messaging for runtime calls.
- Inventory first: SSMA for Oracle flags DB-link references as conversion issues. Count them and group them by read-only vs. DML vs. remote procedure call. That breakdown usually decides between SQL Database and Managed Instance.
Rule of thumb: a few read-only lookups can work with Elastic Query or consolidation. Frequent cross-database DML, remote procedure calls or distributed transactions point to Managed Instance.
Keyword search
larger model · 1 turn · 8 s · 19.0k in / 0.7k out✓ verdict ✓ grounded ✓ cited
Grader: Correct verdict with MI contrast; claims carry numbered citations
8 keyword-search passages
glossary_azure-sql-database-vs-managed-instancescore 22.445feature_database-linksscore 20.636mapping_database-links--azure-sql-miscore 20.473source_ms-sqldb-mi-feature-comparisonscore 17.731source_ms-sqldb-elastic-queryscore 17.239target_azure-sql-miscore 16.969mapping_database-links--azure-sql-dbscore 16.762mapping_data-pump--azure-dmsscore 16.618
Answer
Short answer: no, not natively. Azure SQL Database has no linked servers and no cross-database three-part-name queries. The closest substitute is Elastic Query, which is still in preview and only reads data. It works for read-only reporting-style links. It does not replace links that change data, links that need a transaction to commit across databases, or links to non-SQL systems.
Key facts
- What's missing: Azure SQL Database is scoped to a single database. It leaves out instance-level features, including linked servers and three-part-name queries across databases. [1][7] (https://learn.microsoft.com/en-us/azure/azure-sql/database/features-comparison)
- Elastic Query (the workaround):
- It exposes remote Azure SQL tables as read-only external tables.
- It can run remote procedures with
sp_execute_remote. - It is still in preview.
- Its shard-map mode reaches end of support on 2027-03-31. [5][7] (https://learn.microsoft.com/en-us/azure/azure-sql/database/elastic-query-overview)
- What it can't do: write data through the link, commit a transaction across several databases (the two-phase commit Oracle links provide), or reach Oracle or other non-SQL targets. [2][7]
- Contrast with Managed Instance: Managed Instance supports cross-database queries within the instance and linked servers to SQL Server, Managed Instance, Azure SQL Database and Synapse. It is the closer match for Oracle links, but it still can't link to Oracle, and distributed transactions are limited to DTC preview scenarios. [3][6]
Recommended approach for Azure SQL Database [2][7]
- List the links in
DBA_DB_LINKS. Label each one as a read-only lookup, data changes, a distributed transaction, or a non-Oracle target. - Merge tightly coupled schemas into one database where you can.
- For read-only lookups between Azure SQL databases, use Elastic Query (external data sources plus external tables).
- Move data changes that went through links into the application or Azure Data Factory.
- If many links depend on transactions, consider Managed Instance instead.
Sanity Context · GROQ
smaller model · 4 turns · 20 s · 32.8k in / 1.3k out✓ verdict ✓ grounded ✓ cited
Grader: Correct, well-scoped, grounded quotes; MI contrast included
3 tool calls
- initial_context on groq · 4,126 chars back
- groq_query on groq · 520 chars back
*[_type=="oracleFeature" && (name match "*link*" || name match "*cross*" || slug.current match "*link*" || slug.current match "*dblink*")]{_id, name, slug, category} - groq_query on groq · 7,228 chars back
*[_type=="mapping" && oracleFeature->slug.current=="database-links"]{ _id, fidelity, effort, rationale, appliesToOracleVersions, "azureTarget": azureTarget->{name, slug, service}, "sources": sources[]->{title, url}, "caveats": *[_type=="caveat" && references(^._id)]{ severity, statement, appliesTo, firsthand, "evidence": evidence->{title, url} } }
Answer
Verdict: No. Azure SQL Database (not Managed Instance) does not support Oracle-style database links, linked servers, or cross-database three-part-name queries/transactions. A partial, read-only workaround exists via Elastic Query, which is still in preview.
Scoped facts (Oracle Database links feature — applies to Oracle 11.2 through 26ai — mapped to Azure SQL Database, fidelity: workaround, effort: L):
- "Azure SQL Database supports neither linked servers nor cross-database three-part-name queries or cross-database transactions; the feature comparison points to elastic query as the partial workaround for read-only cross-database access." — severity: blocker — Compare SQL Database Engine features: Azure SQL Database vs Azure SQL Managed Instance
- Rationale: "Azure SQL Database supports neither linked servers nor cross-database three-part-name queries. Elastic query (still in preview) exposes remote Azure SQL tables as read-only external tables and can execute remote procedures with sp_execute_remote, which covers reporting-style database links but not DML through the link or links to non-SQL targets. Many teams instead consolidate schemas into one database or move to Managed Instance." — Compare SQL Database Engine features
- Elastic Query caveat (severity: major): "Elastic query is in preview, supports only read-only access to external tables (DML must go through sp_execute_remote), does not support LOB types other than nvarchar(max) in external table definitions, works only with SQL authentication, and its shard-map mode reaches end of support on 2027-03-31." — Elastic query overview (Azure SQL Database)
Contrast (for context, not the question asked): Azure SQL Managed Instance does support linked servers and in-instance cross-database queries (fidelity: partial), but linked servers there can only target SQL Server–family endpoints (SQL MI, Azure SQL DB, Synapse SQL pools, SQL Server) — not Oracle or other non-SQL RDBMS. — T-SQL differences between SQL Server and Azure SQL Managed Instance
No disputes recorded on this mapping in the dataset.
GROQ + Knowledge Base
smaller model · 6 turns · 26 s · 50.1k in / 1.8k out✓ verdict ✓ grounded ✓ cited
Grader: Correct verdict, distinguishes MI, quotes retrieved passages throughout
5 tool calls
- initial_context on groq · 4,126 chars back
- initial_context on kb · 7,679 chars back
- groq_query on groq · 528 chars back
*[_type=="oracleFeature" && (name match "*link*" || name match "*Database Link*" || slug.current match "*link*" || slug.current match "*dblink*")]{_id, name, slug, category} - knowledge_base_read on kb · 4,882 chars back
{ "knowledgeBase": "kb6MdvV3ZA3Q", "paths": [ "target_platforms" ] } - groq_query on groq · 8,770 chars back
*[_type=="mapping" && oracleFeature->slug.current=="database-links"]{ _id, fidelity, effort, rationale, appliesToOracleVersions, "azureTarget": azureTarget->{name, service, tierNotes}, "sources": sources[]->{title, url, publisher}, "caveats": *[_type=="caveat" && references(^._id)]{ severity, statement, appliesTo, firsthand, "evidence": evidence->{title, url, publisher} } }
Answer
Verdict: No. Azure SQL Database does not support Oracle-style database links or true cross-database queries; the closest workaround (Elastic Query) is a limited, preview-status, read-only substitute.
Scoped facts:
Mapping: Oracle Database links (all versions 11.2–26ai) → Azure SQL Database has fidelity: workaround, effort L. "Azure SQL Database supports neither linked servers nor cross-database three-part-name queries. Elastic query (still in preview) exposes remote Azure SQL tables as read-only external tables and can execute remote procedures with sp_execute_remote, which covers reporting-style database links but not DML through the link or links to non-SQL targets. Many teams instead consolidate schemas into one database or move to Managed Instance." — Compare SQL Database Engine features: Azure SQL Database vs Azure SQL Managed Instance
Blocker caveat: "Azure SQL Database supports neither linked servers nor cross-database three-part-name queries or cross-database transactions; the feature comparison points to elastic query as the partial workaround for read-only cross-database access." — Compare SQL Database Engine features: Azure SQL Database vs Azure SQL Managed Instance
Major caveat on the workaround itself (Elastic Query): "Elastic query is in preview, supports only read-only access to external tables (DML must go through sp_execute_remote), does not support LOB types other than nvarchar(max) in external table definitions, works only with SQL authentication, and its shard-map mode reaches end of support on 2027-03-31." — Elastic query overview (Azure SQL Database)
Contrast with Managed Instance (confirms the "not Managed Instance" framing in your question): Azure SQL Managed Instance does support cross-database queries/transactions within the instance and linked servers to other SQL-family targets (SQL MI, Azure SQL DB, Synapse SQL pools, SQL Server) — fidelity partial, effort M — but linked servers still cannot target Oracle or other non-SQL RDBMS. — T-SQL differences between SQL Server and Azure SQL Managed Instance
Practical implication (per the same mapping rationale): if your Oracle estate depends on database links for cross-schema/cross-database access, either consolidate the linked schemas into a single Azure SQL Database, or target Managed Instance instead, since Elastic Query only covers reporting-style read access.
No dispute record in the dataset touches this specific mapping, so there are no conflicting claims to present.