简体   繁体   English

SQL Server Management Studio 工具,用于检查存储过程和视图中的错误

[英]SQL Server Management Studio tool to check errors in stored procedures and views

I have made some changes in the schema of some tables in SQL Server and rename some columns, is there a way to save all changes I made in separate file to be applied to production database?我对 SQL 服务器中的某些表的架构进行了一些更改并重命名了一些列,有没有办法保存我在单独文件中所做的所有更改以应用于生产数据库?

Also is there a way to discover the errors that happen in stored procedures and views because of these changes?还有一种方法可以发现由于这些更改而在存储过程和视图中发生的错误吗?

I've done this 2 ways:我已经完成了这两种方式:

  1. The manual way, using a large SQL script created from a number of smaller scripts from SQL Server Management Studio or created by myself.手动方式,使用一个大的 SQL 脚本,该脚本由一些来自 SQL Server Management Studio 或我自己创建的较小脚本创建。 It can be tricky but not so difficult once you've created a few of them.一旦你创建了其中的一些,它可能会很棘手,但并不那么困难。
  2. The automatic way - using RedGate SQL Compare.自动方式——使用RedGate SQL 比较。 Much easier if you have access to it.如果您可以访问它,就会容易得多。

When using both methods I would use require a Pre-Prod database (a copy of Production) for testing.当使用这两种方法时,我会使用 require Pre-Prod 数据库(Production 的副本)进行测试。

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

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