:Flashback
Posted dingdingfish
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了:Flashback相关的知识,希望对你有一定的参考价值。
flashback,以下简称闪回,解决的是用户错误,如误删表,输入错数据等。可以闪回整库,某表或事务。
闪回技术简介
闪回数据库
效果和不完整恢复类似,在闪回点之后的事务全部丢失,数据库以resetlogs模式打开。
闪回查询,事务和表
此3技术均使用undo segment。闪回技术产生于9i。
闪回查询可以查询某一时间点的数据库。这样通过比较就可以知道发生了什么修改。
闪回事务将修复的过程自动化,提交的事务不能回退,当使用闪回查询知道产生修改的事务后,可以通过构建另一事务来抵消之前事务产生的更改。和闪回数据库不同,闪回事务不会丢失数据。
闪回表可以将某一时间点之后对表的改变全部撤销。闪回表会保证参照一致性和约束,因此有时需要将有关联的多表一起闪回。
闪回Drop
相当于undrop,只能闪回drop,不能闪回truncate。
闪回Data Archive (FBDA)
目前描述的闪回技术均有时间限制,闪回数据库受限于闪回log;闪回查询受限于undo retention。闪回drop受限于表空间大小。
和闪回查询和闪回drop不同,闪回Data Archive默认并未启用。为表启用闪回Data Archive后,会建立另一张表存行的所有版本,并可以存任意长时间。闪回Data Archive由后台进程FBDA负责。
FBDA可以设有效期,超期的数据将自动删除。
何时使用闪回
闪回数据库的使用非常慎重,只有当你考虑不完全恢复时才考虑使用,因为恢复速度会快些。例如不小心删除了整个schema。
闪回drop可以恢复表,和闪回数据库不同,闪回drop无需配置。
更细粒度的闪回可考虑闪回表和闪回事务。和闪回drop一样,这些闪回无需配置,但可能需要调整undo segment。
闪回Data Archive用于长期存储,如法律法规要求。
如果需要恢复truncate,只能使用闪回数据库。
另外,只有闪回数据库可以同时保证事务一致性和业务一致性,其它闪回只保证事务一致性。
如果发生介质错误,这时只有利用备份和恢复,闪回并无帮助。
使用闪回查询数据
需要借助undo来重构数据。
需要指定时间,然后映射为SCN。
基本闪回查询
SQL> create table t1 as select * from regions;
Table created.
SQL> alter session set nls_date_format='dd-mm-yy hh24:mi:ss';
Session altered.
SQL> select sysdate from dual;
SYSDATE
-----------------
17-12-19 08:42:59
SQL> select * from t1;
REGION_ID REGION_NAME
---------- -------------------------
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
SQL> delete from t1 where region_name like 'A%';
2 rows deleted.
SQL> commit;
Commit complete.
SQL> select * from t1;
REGION_ID REGION_NAME
---------- -------------------------
1 Europe
4 Middle East and Africa
-- 注意,此为minus操作,实际得出的是被删除的数据
SQL> select * from t1 as of timestamp to_timestamp('17-12-19 08:42:59', 'dd-mm-yy hh24:mi:ss') minus select * from t1;
REGION_ID REGION_NAME
---------- -------------------------
2 Americas
3 Asia
如果要执行一系列查询,可以将会话回退到之前的某一时间点。
DBMS_FLASHBACK的介绍见这里。enable_at_time和disable过程分别为启用和关闭闪回模式。
-- 普通用户需要赋权后才能执行以下过程,例如
-- grant execute on DBMS_FLASHBACK to hr;
SQL> execute dbms_flashback.enable_at_time(to_timestamp('17-12-19 08:42:59', 'dd-mm-yy hh24:mi:ss'));
PL/SQL procedure successfully completed.
SQL> select * from t1;
REGION_ID REGION_NAME
---------- -------------------------
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
SQL> delete from t1;
delete from t1
*
ERROR at line 1:
ORA-08182: operation not supported while in Flashback mode
SQL> execute dbms_flashback.disable;
PL/SQL procedure successfully completed.
SQL> select * from t1;
REGION_ID REGION_NAME
---------- -------------------------
1 Europe
4 Middle East and Africa
注意, sys用户不支持flashback。执行以上过程用户必须具有flashback包的执行权限。
flashback往回查询的时间取决于undo,其实也仅取决于undo,并不需要启用flashback database:
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
如果希望真的恢复表,可用以下命令,也就是下一节介绍的内容:
SQL> alter table t1 enable row movement;
Table altered.
SQL> flashback table t1 to timestamp to_timestamp('06-01-23 10:33:55', 'dd-mm-yy hh24:mi:ss');
Flashback complete.
SQL> select * from t1;
REGION_ID REGION_NAME
---------- -------------------------
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
闪回表
准确的说,并不是Query,而是使用新的事务抵消之前的事务。
示例:
SQL> insert into regions values(5, 'Africa');
1 row created.
SQL> insert into countries values('EE', 'Egypt', 5);
1 row created.
SQL> commit;
Commit complete.
SQL> select sysdate from dual;
SYSDATE
-----------------
17-12-19 09:12:25
SQL> delete from countries where region_id = 5;
1 row deleted.
SQL> delete from regions where region_id = 5;
1 row deleted.
SQL> commit;
Commit complete.
闪回表,需要启用row movement:
SQL> flashback table regions to timestamp to_timestamp('17-12-19 09:12:25', 'dd-mm-yy hh24:mi:ss');
flashback table regions to timestamp to_timestamp('17-12-19 09:12:25', 'dd-mm-yy hh24:mi:ss')
*
ERROR at line 1:
ORA-08189: cannot flashback the table because row movement is not enabled
SQL> alter table regions enable row movement;
Table altered.
SQL> alter table countries enable row movement;
alter table countries enable row movement
*
ERROR at line 1:
ORA-14066: illegal option for a non-partitioned index-organized table
由于有参照一致性,因此需要一起恢复:
SQL> flashback table countries to timestamp to_timestamp('17-12-19 09:12:25', 'dd-mm-yy hh24:mi:ss');
flashback table countries to timestamp to_timestamp('17-12-19 09:12:25', 'dd-mm-yy hh24:mi:ss')
*
ERROR at line 1:
ORA-02091: transaction rolled back
ORA-02291: integrity constraint (HR.COUNTR_REG_FK) violated - parent key not
found
SQL> flashback table countries,regions to timestamp to_timestamp('17-12-19 09:12:25', 'dd-mm-yy hh24:mi:ss');
Flashback complete.
SQL> select * from regions;
REGION_ID REGION_NAME
---------- -------------------------
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
5 Africa
SQL> select * from countries where region_id = 5;
CO COUNTRY_NAME REGION_ID
-- ---------------------------------------- ----------
EE Egypt 5
闪回表需要启用row movement。如果有参照一致性或约束,需要多个表一起恢复。
默认会禁止触发器,不过也可以激活。
闪回和数据库大小关系不大,主要和数据变化量相关。
抛开以上的过程不说,2023年1月6日,我在19c上用以下过程也恢复成功了:
SQL> flashback table regions to timestamp to_timestamp('06-01-23 10:51:39', 'dd-mm-yy hh24:mi:ss');
Flashback complete.
SQL> flashback table countries to timestamp to_timestamp('06-01-23 10:51:39', 'dd-mm-yy hh24:mi:ss');
Flashback complete.
此时,并没有一起恢复,同时表countries也没有启用row movement。
最后,执行清理:
delete from countries where region_id = 5;
delete from regions where region_id = 5;
commit;
闪回版本查询
SQL> select region_id, region_name, versions_xid, versions_startscn, versions_starttime, versions_endscn, versions_endtime, versions_operation from regions versions between scn minvalue and maxvalue;
REGION_ID REGION_NAME VERSIONS_XID VERSIONS_STARTSCN VERSIONS_STARTTIME VERSIONS_ENDSCN VERSIONS_ENDTIME V
---------- ------------------------- ---------------- ----------------- ------------------------ --------------- ------------------------ -
5 Africa 06001B009A030000 4741748 17-DEC-19 09.22.33 AM I
1 Europe 06001B009A030000 4741748 17-DEC-19 09.22.33 AM I
2 Americas 06001B009A030000 4741748 17-DEC-19 09.22.33 AM I
3 Asia 06001B009A030000 4741748 17-DEC-19 09.22.33 AM I
4 Middle East and Africa 06001B009A030000 4741748 17-DEC-19 09.22.33 AM I
4 Middle East and Africa 06001B009A030000 4741748 17-DEC-19 09.22.33 AM D
3 Asia 06001B009A030000 4741748 17-DEC-19 09.22.33 AM D
2 Americas 06001B009A030000 4741748 17-DEC-19 09.22.33 AM D
1 Europe 06001B009A030000 4741748 17-DEC-19 09.22.33 AM D
5 Africa 08001400D0030000 4741678 17-DEC-19 09.22.09 AM D
5 Africa 0100030048030000 4741669 17-DEC-19 09.21.51 AM 4741678 17-DEC-19 09.22.09 AM I
5 Africa 03000C00E6030000 4741588 17-DEC-19 09.19.59 AM D
1 Europe 4741748 17-DEC-19 09.22.33 AM
2 Americas 4741748 17-DEC-19 09.22.33 AM
3 Asia 4741748 17-DEC-19 09.22.33 AM
4 Middle East and Africa 4741748 17-DEC-19 09.22.33 AM
5 Africa 4741588 17-DEC-19 09.19.59 AM
17 rows selected.
可查询行的所有修改历史。以上结果按时间降序排列,因此需从底部读起。
以上minvalue和maxvalue实际为scn.minvalue和scn.maxvalue,是常数。也可以查询某事件范围,如between timestamp(systimestamp - 1/24) and timestamp
依赖于伪列(pseudocolumns ); 伪列不是ISO标准。以上VERSIONS_XID,VERSIONS_STARTSCN ,VERSIONS_ENDSCN,VERSIONS_OPERATION都是伪列。最著名的伪列是ROWID。
版本查询不支持外部表和视图,因为它们不产生undo。
闪回事务查询
也是利用undo数据,在视图FLASHBACK_TRANSACTION_QUERY中,需要SELECT ANY TRANSACTION权限查询。
此视图显示提交和正在进行的事务,正在进行的事务COMMIT_SCN 和 COMMIT_TIMESTAMP 为NULL。
SQL> desc FLASHBACK_TRANSACTION_QUERY
Name Null? Type
----------------------------------------- -------- ----------------------------
XID RAW(8)
START_SCN NUMBER
START_TIMESTAMP DATE
COMMIT_SCN NUMBER
COMMIT_TIMESTAMP DATE
LOGON_USER VARCHAR2(128)
UNDO_CHANGE# NUMBER
OPERATION VARCHAR2(32)
TABLE_NAME VARCHAR2(256)
TABLE_OWNER VARCHAR2(386)
ROW_ID VARCHAR2(19)
UNDO_SQL VARCHAR2(4000)
因为SQL是集合操作,可能影响多行,而每一行在此视图中都有一条记录。
SQL> update hr.employees set salary=salary*1.1 where employee_id = 206;
1 row updated.
SQL> commit;
Commit complete.
SQL> select employee_id, salary, versions_xid from hr.employees versions between scn minvalue and maxvalue where employee_id=206;
EMPLOYEE_ID SALARY VERSIONS_XID
----------- ---------- ----------------
206 9130 0A00090043030000
206 8300
SQL> select operation, undo_sql from FLASHBACK_TRANSACTION_QUERY where xid=hextoraw('0A00090043030000');
select operation, undo_sql from FLASHBACK_TRANSACTION_QUERY where xid=hextoraw('0A001D0042030000');
select operation, undo_sql from FLASHBACK_TRANSACTION_QUERY where xid='0A001D0042030000';
奇怪,查不到结果。
最后,参照了OLL中的例子。
可以看到undo_sql,但最后back out时,执行时间过长,没有结果:
-- 按照时间倒序排列,因此需先从底部看起
SQL> select region_id, region_name, versions_xid from regions versions between scn minvalue and maxvalue;
REGION_ID REGION_NAME VERSIONS_XID
---------- ------------------------- ----------------
30 Still called Venus 020017009F030000
50 Big star 0A00090045030000
40 Red star 0A00090045030000
10 No star 0A00090045030000
20 Many Moons 06001900BA030000
10 Two Poles 06001900BA030000
50 Saturn 040017004C030000
40 Mars 040017004C030000
30 Venus 040017004C030000
20 Moon 040017004C030000
10 Pole 040017004C030000
5 Africa
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
16 rows selected.
SQL> select * from regions;
REGION_ID REGION_NAME
---------- -------------------------
10 No star
20 Many Moons
30 Still called Venus
40 Red star
50 Big star
5 Africa
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
10 rows selected.
-- 5个insert
SQL> select operation, undo_sql from FLASHBACK_TRANSACTION_QUERY where xid=hextoraw('040017004C030000');
OPERATION
----------
UNDO_SQL
------------------------------------------------------------------------------------------------------------------------
INSERT
delete from "HR"."REGIONS" where ROWID = 'AAAR02AAMAAAACDAAE';
INSERT
delete from "HR"."REGIONS" where ROWID = 'AAAR02AAMAAAACDAAD';
INSERT
delete from "HR"."REGIONS" where ROWID = 'AAAR02AAMAAAACDAAC';
INSERT
delete from "HR"."REGIONS" where ROWID = 'AAAR02AAMAAAACDAAB';
INSERT
delete from "HR"."REGIONS" where ROWID = 'AAAR02AAMAAAACDAAA';
BEGIN
6 rows selected.
-- 两个update
SQL> select operation, undo_sql from FLASHBACK_TRANSACTION_QUERY where xid=hextoraw('06001900BA030000');
OPERATION
----------
UNDO_SQL
------------------------------------------------------------------------------------------------------------------------
UPDATE
update "HR"."REGIONS" set "REGION_NAME" = 'Moon' where ROWID = 'AAAR02AAMAAAACDAAB';
UPDATE
update "HR"."REGIONS" set "REGION_NAME" = 'Pole' where ROWID = 'AAAR02AAMAAAACDAAA';
BEGIN
-- 3个update
SQL> select operation, undo_sql from FLASHBACK_TRANSACTION_QUERY where xid=hextoraw('0A00090045030000');
OPERATION
----------
UNDO_SQL
------------------------------------------------------------------------------------------------------------------------
UPDATE
update "HR"."REGIONS" set "REGION_NAME" = 'Saturn' where ROWID = 'AAAR02AAMAAAACDAAE';
UPDATE
update "HR"."REGIONS" set "REGION_NAME" = 'Mars' where ROWID = 'AAAR02AAMAAAACDAAD';
UPDATE
update "HR"."REGIONS" set "REGION_NAME" = 'Two Poles' where ROWID = 'AAAR02AAMAAAACDAAA';
BEGIN
-- 一个update
SQL> select operation, undo_sql from FLASHBACK_TRANSACTION_QUERY where xid=hextoraw('020017009F030000');
OPERATION
----------
UNDO_SQL
------------------------------------------------------------------------------------------------------------------------
UPDATE
update "HR"."REGIONS" set "REGION_NAME" = 'Venus' where ROWID = 'AAAR02AAMAAAACDAAC';
BEGIN
exec dbms_flashback.transaction_backout(numtxns=>2, xids=>sys.xid_array('06001900BA030000', '0A00090045030000'), options=>dbms_flashback.cascade);
-- 一直等待...
闪回和 Undo 数据
40分钟前的可以查询到,40天之前的不行。
SQL> select count(*) from hr.employees as of timestamp(systimestamp - 40/1440);
COUNT(*)
----------
107
SQL> select count(*) from hr.employees as of timestamp(systimestamp - 40);
select count(*) from hr.employees as of timestamp(systimestamp - 40)
*
ERROR at line 1:
ORA-01466: unable to read data - table definition has changed
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
temp_undo_enabled boolean FALSE
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> show parameter retention
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target integer 1440
undo_retention integer 900
为保证足够的undo,需要为undo表空间设置RETENTION GUARANTEE,同时设置UNDO_RETENTION参数。
执行 Flashback Table 操作
删除表可能由于连到错误的schema,以下语句可显示当前schema:
set sqlprompt "_user'@'_connect_identifier>"
不能恢复truncate,只恢复drop table,表相关的对象除外键外均恢复,如索引,主键等。
Flashback Drop的实现
9i时,drop表是将其在数据字典中的条目删除,空间标识为可重用。如果要恢复,只能做非完全恢复。
在10g时,drop表实际为重命名表。重命名后,除外键备删外,其它均保留。
由于只是重命名,因此有可能可以恢复。删除的表被放入recycle bin中,每个用户都有自己的recycle bin。可查询USER_RECYCLEBIN,全局视图为DBA_RECYCLEBIN
但恢复未必能成功,因为其空间可能被重用,或者又创建了使用原来名字的表。所以,越早恢复,成功率越大。
使用 Flashback Drop
create table tmp(a int);
insert into tmp values(1);
commit;
drop table tmp;
select * from tmp;
flashback table tmp to before drop;
select * from tmp;
flashback drop可以重新命名对象,但不能改变schema。例如:
flashback table tmp to before drop rename to new_name;
两种情况下不能恢复,drop…purge和drop user … cascade,如下:
HR@orclpdb1>drop table tmp purge;
Table dropped.
HR@orclpdb1>flashback table tmp to before drop;
flashback table tmp to before drop
*
ERROR at line 1:
ORA-38305: object not in RECYCLE BIN
recycle bin中的内容可以通过show recyclebin或dba_recyclebin视图查询:
HR@orclpdb1>show recyclebin
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
---------------- ------------------------------ ------------ -------------------
T1 BIN$mdyY0E+vE/DgUwEAAH/vWw==$0 TABLE 2019-12-17:08:42:04
HR@orclpdb1>select object_name, original_name, type from dba_recyclebin;
OBJECT_NAME ORIGINAL_NAME TYPE
---------------------------------------- -------------------- -------------------------
BIN$mdyY0E+vE/DgUwEAAH/vWw==$0 T1 TABLE
管理 Recycle Bin
recycle bin的管理是自动的,也可以禁用:
HR@orclpdb1>show parameter recyclebin
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
recyclebin string on
查询Recycle Bin
最常用的是show recyclebin命令。也可以查询XXX_recyclebin视图。
HR@orclpdb1>select owner, original_name, type, droptime, can_undrop, space from dba_recyclebin;
OWNER ORIGINAL_NAME TYPE DROPTIME CAN SPACE
---------- -------------------- ------------------------- ------------------- --- ----------
HR T1 TABLE 2019-12-17:08:42:04 YES 8
最重要的是can_undrop
system表空间中的表不能undrop。
重用Recycle Bin空间
空间不够时,会先清理Recycle Bin.
从备份中执行表恢复
也成为Table PITR(Point-In-Time Recovery)
和闪回是不同的技术,但效果一样,都是将表恢复到之前状态。并且不受undo的限制。
在orclpdb1中创建表空间和表:
create tablespace testts datafile 'testts' size 10m;
create table system.testtab tablespace testts as select * from all_users;
备份表空间,注意PDB的写法:
$ rman target / catalog rcat_owner/Welcome1@rcat
RMAN> backup tablespace orclpdb1:testts;
记录SCN并删除表:
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
5930910
SQL> drop table system.testtab;
Table dropped.
使用RMAN恢复,注意PDB的语法:
RMAN> recover table system.testtab of pluggable database orclpdb1 until scn 5930910 auxiliary destination '/tmp'
这个过程很漫长,输出如下:
Starting recover at 21-DEC-19
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
Creating automatic instance, with SID='kvta'
initialization parameters used for automatic instance:
db_name=ORCLCDB
db_unique_name=kvta_pitr_orclpdb1_ORCLCDB
compatible=19.0.0
db_block_size=8192
db_files=200
diagnostic_dest=/opt/oracle
_system_trig_enabled=FALSE
sga_target=1152M
processes=200
db_create_file_dest=/tmp
log_archive_dest_1='location=/tmp'
enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No auxiliary parameter file used
starting up automatic instance ORCLCDB
Oracle instance started
Total System Global Area 1207959448 bytes
Fixed Size 9133976 bytes
Variable Size 318767104 bytes
Database Buffers 872415232 bytes
Redo Buffers 7643136 bytes
Automatic instance created
contents of Memory Script:
# set requested point in time
set until scn 5930910;
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log
sql 'alter system archive log current';
# resync catalog
resync catalog;
executing Memory Script
executing command: SET until clause
Starting restore at 21-DEC-19
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=180 device type=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: SID=181 device type=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: SID=22 device type=DISK
allocated channel: ORA_AUX_DISK_4
channel ORA_AUX_DISK_4: SID=182 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /u02/fra/ORCLCDB/autobackup/2019_12_21/o1_mf_s_1027639956_gzwgrnmc_.bkp
channel ORA_AUX_DISK_1: piece handle=/u02/fra/ORCLCDB/autobackup/2019_12_21/o1_mf_s_1027639956_gzwgrnmc_.bkp tag=TAG20191221T233236
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/tmp/ORCLCDB/controlfile/o1_mf_gzwhwyq2_.ctl
Finished restore at 21-DEC-19
sql statement: alter database mount clone database
sql statement: alter system archive log current
starting full resync of recovery catalog
full resync complete
contents of Memory Script:
# set requested point in time
set until scn 5930910;
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 9 to new;
set newname for clone datafile 1 to new;
set newname for clone datafile 11 to new;
set newname for clone datafile 4 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 10 to new;
set newname for clone tempfile 1 to new;
set newname for clone tempfile 3 to new;
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 9, 1, 11, 4, 3, 10;
switch clone datafile all;
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /tmp/ORCLCDB/datafile/o1_mf_temp_%u_.tmp in control file
renamed tempfile 3 to /tmp/ORCLCDB/974B2FC950D006CEE0530100007FB806/datafile/o1_mf_temp_%u_.tmp in control file
Starting restore at 21-DEC-19
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
using channel ORA_AUX_DISK_3
using channel ORA_AUX_DISK_4
channel ORA_AUX_DISK_1: restoring datafile 00009
input datafile copy RECID=9 STAMP=1026594967 file name=/u02/fra/backups/ORCLCDB_20191209_25uj163u
destination for restore of datafile 00009: /tmp/ORCLCDB/974B2FC950D006CEE0530100007FB806/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_2: restoring datafile 00001
input datafile copy RECID=7 STAMP=1026594939 file name=/u02/fra/backups/ORCLCDB_20191209_21uj161h
destination for restore of datafile 00001: /tmp/ORCLCDB/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_3: restoring datafile 00011
input datafile copy RECID=12 STAMP=1026594983 file name=/u02/fra/backups/ORCLCDB_20191209_27uj164f
destination for restore of datafile 00011: /tmp/ORCLCDB/974B2FC950D006CEE0530100007FB806/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_4: restoring datafile 00004
input datafile copy RECID=8 STAMP=1026594939 file name=/u02/fra/backups/ORCLCDB_20191209_24uj161h
destination for restore of datafile 00004: /tmp/ORCLCDB/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_3: copied datafile copy of datafile 00011, elapsed time: 00:00:03
output file name=/tmp/ORCLCDB/974B2FC950D006CEE0530100007FB806/datafile/o1_mf_undotbs1_gzwhxfq2_.dbf RECID=16 STAMP=1027641135
channel ORA_AUX_DISK_3: restoring datafile 00003
input datafile copy RECID=5 STAMP=1026594939 file name=/u02/fra/backups/ORCLCDB_20191209_22uj161h
destination for restore of datafile 00003: /tmp/ORCLCDB/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: copied datafile copy of datafile 00009, elapsed time: 00:00:39
output file name=/tmp/ORCLCDB/974B2FC950D006CEE0530100007FB806/datafile/o1_mf_system_gzwhxfp5_.dbf RECID=17 STAMP=1027641163
channel ORA_AUX_DISK_1: restoring datafile 00010
input datafile copy RECID=6 STAMP=1026594939 file name=/u02/fra/backups/ORCLCDB_20191209_23uj161h
destination for restore of datafile 00010: /tmp/ORCLCDB/974B2FC950D006CEE0530100007FB806/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_4: copied datafile copy of datafile 00004, elapsed time: 00:00:46
output file name=/tmp/ORCLCDB/datafile/o1_mf_undotbs1_gzwhxfqh_.dbf RECID=18 STAMP=1027641175
channel ORA_AUX_DISK_1: copied datafile copy of datafile 00010, elapsed time: 00:01:15
output file name以上是关于:Flashback的主要内容,如果未能解决你的问题,请参考以下文章