简体   繁体   English

跟踪数据库中的结构变化

[英]Track Structure Changes in a database

I am using SQL Server 2012. I want to track the schema changes made in a database.我正在使用 SQL Server 2012。我想跟踪在数据库中所做的架构更改。 For example, when a new column is added to a table (weather from designer or script), a script should be generated like 'alter table tbl1 add col1 int' and so on.例如,当一个新列被添加到表中时(来自设计器或脚本的天气),应该生成一个脚本,如“alter table tbl1 add col1 int”等。

I got to the Schema Changes History Report but it doesn't provide enough information required as it only shows the table changed, change type and date and time etc but does not provide the script which was generated to make that change.我找到了架构更改历史报告,但它没有提供足够的信息,因为它只显示更改的表、更改类型以及日期和时间等,但没有提供为进行更改而生成的脚本。

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

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