简体   繁体   English

如何将表从数据库复制到SQL Azure中的另一个数据库?

[英]How to copy tables from a database into another database in SQL Azure?

We made two backups from a database that needed changes in many tables, one is an exact copy of that database and the other is a BACPAC file. 我们从数据库中进行了两个备份,需要在许多表中进行更改,一个是该数据库的精确副本,另一个是BACPAC文件。

The new model for the database is ready but I was wondering, how can I copy the contents of the tables we want to recover from the copy of the original database? 数据库的新模型已经准备就绪,但是我想知道,如何复制要从原始数据库副本中恢复的表的内容? Is it possible? 可能吗?

I tried using SQL Server Management Studio 2012 but I couldn't find an option that could let me copy from a BACPAC file which is weird because everywhere I look into people is saying that by right click on the name of the database on the Tasks submenu there should be an Import option but there's not such option in it. 我尝试使用SQL Server Management Studio 2012,但找不到一个选项可以让我从BACPAC文件中复制,这很奇怪,因为我到处都是人们在说,通过右键单击“任务”子菜单上的数据库名称应该有一个导入选项,但是里面没有这样的选项。

Can I copy the contents of a table into another table from a different database? 我可以将一个表的内容从另一个数据库复制到另一个表吗? Or is there a way to import the data from the BACPAC file into our modified database? 还是有一种方法可以将数据从BACPAC文件导入到修改后的数据库中?

Did you try the following? 您尝试了以下吗?

Insert into dbA.user.table (a,b,c)
Select a,b,c from dbB.user.table

OR 要么

  SELECT a,b,c 
  INTO dbA.user.table
  FROM dbB.user.table

In SQL Server Management Studio (version 2012 or later), right click on the "Databases" node (not on your database) and choose "Import Data-tier Application" to restore a BACPAC file (or choose "Deploy Data-tier Application" to restore a DACPAC file). 在SQL Server Management Studio(2012版或更高版本)中,右键单击“数据库”节点(不在数据库上),然后选择“导入数据层应用程序”以还原BACPAC文件(或选择“部署数据层应用程序”恢复DACPAC文件)。

右键单击SSMS中的“数据库”节点

暂无
暂无

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

相关问题 如何将数据和数据库表从一个数据库复制到另一个数据库 - How to copy data and database tables from one database to another 将巨大的表数据从一个数据库复制到SQL Server中的另一个数据库 - Copy huge tables data from one database to another in SQL Server 在 SQL Server 中将表从一个数据库复制到另一个数据库 - Copy tables from one database to another in SQL Server 使用 Python 在 SQL Server 中将表从一个数据库复制到另一个数据库 - Copy tables from one database to another in SQL Server, using Python 将表数据从Azure SQL数据库复制到另一个Azure SQL数据库? - Copy table data from Azure SQL Database to another Azure SQL Database? 将Azure Sql数据库复制到另一台服务器 - Copy Azure Sql Database to another server 当目标数据库中已存在表和约束时,如何将一个数据库复制到sql Server中的另一个数据库? - How to copy one database to another database in sql server when tables and constraints already exist in the target database? 如何将所有表从一个数据库复制到另一个数据库 - how to copy all tables from one database to another 从 sql-server 数据库到另一个数据库创建所有表及其键和其他约束的副本 - create a copy of all tables with its key and other constraints from sql-server database to another database 如何将一个数据库表数据复制到SQL Server中的另一个空数据库? - how to copy one database tables data to another empty database in sql server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM