How do I find out when a stored procedure was last

2019-03-12 08:31发布

I'm preferably looking for a SQL query to accomplish this, but other options might be useful too.

3条回答
仙女界的扛把子
2楼-- · 2019-03-12 08:55
SELECT name, create_date, modify_date 
FROM sys.procedures order by modify_date desc
查看更多
对你真心纯属浪费
3楼-- · 2019-03-12 09:03

Following query will do in Oracle

 SELECT * FROM ALL_OBJECTS WHERE OBJECT_NAME = 'OBJ_NAME' ;
查看更多
冷血范
4楼-- · 2019-03-12 09:13
SELECT LAST_DDL_TIME, TIMESTAMP
FROM USER_OBJECTS
WHERE OBJECT_TYPE = 'PROCEDURE'
AND OBJECT_NAME = 'MY_PROC';

LAST_DDL_TIME is the last time it was compiled. TIMESTAMP is the last time it was changed.

Procedures may need to be recompiled even if they have not changed when a dependency changes.

查看更多
登录 后发表回答