如何快速识别SQL Server中最近修改的存储过程 [英] How can I quickly identify most recently modified stored procedures in SQL Server

查看:232
本文介绍了如何快速识别SQL Server中最近修改的存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要手动将修改后的存储过程从DEV SQL Server 2005数据库实例迁移到TEST实例.除了我要迁移的更改之外,数据库具有相同的架构.如何快速确定已在DEV数据库中修改了哪些存储过程以迁移到TEST实例?

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 the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance?

我假设我可以针对某些系统表编写查询,以查看存储过程类型的数据库对象,并按某种最后修改或编译的数据进行排序,但是我不确定.也许有人可以指向我指向某种免费实用程序.

I assume I can write a query against some of the system tables to view database objects of type stored procedure, sorting by some sort of last modified or compiled data, but I'm not sure. Maybe there is some sort of free utility someone can point me to.

预先感谢

鲍勃

推荐答案

而不是使用不再建议使用的sysobjects,请使用sys.procedures

instead of using sysobjects which is not recommended anymore use sys.procedures

select name,create_date,modify_date
from sys.procedures
order by modify_date desc

您可以自己执行where子句,但这会按照修改日期降序列出

you can do the where clause yourself but this will list it in order of modification date descending

这篇关于如何快速识别SQL Server中最近修改的存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆