Flashback the procedure/package recover in Oracle

Flashback the procedure/package changes done at specific time by flashback feature in Oracle.
If we drop any procedure accidently then we recover from flashback.

In Example, we restore the dropped or changed procedure/package through flashback

  1. Check the object id of the package/procedure/function.
SQL> select object_id from dba_objects where owner='HR' and object_name='FIND_DEPARTMENT_ID';
OBJECT_ID
----------
5024237

2. Retrieve the flashback code using timestamp.

SQL> select SOURCE from sys.source$ as of timestamp to_timestamp('23-Apr-2017 10:00:20','DD-Mon-YYYY hh24:MI:SS') where obj#=5024237;
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply