简体   繁体   English

如何在同一台服务器上的两个 Azure 数据库之间将一个表数据复制到另一个表中

[英]How to copy one table data to another one between two Azure databases on the same server

I want to copy data from one database table into another database table on the same server in Azure SQL. I have done all of the Azure SQL Cross Database Query' steps that are written here https://www.mssqltips.com/sqlservertip/6445/azure-sql-cross-database-query/but still get the same error whenever I execute a query 'Reference to database and/or server name in 'db name' is not supported in this version of SQL Server.'我想将数据从一个数据库表复制到 Azure SQL 中同一服务器上的另一个数据库表中。我已经完成了所有 Azure SQL 跨数据库查询步骤,这些步骤写在这里https://www.mssqltips.com/sqlservertips/ 6445/azure-sql-cross-database-query/但每当我执行查询“此版本的 SQL 服务器不支持对数据库名称和/或服务器名称的引用”时,仍然出现相同的错误。

Can you pls help to figure out this?你能帮忙弄清楚这个吗?

Azure SQL database doesn't support across query directly. Azure SQL 数据库不支持直接跨查询。

We can not use USE statements and it not supported.我们不能使用USE语句,它不受支持。 That's why you get the error.这就是你得到错误的原因。 We can not run statements like select * from [other_database].[schema].[table] .我们不能运行像select * from [other_database].[schema].[table]这样的语句。

In Azure SQL database, only elastic query overview (preview) can achieve cross database query:在Azure SQL数据库中,只有elastic query overview(preview)可以实现跨库查询:

  • The elastic query feature (in preview) enables you to run a Transact-SQL query that spans multiple databases in Azure SQL Database.弹性查询功能(预览版)使您能够在 Azure SQL 数据库中运行跨多个数据库的 Transact-SQL 查询。 It allows you to perform cross-database queries to access remote tables, and to connect Microsoft and third-party tools (Excel, Power BI, Tableau, etc.) to query across data tiers with multiple databases.它允许您执行跨数据库查询以访问远程表,并连接 Microsoft 和第三方工具(Excel、Power BI、Tableau 等)以使用多个数据库进行跨数据层查询。

You could follow the tutorial and it may be more complex than on-premise SQL Server: Get started with cross-database queries (vertical partitioning) (preview)您可以按照教程进行操作,它可能比内部部署更复杂 SQL 服务器: 跨数据库查询入门(垂直分区)(预览)

暂无
暂无

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

相关问题 在同一个表中的 SQL Server 中将数据从一行复制到另一行 - Copy data from one row to another in SQL Server in the same table 将数据从一个表复制到不同数据库中的另一个表 - Copy data from one table to another in diffrent databases SQL Server:将列数据值从一个表复制到同一数据库中的另一表 - SQL Server: copy column data values from one table to another table in the same database 如何在PHP和MySQL中将几条记录从一台服务器上的表复制到另一台服务器上具有相同结构的表? - How to copy few records from a table on one server to the table with same structure on another server in PHP and MySQL? 如何将一个表的列数据复制到另一个表 - How to copy column Data of one Table to another 使用SQL Server将数据从一个表复制到另一表 - Copy data from one table to another table using sql server 如何在同一数据库上使用“从VERYICA复制”将数据从一个表复制到另一个表 - How to use 'COPY FROM VERTICA' on same database to copy data from one table to another 如何将数据从一个表复制到另一个服务器上的另一个表? - How do I copy data from one table to another table on another server? 将一个表上的数据复制到另一个表 - Copy data on one table to another 查找两个表之间的连接并将一个表数据复制到具有不同列名和相同数据的另一个表 - Finding connection between two tables and copying one tables data to another table with different column name and same data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM