How do I find out when a stored procedure was last modified or compiled in Oracle?

我的梦境 提交于 2019-12-03 06:55:31

问题


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


回答1:


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.




回答2:


SELECT name, create_date, modify_date 
FROM sys.procedures order by modify_date desc



回答3:


Following query will do in Oracle

 SELECT * FROM ALL_OBJECTS WHERE OBJECT_NAME = 'OBJ_NAME' ;


来源:https://stackoverflow.com/questions/297392/how-do-i-find-out-when-a-stored-procedure-was-last-modified-or-compiled-in-oracl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!