如果我创建了还原点
my_restore_point
create restore point my_restore_point;
然后闪回到这个restore_point
flashback database to restore point my_restore_point;
my_restore_point
还会存在吗?select * from v$restore_point where name = 'MY_RESTORE_POINT';
my_restore_point
还会存在吗?variable my_scn number
exec select scn into :my_scn from v$restore_point where name = 'MY_RESTORE_POINT'
flashback database to scn :my_scn;
之前还原点的SCN,
my_restore_point
还会存在吗?flashback database to before scn :my_scn;
my_restore_point
,UNTIL SCN x
是否仍然存在,其中 x
是 :my_scn
中的值?如果我有一个测试环境,我会自己尝试这些测试,所以我非常感谢这个社区的帮助。
使用 Oracle Database 19c 企业版版本 19
恢复点需要在 MOUNT 阶段可用,因此它们不像在闪回期间“回滚”的表等,例如
SQL> create restore point rp1 guarantee flashback database;
Restore point created.
SQL> create table t1 ( x int );
Table created.
SQL>
SQL> create restore point rp2 guarantee flashback database;
Restore point created.
SQL> create table t2 ( x int );
Table created.
SQL>
SQL> select name, scn from v$restore_point;
NAME SCN
------------------------------ --------------------
RP1 16331017175532
RP2 16331017175547
SQL>
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 3221224152 bytes
Fixed Size 9304792 bytes
Variable Size 2801795072 bytes
Database Buffers 385875968 bytes
Redo Buffers 24248320 bytes
Database mounted.
SQL>
SQL> flashback database to restore point rp2;
Flashback complete.
SQL> select name, scn from v$restore_point;
NAME SCN
------------------------------ --------------------
RP1 16331017175532
RP2 16331017175547
SQL>
SQL> flashback database to restore point rp1;
Flashback complete.
SQL> select name, scn from v$restore_point;
NAME SCN
------------------------------ --------------------
RP1 16331017175532
RP2 16331017175547