Check whether the user has the Flashback permission
Select * from session_privs where privilege like 'flashback % ';
Grant user Flashback permission
Grant flashback any table to test;
Restore the deleted data.
Alter database add supplemental log data;
Delete from dept where dname = 'it ';
Commit;
Select * from dept where dname = 'it ';
View the operation and restore it using undo_ SQL
Select t. start_timestamp, t. commit_timestamp, t. logon_user, t. operation, t. table_name, t. table_owner, t. undo_ SQL from flashback_transaction_query t where table_name = 'dept ';
Time period-based recovery
Update dept set dname = 'China ';
Select * from dept;
Commit;
Enable row movement for the corresponding table, and use flashback Based on Time period (10 minutes)
Alter table dept enable row movement;
Flashback table dept to timestamp to_timestamp (sysdate-10/(24*60 ));
Restore the deleted table
Drop table dept;
Flashback table dept to before drop;
View Recycle Bin
Select * from user_recyclebin order by droptime desc;