How can I quickly identify most recently modified stored procedures in SQL Server

后端 未结 7 685
我寻月下人不归
我寻月下人不归 2021-01-31 04:03

I Need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I\'m migrating, the databases have

7条回答
  •  心在旅途
    2021-01-31 04:31

    There are several database compare tools out there. One that I've always like is SQLCompare by Red Gate.

    You can also try using:

    SELECT name
    FROM sys.objects
    WHERE modify_date > @cutoffdate
    

    In SQL 2000 that wouldn't have always worked, because using ALTER didn't update the date correctly, but in 2005 I believe that problem is fixed.

    I use a SQL compare tool myself though, so I can't vouch for that method 100%

提交回复
热议问题