简体   繁体   English

为数据库架构更改生成脚本

[英]Generating script for database schema changes

I have two database schema. 我有两个数据库架构。 I need to generate the script consisting of the difference. 我需要生成包含差异的脚本。 How do I do this? 我该怎么做呢?

Basically, I had original schema that I modified. 基本上,我有修改过的原始架构。 So I need the script for what changed. 所以我需要更改的脚本。 Which tables got dropped and relationships are broken etc... 哪些表被删除并且关系破裂等...

PS I do not have red gate. PS我没有红门。

Use the Schema Compare feature in Visual Studio: 使用Visual Studio中的架构比较功能:

Main Menu --> SQL --> Schema Compare --> New Schema Comparison 

And go from there... 然后从那里去...

It may prompt you to download the SQL Server Data Tools from here if you don't already have it. 如果尚未安装,它可能会提示您从此处下载SQL Server数据工具。

Note: I am no sure if this works in the Professional Version. 注意:我不确定这是否可以在专业版中使用。 It's certainly available in the Ultimate edition. 在Ultimate Edition中肯定可用。

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

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