闪回表
闪回hr.employees表到10分钟之前
SQL> flashback table hr.employees to timestamp (systimestamp - interval '10' minute);
Flashback complete.
将hr.employees闪回到SCN为1080381的时候
SQL> alter table hr.departments enable row movement;
Table altered.
将hr.employees和hr.departments两张表到SCN为1080381的时候。
SQL> alter table hr.employees enable row movement;
Table altered.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
1174240
SQL> flashback table hr.employees,hr.departments to scn 1174240;
Flashback complete.
(1)闪回表必须启用行移动功能
SQL> alter table hr.departments enable row movement;
Table altered.
SQL> alter table hr.employees enable row movement;
Table altered.
(2)"FLASHBACK TABLE"命令的执行者必须必须有"FLASHBACK ANY TABLE"系统权限或者闪回的表上具有"FLASHBACK"对象权限。
(3)"FLSHBACK TABLE"数据dll命令,所以自带的提交(Commit)功能。
(4)SYS用户的任何表无法使用此功能。
阅读(1745) | 评论(0) | 转发(0) |