1. 异常介绍
ORA-01113: file 28 needs media recovery
ORA-01110: data file 28: '/<path>/<filename>.dbf'
在Oracle数据库启动过程中如果遇到ORA-01113/ORA-01110报错,造成数据库无法正常启动,日志文件可用时使用日志文件进行正常恢复,当日志文件损坏或所需日志被删除无法通过常规手段恢复时,通常使用bbed工具刷新数据文件头scn,使所有数据文件scn一致,成功启动数据库,使用bbed工具修复存在以下问题,
1、需要bbed工具非常熟悉
2、需要对Oracle数据块结构非常熟悉
3、需要对字节序熟悉
4、需要非常细心,逐字节逐文件修改,耗时且容易出错,
基于以上原因,本文使用工具一键刷新Oracle数据文件scn,操作过程如下所示,
2. 异常演示
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1202556928 bytes
Fixed Size 2252704 bytes
Variable Size 385876064 bytes
Database Buffers 805306368 bytes
Redo Buffers 9121792 bytes
Database mounted.
SQL>
SQL>
SQL> set linesize 200 pagesize 200
col ERROR for a10
col NAME for a30
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
select CHECKPOINT_CHANGE# from v$database;
select FILE#,CHECKPOINT_CHANGE#,CHECKPOINT_TIME from v$datafile;
select FILE#,name,STATUSSQL> SQL> SQL>
Session altered.
SQL> ,TS#,RFILE#,RESETLOGS_CHANGE#,RESETLOGS_TIME,CHECKPOINT_CHANGE#,CHECKPOINT_TIME,CHECKPOINT_COUNT,status,ERROR,RECOVER,FUZZY from v$datafile_header;
CHECKPOINT_CHANGE#
------------------
2977967
SQL>
FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME
---------- ------------------ -------------------
1 2977967 2020-04-05 07:36:00
2 2977967 2020-04-05 07:36:00
3 2977967 2020-04-05 07:36:00
4 2977967 2020-04-05 07:36:00
5 2977967 2020-04-05 07:36:00
6 2977967 2020-04-05 07:36:00
7 2977967 2020-04-05 07:36:00
8 2977967 2020-04-05 07:36:00
9 2977967 2020-04-05 07:36:00
10 2977967 2020-04-05 07:36:00
11 2977967 2020-04-05 07:36:00
12 2977967 2020-04-05 07:36:00
13 2977967 2020-04-05 07:36:00
14 2977967 2020-04-05 07:36:00
14 rows selected.
SQL>
FILE# NAME STATUS TS# RFILE# RESETLOGS_CHANGE# RESETLOGS_TIME CHECKPOINT_CHANGE# CHECKPOINT_TIME CHECKPOINT_COUNT STATUS ERROR REC FUZ
---------- ------------------------------ ------- ---------- ---------- ----------------- ------------------- ------------------ ------------------- ---------------- ------- ---------- --- ---
1 /oradata/epmsn/system01.dbf ONLINE 1 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 421 ONLINE NO YES
2 /oradata/epmsn/sysaux01.dbf ONLINE 1 2 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 421 ONLINE NO YES
3 /oradata/epmsn/undotbs01.dbf ONLINE 2 3 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 342 ONLINE NO YES
4 /oradata/epmsn/users01.dbf ONLINE 4 4 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 420 ONLINE NO YES
5 /oradata/epmsn/test1.dbf ONLINE 6 5 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 202 ONLINE NO YES
6 /oradata/epmsn/test2_1.dbf ONLINE 7 6 2878267 2020-04-05 07:29:12 2898651 2020-04-05 07:34:39 155 ONLINE YES YES
7 /oradata/epmsn/test3_1.dbf ONLINE 8 7 2878267 2020-04-05 07:29:12 2898651 2020-04-05 07:34:39 23 ONLINE YES YES
8 /oradata/epmsn/test4_1.dbf ONLINE 9 8 2878267 2020-04-05 07:29:12 2898651 2020-04-05 07:34:39 23 ONLINE YES YES
9 /oradata/epmsn/test5_1.dbf ONLINE 10 9 2878267 2020-04-05 07:29:12 2918657 2020-04-05 07:35:03 26 ONLINE YES YES
10 /oradata/epmsn/test6_1.dbf ONLINE 11 10 2878267 2020-04-05 07:29:12 2918657 2020-04-05 07:35:03 26 ONLINE YES YES
11 /oradata/epmsn/test7_1.dbf ONLINE 12 11 2878267 2020-04-05 07:29:12 2918657 2020-04-05 07:35:03 26 ONLINE YES YES
12 /oradata/epmsn/test8_1.dbf ONLINE 13 12 2878267 2020-04-05 07:29:12 2938030 2020-04-05 07:35:27 29 ONLINE YES YES
13 /oradata/epmsn/test9_1.dbf ONLINE 14 13 2878267 2020-04-05 07:29:12 2938030 2020-04-05 07:35:27 29 ONLINE YES YES
14 /oradata/epmsn/test10_1.dbf ONLINE 15 14 2878267 2020-04-05 07:29:12 2938030 2020-04-05 07:35:27 29 ONLINE YES YES
14 rows selected.
SQL> select group#,thread#,sequence#,first_change#,next_change# from v$log;
GROUP# THREAD# SEQUENCE# FIRST_CHANGE# NEXT_CHANGE#
---------- ---------- ---------- ------------- ------------
1 1 25 2977961 2977964
3 1 27 2977967 2.8147E+14
2 1 26 2977964 2977967
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /arch1/
Oldest online log sequence 25
Current log sequence 27
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@sourcedb backup]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Sun Apr 5 07:40:15 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: EPMSN (DBID=2733498539, not open)
RMAN> recover datafile 6;
Starting recover at 05-APR-20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
starting media recovery
archived log for thread 1 with sequence 25 is already on disk as file /oradata/epmsn/redo01.log
archived log for thread 1 with sequence 26 is already on disk as file /oradata/epmsn/redo02.log
archived log for thread 1 with sequence 27 is already on disk as file /oradata/epmsn/redo03.log
RMAN-08187: WARNING: media recovery until SCN 2898651 complete
Finished recover at 05-APR-20
RMAN> exit
Recovery Manager complete.
[oracle@sourcedb backup]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 5 07:40:36 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> set linesize 200 pagesize 200
col ERROR for a10
col NAME for a30
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
select CHECKPOINT_CHANGE# from v$database;
select FILE#,CHECKPOINT_CHANGE#,CHECKPOINT_TIME from v$datafile;
select FILE#,name,STATUSSQL> SQL> SQL>
Session altered.
SQL>
CHECKPOINT_CHANGE#
------------------
2977967
SQL> ,TS#,RFILE#,RESETLOGS_CHANGE#,RESETLOGS_TIME,CHECKPOINT_CHANGE#,CHECKPOINT_TIME,CHECKPOINT_COUNT,status,ERROR,RECOVER,FUZZY from v$datafile_header;
FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME
---------- ------------------ -------------------
1 2977967 2020-04-05 07:36:00
2 2977967 2020-04-05 07:36:00
3 2977967 2020-04-05 07:36:00
4 2977967 2020-04-05 07:36:00
5 2977967 2020-04-05 07:36:00
6 2977967 2020-04-05 07:36:00
7 2977967 2020-04-05 07:36:00
8 2977967 2020-04-05 07:36:00
9 2977967 2020-04-05 07:36:00
10 2977967 2020-04-05 07:36:00
11 2977967 2020-04-05 07:36:00
12 2977967 2020-04-05 07:36:00
13 2977967 2020-04-05 07:36:00
14 2977967 2020-04-05 07:36:00
14 rows selected.
SQL>
FILE# NAME STATUS TS# RFILE# RESETLOGS_CHANGE# RESETLOGS_TIME CHECKPOINT_CHANGE# CHECKPOINT_TIME CHECKPOINT_COUNT STATUS ERROR REC FUZ
---------- ------------------------------ ------- ---------- ---------- ----------------- ------------------- ------------------ ------------------- ---------------- ------- ---------- --- ---
1 /oradata/epmsn/system01.dbf ONLINE 1 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 421 ONLINE NO YES
2 /oradata/epmsn/sysaux01.dbf ONLINE 1 2 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 421 ONLINE NO YES
3 /oradata/epmsn/undotbs01.dbf ONLINE 2 3 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 342 ONLINE NO YES
4 /oradata/epmsn/users01.dbf ONLINE 4 4 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 420 ONLINE NO YES
5 /oradata/epmsn/test1.dbf ONLINE 6 5 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 202 ONLINE NO YES
6 /oradata/epmsn/test2_1.dbf ONLINE 7 6 2878267 2020-04-05 07:29:12 2898651 2020-04-05 07:34:39 155 ONLINE YES YES
7 /oradata/epmsn/test3_1.dbf ONLINE 8 7 2878267 2020-04-05 07:29:12 2898651 2020-04-05 07:34:39 23 ONLINE YES YES
8 /oradata/epmsn/test4_1.dbf ONLINE 9 8 2878267 2020-04-05 07:29:12 2898651 2020-04-05 07:34:39 23 ONLINE YES YES
9 /oradata/epmsn/test5_1.dbf ONLINE 10 9 2878267 2020-04-05 07:29:12 2918657 2020-04-05 07:35:03 26 ONLINE YES YES
10 /oradata/epmsn/test6_1.dbf ONLINE 11 10 2878267 2020-04-05 07:29:12 2918657 2020-04-05 07:35:03 26 ONLINE YES YES
11 /oradata/epmsn/test7_1.dbf ONLINE 12 11 2878267 2020-04-05 07:29:12 2918657 2020-04-05 07:35:03 26 ONLINE YES YES
12 /oradata/epmsn/test8_1.dbf ONLINE 13 12 2878267 2020-04-05 07:29:12 2938030 2020-04-05 07:35:27 29 ONLINE YES YES
13 /oradata/epmsn/test9_1.dbf ONLINE 14 13 2878267 2020-04-05 07:29:12 2938030 2020-04-05 07:35:27 29 ONLINE YES YES
14 /oradata/epmsn/test10_1.dbf ONLINE 15 14 2878267 2020-04-05 07:29:12 2938030 2020-04-05 07:35:27 29 ONLINE YES YES
14 rows selected.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 6 needs media recovery
ORA-01110: data file 6: '/oradata/epmsn/test2_1.dbf'
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@sourcedb backup]$
3. 刷新单个数据文件scn
[oracle@sourcedb xdul]$ ./xdul
xdul: Data Unload for Oracle version 1.1.1
Copyright(c) 2020 orastar.All rights reserved.
Wechat: xidoublestr
Email: 634025070@qq.com
loading default config.......
load config file 'config.txt' successful
loading default control file ......
ts# fn rfn bsize blocks filename kscnbas_484 kcvcptim_496 kcvfhrlc_112 kscnbas_116
---- ---- ---- ----- -------- -------------------------------------------- -------- -------- -------- --------
1 1 8192 97280 /oradata/epmsn/system01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
1 2 2 8192 90880 /oradata/epmsn/sysaux01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
2 3 3 8192 8960 /oradata/epmsn/undotbs01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
4 4 4 8192 640 /oradata/epmsn/users01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
6 5 5 8192 12800 /oradata/epmsn/test1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
7 6 6 8192 6400 /oradata/epmsn/test2_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
8 7 7 8192 6400 /oradata/epmsn/test3_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
9 8 8 8192 6400 /oradata/epmsn/test4_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
10 9 9 8192 6400 /oradata/epmsn/test5_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
11 10 10 8192 6400 /oradata/epmsn/test6_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
12 11 11 8192 6400 /oradata/epmsn/test7_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
13 12 12 8192 6400 /oradata/epmsn/test8_1.dbf 2cd4ae 3dce0c3f 3dce0ac8 2beb3b
14 13 13 8192 6400 /oradata/epmsn/test9_1.dbf 2cd4ae 3dce0c3f 3dce0ac8 2beb3b
15 14 14 8192 6400 /oradata/epmsn/test10_1.dbf 2cd4ae 3dce0c3f 3dce0ac8 2beb3b
load control file 'control.txt' successful
XDUL>
XDUL>
XDUL>
XDUL>pdfh
ts# fn rfn bsize blocks filename kscnbas_484 kcvcptim_496 kcvfhrlc_112 kscnbas_116
---- ---- ---- ----- -------- -------------------------------------------- -------- -------- -------- --------
1 1 8192 97280 /oradata/epmsn/system01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
1 2 2 8192 90880 /oradata/epmsn/sysaux01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
2 3 3 8192 8960 /oradata/epmsn/undotbs01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
4 4 4 8192 640 /oradata/epmsn/users01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
6 5 5 8192 12800 /oradata/epmsn/test1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
7 6 6 8192 6400 /oradata/epmsn/test2_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
8 7 7 8192 6400 /oradata/epmsn/test3_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
9 8 8 8192 6400 /oradata/epmsn/test4_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
10 9 9 8192 6400 /oradata/epmsn/test5_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
11 10 10 8192 6400 /oradata/epmsn/test6_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
12 11 11 8192 6400 /oradata/epmsn/test7_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
13 12 12 8192 6400 /oradata/epmsn/test8_1.dbf 2cd4ae 3dce0c3f 3dce0ac8 2beb3b
14 13 13 8192 6400 /oradata/epmsn/test9_1.dbf 2cd4ae 3dce0c3f 3dce0ac8 2beb3b
15 14 14 8192 6400 /oradata/epmsn/test10_1.dbf 2cd4ae 3dce0c3f 3dce0ac8 2beb3b
XDUL>rdfh
sync o(one) or a(all) datafile: o
intput source_rfn:1
intput target_rfn:14
loading default control file ......
ts# fn rfn bsize blocks filename kscnbas_484 kcvcptim_496 kcvfhrlc_112 kscnbas_116
---- ---- ---- ----- -------- -------------------------------------------- -------- -------- -------- --------
1 1 8192 97280 /oradata/epmsn/system01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
1 2 2 8192 90880 /oradata/epmsn/sysaux01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
2 3 3 8192 8960 /oradata/epmsn/undotbs01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
4 4 4 8192 640 /oradata/epmsn/users01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
6 5 5 8192 12800 /oradata/epmsn/test1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
7 6 6 8192 6400 /oradata/epmsn/test2_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
8 7 7 8192 6400 /oradata/epmsn/test3_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
9 8 8 8192 6400 /oradata/epmsn/test4_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
10 9 9 8192 6400 /oradata/epmsn/test5_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
11 10 10 8192 6400 /oradata/epmsn/test6_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
12 11 11 8192 6400 /oradata/epmsn/test7_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
13 12 12 8192 6400 /oradata/epmsn/test8_1.dbf 2cd4ae 3dce0c3f 3dce0ac8 2beb3b
14 13 13 8192 6400 /oradata/epmsn/test9_1.dbf 2cd4ae 3dce0c3f 3dce0ac8 2beb3b
15 14 14 8192 6400 /oradata/epmsn/test10_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
load control file 'control.txt' successful
XDUL>XDUL>
4. 刷新多个数据文件scn
XDUL>pdfh
ts# fn rfn bsize blocks filename kscnbas_484 kcvcptim_496 kcvfhrlc_112 kscnbas_116
---- ---- ---- ----- -------- -------------------------------------------- -------- -------- -------- --------
1 1 8192 97280 /oradata/epmsn/system01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
1 2 2 8192 90880 /oradata/epmsn/sysaux01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
2 3 3 8192 8960 /oradata/epmsn/undotbs01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
4 4 4 8192 640 /oradata/epmsn/users01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
6 5 5 8192 12800 /oradata/epmsn/test1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
7 6 6 8192 6400 /oradata/epmsn/test2_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
8 7 7 8192 6400 /oradata/epmsn/test3_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
9 8 8 8192 6400 /oradata/epmsn/test4_1.dbf 2c3adb 3dce0c0f 3dce0ac8 2beb3b
10 9 9 8192 6400 /oradata/epmsn/test5_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
11 10 10 8192 6400 /oradata/epmsn/test6_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
12 11 11 8192 6400 /oradata/epmsn/test7_1.dbf 2c8901 3dce0c27 3dce0ac8 2beb3b
13 12 12 8192 6400 /oradata/epmsn/test8_1.dbf 2cd4ae 3dce0c3f 3dce0ac8 2beb3b
14 13 13 8192 6400 /oradata/epmsn/test9_1.dbf 2cd4ae 3dce0c3f 3dce0ac8 2beb3b
15 14 14 8192 6400 /oradata/epmsn/test10_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
XDUL>rdfh
sync o(one) or a(all) datafile: a
intput source_rfn:1
loading default control file ......
ts# fn rfn bsize blocks filename kscnbas_484 kcvcptim_496 kcvfhrlc_112 kscnbas_116
---- ---- ---- ----- -------- -------------------------------------------- -------- -------- -------- --------
1 1 8192 97280 /oradata/epmsn/system01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
1 2 2 8192 90880 /oradata/epmsn/sysaux01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
2 3 3 8192 8960 /oradata/epmsn/undotbs01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
4 4 4 8192 640 /oradata/epmsn/users01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
6 5 5 8192 12800 /oradata/epmsn/test1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
7 6 6 8192 6400 /oradata/epmsn/test2_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
8 7 7 8192 6400 /oradata/epmsn/test3_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
9 8 8 8192 6400 /oradata/epmsn/test4_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
10 9 9 8192 6400 /oradata/epmsn/test5_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
11 10 10 8192 6400 /oradata/epmsn/test6_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
12 11 11 8192 6400 /oradata/epmsn/test7_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
13 12 12 8192 6400 /oradata/epmsn/test8_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
14 13 13 8192 6400 /oradata/epmsn/test9_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
15 14 14 8192 6400 /oradata/epmsn/test10_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
load control file 'control.txt' successful
XDUL>XDUL>
XDUL>
XDUL>
XDUL>pdfh
ts# fn rfn bsize blocks filename kscnbas_484 kcvcptim_496 kcvfhrlc_112 kscnbas_116
---- ---- ---- ----- -------- -------------------------------------------- -------- -------- -------- --------
1 1 8192 97280 /oradata/epmsn/system01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
1 2 2 8192 90880 /oradata/epmsn/sysaux01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
2 3 3 8192 8960 /oradata/epmsn/undotbs01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
4 4 4 8192 640 /oradata/epmsn/users01.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
6 5 5 8192 12800 /oradata/epmsn/test1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
7 6 6 8192 6400 /oradata/epmsn/test2_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
8 7 7 8192 6400 /oradata/epmsn/test3_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
9 8 8 8192 6400 /oradata/epmsn/test4_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
10 9 9 8192 6400 /oradata/epmsn/test5_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
11 10 10 8192 6400 /oradata/epmsn/test6_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
12 11 11 8192 6400 /oradata/epmsn/test7_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
13 12 12 8192 6400 /oradata/epmsn/test8_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
14 13 13 8192 6400 /oradata/epmsn/test9_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
15 14 14 8192 6400 /oradata/epmsn/test10_1.dbf 2d70af 3dce0c60 3dce0ac8 2beb3b
XDUL>exit
[oracle@sourcedb xdul]$
5. 恢复结果
[oracle@sourcedb xdul]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 5 07:43:09 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1202556928 bytes
Fixed Size 2252704 bytes
Variable Size 385876064 bytes
Database Buffers 805306368 bytes
Redo Buffers 9121792 bytes
Database mounted.
SQL> set linesize 200 pagesize 200
col ERROR for a10
col NAME for a30
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
select CHECKPOINT_CHANGE# from v$database;
select FILE#,CHECKPOINT_CHANGE#,CHECKPOINT_TIME from v$datafile;
select FILE#,name,STATUSSQL> SQL> SQL>
Session altered.
SQL> ,TS#,RFILE#,RESETLOGS_CHANGE#,RESETLOGS_TIME,CHECKPOINT_CHANGE#,CHECKPOINT_TIME,CHECKPOINT_COUNT,status,ERROR,RECOVER,FUZZY from v$datafile_header;
CHECKPOINT_CHANGE#
------------------
2977967
SQL>
FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME
---------- ------------------ -------------------
1 2977967 2020-04-05 07:36:00
2 2977967 2020-04-05 07:36:00
3 2977967 2020-04-05 07:36:00
4 2977967 2020-04-05 07:36:00
5 2977967 2020-04-05 07:36:00
6 2977967 2020-04-05 07:36:00
7 2977967 2020-04-05 07:36:00
8 2977967 2020-04-05 07:36:00
9 2977967 2020-04-05 07:36:00
10 2977967 2020-04-05 07:36:00
11 2977967 2020-04-05 07:36:00
12 2977967 2020-04-05 07:36:00
13 2977967 2020-04-05 07:36:00
14 2977967 2020-04-05 07:36:00
14 rows selected.
SQL>
FILE# NAME STATUS TS# RFILE# RESETLOGS_CHANGE# RESETLOGS_TIME CHECKPOINT_CHANGE# CHECKPOINT_TIME CHECKPOINT_COUNT STATUS ERROR REC FUZ
---------- ------------------------------ ------- ---------- ---------- ----------------- ------------------- ------------------ ------------------- ---------------- ------- ---------- --- ---
1 /oradata/epmsn/system01.dbf ONLINE 1 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 422 ONLINE NO YES
2 /oradata/epmsn/sysaux01.dbf ONLINE 1 2 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 422 ONLINE NO YES
3 /oradata/epmsn/undotbs01.dbf ONLINE 2 3 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 343 ONLINE NO YES
4 /oradata/epmsn/users01.dbf ONLINE 4 4 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 421 ONLINE NO YES
5 /oradata/epmsn/test1.dbf ONLINE 6 5 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 203 ONLINE NO YES
6 /oradata/epmsn/test2_1.dbf ONLINE 7 6 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 155 ONLINE YES YES
7 /oradata/epmsn/test3_1.dbf ONLINE 8 7 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 23 ONLINE YES YES
8 /oradata/epmsn/test4_1.dbf ONLINE 9 8 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 23 ONLINE YES YES
9 /oradata/epmsn/test5_1.dbf ONLINE 10 9 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 26 ONLINE YES YES
10 /oradata/epmsn/test6_1.dbf ONLINE 11 10 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 26 ONLINE YES YES
11 /oradata/epmsn/test7_1.dbf ONLINE 12 11 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 26 ONLINE YES YES
12 /oradata/epmsn/test8_1.dbf ONLINE 13 12 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 29 ONLINE YES YES
13 /oradata/epmsn/test9_1.dbf ONLINE 14 13 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 29 ONLINE YES YES
14 /oradata/epmsn/test10_1.dbf ONLINE 15 14 2878267 2020-04-05 07:29:12 2977967 2020-04-05 07:36:00 29 ONLINE YES YES
14 rows selected.
SQL> recover database;
Media recovery complete.
SQL> set linesize 200 pagesize 200
col ERROR for a10
col NAME for a30
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
select CHECKPOINT_CHANGE# from v$database;
select FILE#,CHECKPOINT_CHANGE#,CHECKPOINT_TIME from v$datafile;
select FILE#,name,STATUSSQL> SQL> SQL>
Session altered.
SQL>
CHECKPOINT_CHANGE#
------------------
2977967
SQL> ,TS#,RFILE#,RESETLOGS_CHANGE#,RESETLOGS_TIME,CHECKPOINT_CHANGE#,CHECKPOINT_TIME,CHECKPOINT_COUNT,status,ERROR,RECOVER,FUZZY from v$datafile_header;
FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME
---------- ------------------ -------------------
1 2997968 2020-04-05 07:36:00
2 2997968 2020-04-05 07:36:00
3 2997968 2020-04-05 07:36:00
4 2997968 2020-04-05 07:36:00
5 2997968 2020-04-05 07:36:00
6 2997968 2020-04-05 07:36:00
7 2997968 2020-04-05 07:36:00
8 2997968 2020-04-05 07:36:00
9 2997968 2020-04-05 07:36:00
10 2997968 2020-04-05 07:36:00
11 2997968 2020-04-05 07:36:00
12 2997968 2020-04-05 07:36:00
13 2997968 2020-04-05 07:36:00
14 2997968 2020-04-05 07:36:00
14 rows selected.
SQL>
FILE# NAME STATUS TS# RFILE# RESETLOGS_CHANGE# RESETLOGS_TIME CHECKPOINT_CHANGE# CHECKPOINT_TIME CHECKPOINT_COUNT STATUS ERROR REC FUZ
---------- ------------------------------ ------- ---------- ---------- ----------------- ------------------- ------------------ ------------------- ---------------- ------- ---------- --- ---
1 /oradata/epmsn/system01.dbf ONLINE 1 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 423 ONLINE NO NO
2 /oradata/epmsn/sysaux01.dbf ONLINE 1 2 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 423 ONLINE NO NO
3 /oradata/epmsn/undotbs01.dbf ONLINE 2 3 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 344 ONLINE NO NO
4 /oradata/epmsn/users01.dbf ONLINE 4 4 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 422 ONLINE NO NO
5 /oradata/epmsn/test1.dbf ONLINE 6 5 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 204 ONLINE NO NO
6 /oradata/epmsn/test2_1.dbf ONLINE 7 6 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 168 ONLINE NO NO
7 /oradata/epmsn/test3_1.dbf ONLINE 8 7 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 36 ONLINE NO NO
8 /oradata/epmsn/test4_1.dbf ONLINE 9 8 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 36 ONLINE NO NO
9 /oradata/epmsn/test5_1.dbf ONLINE 10 9 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 36 ONLINE NO NO
10 /oradata/epmsn/test6_1.dbf ONLINE 11 10 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 36 ONLINE NO NO
11 /oradata/epmsn/test7_1.dbf ONLINE 12 11 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 36 ONLINE NO NO
12 /oradata/epmsn/test8_1.dbf ONLINE 13 12 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 36 ONLINE NO NO
13 /oradata/epmsn/test9_1.dbf ONLINE 14 13 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 36 ONLINE NO NO
14 /oradata/epmsn/test10_1.dbf ONLINE 15 14 2878267 2020-04-05 07:29:12 2997968 2020-04-05 07:36:00 36 ONLINE NO NO
14 rows selected.
SQL> alter database open;
Database altered.
SQL>
SQL>
SQL>
SQL> alter system switch logfile;
System altered.
SQL>