Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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

like image 268
ninesided Avatar asked Nov 17 '08 23:11

ninesided


People also ask

How can check stored procedure history modification in SQL Server?

Accessing the log file in SQL Server ProfilerOpen the desired log file with SQL Server Profiler. You can see the stored procedure name in the ObjectName column and the name of the user who modified the stored procedure name in the LoginName column.

How can I tell who modified an Oracle package?

Hi, Here's one way: SELECT owner , object_name , last_ddl_time FROM all_objects -- or dba_objects, if you have privileges WHERE object_type IN ('PROCEDURE') ORDER BY last_ddl_time ; You can't modify procedures; all you can do is CREATE or REPLACE them.

How do you find the last modified date of a table in Oracle?

If you want to find, when a table was last modified like insert,update ,delete, then use the dictionary table dba_tab_modifications.


1 Answers

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.

like image 171
WW. Avatar answered Sep 23 '22 08:09

WW.