简体   繁体   English

Cross Database Queries in Azure Synapse, Azure SQL Database, Azure Managed Instance and On Premise SQL Server

[英]Cross Database Queries in Azure Synapse, Azure SQL Database, Azure Managed Instance and On Premise SQL Server

We are looking at options for moving our on premise SQL Server(s) to Azure and trying to understand whether we will be able to run cross database queries should we have data residing across multiple database technologies both in Azure ( specifically Azure Managed Instance, Azure Synapse Analytics, Azure SQL Database), and in an on-premise SQL Server instance. We are looking at options for moving our on premise SQL Server(s) to Azure and trying to understand whether we will be able to run cross database queries should we have data residing across multiple database technologies both in Azure ( specifically Azure Managed Instance, Azure Synapse Analytics、Azure SQL 数据库)和本地 SQL 服务器实例。

We cannot find much information anywhere on whether these are supported and would appreciate if any of ye could help in filling out the table below:我们在任何地方都找不到太多关于这些是否受支持的信息,如果你们中的任何人可以帮助填写下表,我们将不胜感激:

TO->到-> Azure SQL DB Azure SQL DB Azure Managed Instance Azure 托管实例 Azure Synapse Analytics Azure 突触分析 On Premise SQL Server本地 SQL 服务器
Azure SQL DB Azure SQL DB Supported through Elastic Search Query (Ref: https://azure.microsoft.com/en-us/blog/querying-remote-databases-in-azure-sql-db/ )通过弹性搜索查询支持(参考: https://azure.microsoft.com/en-us/blog/querying-remote-databases-in-azure-sql-db/ ? ? Azure Data Share supports sharing of both tables and views from Azure SQL Database and Azure Synapse Analytics (formerly Azure SQL DW), and sharing of tables from Azure Synapse Analytics (workspace) dedicated SQL pool. Azure Data Share supports sharing of both tables and views from Azure SQL Database and Azure Synapse Analytics (formerly Azure SQL DW), and sharing of tables from Azure Synapse Analytics (workspace) dedicated SQL pool. Sharing from Azure Synapse Analytics (workspace) serverless SQL pool is not currently supported.当前不支持从 Azure Synapse Analytics(工作区)无服务器 SQL 池共享。 (Ref: https://docs.microsoft.com/en-us/azure/data-share/how-to-share-from-sql ) (参考: https://docs.microsoft.com/en-us/azure/data-share/how-to-share-from-sql Azure SQL database doesn't support the linked server property so you wont be able to access on prem tables in Azure SQL database and the elastic query in Azure SQL database is to query tables between 2 Azure SQL databases and not On prem. Azure SQL database doesn't support the linked server property so you wont be able to access on prem tables in Azure SQL database and the elastic query in Azure SQL database is to query tables between 2 Azure SQL databases and not On prem. (Ref: https://docs.microsoft.com/en-us/answers/questions/289105/how-can-i-query-on-premise-sql-server-database-fro.html ) (参考: https://docs.microsoft.com/en-us/answers/questions/289105/how-can-i-query-on-premise-sql-server-database-fro.html
Azure Managed Instance Azure 托管实例 ? ? ? ? ? ? Available through the use of Linked Servers (Ref: http://thewindowsupdate.com/2019/03/22/lesson-learned-81-how-to-create-a-linked-server-from-azure-sql-managed-instance-to-sql-server-onpremise-or-azure-vm/ )可通过使用链接服务器获得(参考: http://thewindowsupdate.com/2019/03/22/lesson-learned-81-how-to-create-a-linked-server-from-azure-sql-managed- instance-to-sql-server-onpremise-or-azure-vm/ )
Azure Synapse Analytics Azure 突触分析 ? ? ? ? ? ? ? ?
On Premise SQL Server本地 SQL 服务器 ? ? ? ? ? ? Using a linked server you can query data in an Azure SQL database from an on premised SQL Server (Ref: https://docs.microsoft.com/en-us/answers/questions/289105/how-can-i-query-on-premise-sql-server-database-fro.html ) Using a linked server you can query data in an Azure SQL database from an on premised SQL Server (Ref: https://docs.microsoft.com/en-us/answers/questions/289105/how-can-i-query-本地 sql-server-database-fro.html )

AFAIK there is no cross-DB facade that provides a single interface to talk to multiple Databases at the same time. AFAIK 没有跨数据库外观,它提供一个接口来同时与多个数据库通信。 Be it on-prem/in-cloud or SQL-Server/Synapse/MySQL/...无论是本地/云端还是 SQL-Server/Synapse/MySQL/...

There are individual ways and means by which you can access a single Database from somewhere/anywhere.您可以通过多种方式和方式从某处/任何地方访问单个数据库。 Eg accessing an on-prem DB from code in cloud or access a cloud DB from code running on on-prem "servers".例如,从云中的代码访问本地数据库或从本地“服务器”上运行的代码访问云数据库。 List of interfaces available is specific to each "source" and "target" combination.可用接口列表特定于每个“源”和“目标”组合。

Azure SQL database need elastic query to achieve cross database query. Azure SQL 数据库需要弹性查询来实现跨数据库查询。 It doesn't support create linked server.它不支持创建链接服务器。

Azure Managed instance has almost same feature with on-premise SQL server, you could use USE statement to execute cross database query. Azure 托管实例与本地 SQL 服务器具有几乎相同的功能,您可以使用USE statement执行跨数据库查询。 It's same with local SQL Server.与本地 SQL 服务器相同。

Azure Synapse Analytics also doesn't support cross database query. Azure Synapse Analytics 也不支持跨数据库查询。

Per my knowledge and experiense, I will put ✔ or X in table to express support or not supported.根据我的知识和经验,我会将✔或X放在表中以表示支持或不支持。 please ref:请参考:

TO->到-> Azure SQL DB Azure SQL DB Azure Managed Instance Azure 托管实例 Azure Synapse Analytics Azure 突触分析 On Premise SQL Server本地 SQL 服务器
Azure SQL DB Azure SQL DB Supported through Elastic Search Query (Ref: https://azure.microsoft.com/en-us/blog/querying-remote-databases-in-azure-sql-db/ )通过弹性搜索查询支持(参考: https://azure.microsoft.com/en-us/blog/querying-remote-databases-in-azure-sql-db/ X, not supported X,不支持 Azure Data Share supports sharing of both tables and views from Azure SQL Database and Azure Synapse Analytics (formerly Azure SQL DW), and sharing of tables from Azure Synapse Analytics (workspace) dedicated SQL pool. Azure Data Share supports sharing of both tables and views from Azure SQL Database and Azure Synapse Analytics (formerly Azure SQL DW), and sharing of tables from Azure Synapse Analytics (workspace) dedicated SQL pool. Sharing from Azure Synapse Analytics (workspace) serverless SQL pool is not currently supported.当前不支持从 Azure Synapse Analytics(工作区)无服务器 SQL 池共享。 (Ref: https://docs.microsoft.com/en-us/azure/data-share/how-to-share-from-sql ) (参考: https://docs.microsoft.com/en-us/azure/data-share/how-to-share-from-sql Azure SQL database doesn't support the linked server property so you wont be able to access on prem tables in Azure SQL database and the elastic query in Azure SQL database is to query tables between 2 Azure SQL databases and not On prem. Azure SQL database doesn't support the linked server property so you wont be able to access on prem tables in Azure SQL database and the elastic query in Azure SQL database is to query tables between 2 Azure SQL databases and not On prem. (Ref: https://docs.microsoft.com/en-us/answers/questions/289105/how-can-i-query-on-premise-sql-server-database-fro.html ) (参考: https://docs.microsoft.com/en-us/answers/questions/289105/how-can-i-query-on-premise-sql-server-database-fro.html
Azure Managed Instance Azure 托管实例 X, not supported X,不支持 ✔,same with local SQL Server ✔,与本地 SQL 服务器相同 X, not supported X,不支持 Available through the use of Linked Servers (Ref: http://thewindowsupdate.com/2019/03/22/lesson-learned-81-how-to-create-a-linked-server-from-azure-sql-managed-instance-to-sql-server-onpremise-or-azure-vm/ )可通过使用链接服务器获得(参考: http://thewindowsupdate.com/2019/03/22/lesson-learned-81-how-to-create-a-linked-server-from-azure-sql-managed- instance-to-sql-server-onpremise-or-azure-vm/ )
Azure Synapse Analytics Azure 突触分析 Azure Data Share Azure 数据共享 X, not supported X,不支持 X, not supported X,不支持 X, not supported X,不支持
On Premise SQL Server本地 SQL 服务器 ✔,linked server ✔,链接服务器 ✔,linked server ✔,链接服务器 X, not supported X,不支持 Using a linked server you can query data in an Azure SQL database from an on premised SQL Server (Ref: https://docs.microsoft.com/en-us/answers/questions/289105/how-can-i-query-on-premise-sql-server-database-fro.html ) Using a linked server you can query data in an Azure SQL database from an on premised SQL Server (Ref: https://docs.microsoft.com/en-us/answers/questions/289105/how-can-i-query-本地 sql-server-database-fro.html )

Please choose the suitable Azure database version according your request.请根据您的要求选择合适的 Azure 数据库版本。

HTH. HTH。

Have a look this link for cross database query in Azure database w https://azure.microsoft.com/sv-se/blog/querying-remote-databases-in-azure-sql-db/在 Azure 数据库中查看此链接以进行跨数据库查询 w https://azure.microsoft.com/sv-se/blog/querying-remote-databases-in-azure-sql-db/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM