oracle 闪回点

闪回点有2种
1有保证的闪回点。这中闪回点可以让你闪回数据库到闪回点,不管db_flashback_retention_target参数设置的范围。依赖与是否有足够的磁盘空间。

2常规闪回点,闪回到db_flashback_retention_target的范围中,数据库自动维护闪回点。

创建常规闪回点需要有select any dictionary 或是flashback any table权限。创建确保闪回点,一定要有sysdba系统权限。


查看闪回点,一定要有select any dictionary 或flashback any table系统权限或是select_catalog_role角色。

可以查看v$restore_point视图来查看当前有哪些可用闪回点。
SQL> SELECT NAME, SCN, TIME, DATABASE_INCARNATION#, GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE  FROM V$RESTORE_POINT  WHERE GUARANTEE_FLASHBACK_DATABASE='YES';

For normal restore points, STORAGE_SIZE is zero. For guaranteed restore points, STORAGE_SIZE indicates the amount of disk space in the flash recovery area used to retain logs required to guarantee FLASHBACK DATABASE to that restore point.


创建常规检查点
create resotre point good_data;

flashback table employees to restore point good_data;

创建有保证的闪回点
create restore point good_data guarantee flashback database;

删除闪回点
DROP RESTORE POINT before_app_upgrade;

闪回数据库

FLASHBACK DATABASE TO RESTORE POINT 'before_upgrade';

DB_FLASHBACK_RETENTION_TARGET specifies the upper limit (in minutes) on how far back in time the database may be flashedback. How far back one can flashback a database depends on how much flashback data Oracle has kept in the flash recovery area.
默认值是1440分钟

监控闪回区的空间
V$RECOVERY_FILE_DEST and V$FLASH_RECOVERY_AREA_USAGE".



你可能感兴趣的:(flashback)