且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQL Azure - 在数据库之间复制表

更新时间:2023-02-02 22:19:54

我知道这已经过时了,但我有另一种手动解决方案来解决一个临时问题.

I know this is old, but I had another manual solution for a one off run.

使用 SQL Management Studio R2 SP1 连接到 azure,我右键单击源数据库并选择生成脚本.

Using SQL Management Studio R2 SP1 to connect to azure, I right click the source database and select generate scripts.

在向导中,在我选择了我的表后,我选择了我想要输出到查询窗口,然后单击高级.属性窗口的一半左右有一个要编写脚本的数据类型"的选项.我选择它并将其更改为仅数据",然后我完成了向导.

during the wizard, after I have selected my tables I select that I want to output to a query window, then I click advanced. About half way down the properties window there is an option for "type of data to script". I select that and change it to "data only", then I finish the wizard.

然后我要做的就是检查脚本,重新排列插入的约束,并更改顶部的 using 以针对我的目标数据库运行它.

All I do then is check the script, rearrange the inserts for constraints, and change the using at the top to run it against my target DB.

然后我右键单击目标数据库并选择新查询,将脚本复制到其中,然后运行它.

Then I right click on the target database and select new query, copy the script into it, and run it.

完成,数据已迁移.

希望对某人有帮助