如何检查 SQL Server 中存储过程或函数的最后更改日期 [英] How to check date of last change in stored procedure or function in SQL server

查看:26
本文介绍了如何检查 SQL Server 中存储过程或函数的最后更改日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要检查上次更改函数的时间.我知道如何检查创建日期(它在 SQL Server Management Studio 的函数属性窗口中).
我发现在 SQL Server 2000 中无法检查修改日期(看这篇文章:是否可以确定 SQL Server 2000 中上次修改存储过程的时间?)

I need to check when function was changed last time. I know how to check creation date (it is in function properties window in SQL Server Management Studio).
I found that in SQL Server 2000 it wasn't possible to check modify date ( look at this post: Is it possible to determine when a stored procedure was last modified in SQL Server 2000?)

是否可以在 SQL Server 2008 中检查它?MS 是否在系统表中添加了一些允许检查的新功能?

Is it possible to check it in SQL Server 2008? Does MS add some new feature in system tables that allow to check it?

推荐答案

SELECT name, create_date, modify_date 
FROM sys.objects
WHERE type = 'P'
ORDER BY modify_date DESC

函数的typeFN而不是过程的P.或者您可以过滤名称列.

The type for a function is FN rather than P for procedure. Or you can filter on the name column.

这篇关于如何检查 SQL Server 中存储过程或函数的最后更改日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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