1. Mục đích: Flashback lại PACKAGE SPEC hoặc PACKAGE BODY lỡ xóa mất mà không BACKUP trước đó
3. THỦ TỤC
-- Xác định Object_ID của PACKAGE, PACKAGE
select object_id from dba_objects
where object_name='PACKAGE_NAME' and owner='TEST_OWNER';
select * from dba_objects
where object_name='PACKAGE_NAME' and owner='TEST_OWNER';
+ Tìm ra object_id của PACKAGE, PACKAGE
==> 96188 PACKAGE SPEC
100644 PACKAGE BODY
-- Flashback lại PACKAGE BODY hoặc PACKAGE:
select SOURCE from sys.source$ as of timestamp
to_timestamp('24-Jul-2020 15:30:00','DD-Mon-YYYY hh24:MI:SS')
where obj#=100644 ;
select SOURCE from sys.source$ as of timestamp
to_timestamp('24-Jul-2020 15:30:00','DD-Mon-YYYY hh24:MI:SS')
where obj#=96188;
select SOURCE from sys.source$ as of timestamp
to_timestamp('24-Jul-2020 15:30:00','DD-Mon-YYYY hh24:MI:SS')
where obj#=96188;