更新时间:2023-02-04 07:59:18
有多种方法可以做到这一点:
There are multiple ways to do this:
data
.不会传输列属性、约束、键、索引、存储过程、触发器、安全设置、用户、登录等.然而,这是一个非常简单的过程,只需通过 SQL Server Management Studio 中的向导即可完成.data
in your table. Column properties, constraints, keys, indices, stored procedures, triggers, security settings, users, logons, etc. are not transferred. However it is very simple process and can be done simply by going through wizard in SQL Server Management Studio. 方法 #1(使用 SSIS)的手动程序如下:
Manual procedure for method #1 (using SSIS) is the following:
您可以通过创建 SSIS 包并在您想重新导入数据的任何时候重新执行它来自动化它.请注意,您只能使用 SSIS 导入到干净的数据库,一旦您已经完成一次,您就无法对本地数据库进行增量更新.
You can automate it by creating SSIS package and re-executing it any time you like to re-import the data. Note that you can only import using SSIS to a clean DB, you cannot do incremental updates to your local database once you already done it once.
方法#2(SSID 数据加架构对象)非常简单.首先完成上述步骤,然后创建数据库创建脚本(在 SSMS 中右键单击数据库,选择生成脚本 -> 数据库创建).然后在您的本地数据库上重新播放此脚本.
Method #2 (SSID data plus schema objects) is very simple. First go though a steps described above, then create DB Creation script (righ click on database in SSMS, choose Generate Scripts -> Database Create). Then re-play this script on your local database.
方法 #3 在此处的博客中进行了描述:http://dacguy.wordpress.com/2012/01/24/sql-azure-importexport-service-has-hit-production/.有一个视频剪辑,其中包含将 DB 内容作为 BACPAC 传输到 Azure Blob 存储的过程.之后,您可以在本地复制该文件并将其导入您的 SQL 实例.此处描述了将 BACPAC 导入数据层应用程序的过程:http://msdn.microsoft.com/en-us/library/hh710052.aspx.
Method #3 is described in the Blog here: http://dacguy.wordpress.com/2012/01/24/sql-azure-importexport-service-has-hit-production/. There is a video clip with the process of transferring DB contents to Azure Blob storage as BACPAC. After that you can copy the file locally and import it to your SQL instance. Process of importing BACPAC to Data-Tier application is described here: http://msdn.microsoft.com/en-us/library/hh710052.aspx.