在Oracle Database 12.1中,闪回数据库操作仅限于 CDB ,Oracle Database 12.2支持 CDB 与 PDB 数据库的闪回。
PDB 的还原点种类:
1. normal restore point: create restore point pdb1_point1;
2. guaranteed restore point: create restore point pdb1_point1 guarantee flashback database;
-- 在需要设定干净还原点的 PDB 容器下 shutdown immediate , 然后在创建干净还原点。
3.1 clean normal restore point: create clean restore point cdb1_before_changes;
3.2 clean guaranteed restore point:create clean restore point cdb1_before_changes guarantee flashback database;
补充:PDB 中执行,如果是 CDB 中执行的话,在对应代码后面多添加 for pluggable database pdb_name 指定PDB名称
PDB 中支持的闪回数据库方式:
1.还原点
2.scn
3.timestamp
演示操作:
1、首先,我们开启数据库闪回功能:
[oracle@12c01 ~]$ mkdir -p /home/oracle/fast_recovery_area
SQL>alter system set db_recovery_file_dest_si