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

ninesided picture ninesided · Nov 18, 2008 · Viewed 83.9k times · Source

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

Answer

WW. picture WW. · Nov 18, 2008
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.