Flashback a procedure/package - Oracle Database Script. --- Like, tables ,If you have dropped or recreated a package/procedure, by using flashback ,we can get the proc code, before drop. -- get the object_id SQL> select object_id from dba_objects where owner='AODBA' and object_name='VOL_DISCOUNT_INSERT'; OBJECT_ID ---------- 2201943 -- Now get the flashback code using timestamp select SOURCE from sys.source$ as of timestamp to_timestamp('23-Apr-2017 10:00:20','DD-Mon-YYYY hh24:MI:SS') where obj#=2201943 ;
--- Like, tables ,If you have dropped or recreated a package/procedure, by using flashback ,we can get the proc code, before drop. -- get the object_id SQL> select object_id from dba_objects where owner='AODBA' and object_name='VOL_DISCOUNT_INSERT'; OBJECT_ID ---------- 2201943 -- Now get the flashback code using timestamp select SOURCE from sys.source$ as of timestamp to_timestamp('23-Apr-2017 10:00:20','DD-Mon-YYYY hh24:MI:SS') where obj#=2201943 ;