某系统数据库的增量备份策略恢复测试过程

上半年,公司服务器虚拟化项目已经上线,所以近期的主要工作重心以P2V(物理机到虚拟机)的迁移为主,作为业务系统核心的后台数据库的迁移更是这项工作的重中之重。

本次数据库的迁移工作主要包含两部分的内容:一是跨平台(windows2003到OEL6)的数据库版本升级(Oracle 9.2.0.6到Oracle 11.2.0.4);二是数据迁移。由于这些变迁,伴随着发生了许多操作方式(习惯)的变化,最显著的一点就是备份方式的变更了。之前的备份方式是采用exp逻辑导出的方式,就目前业务运行的情形来看,此种备份方式无疑是不合适的,在新的数据库平台上,采用RMAN备份的方式来执行此项工作。

1.备份

有关数据库的备份策略简单介绍如下:

  • 周日进行0级增量备份;
  • 周三进行1级累积备份;
  • 周一/二/四/五/六进行1级增量备份;

2.恢复

关于备份策略的恢复测试,经过初步验证,被认定为是具有可操作性的。这里记录一下操作过程,以备不时之需:

  1. 模拟场景:2016年9月2日,发现数据库无法启动且无法修复。由于备份数据都是放在共享存储上,无需涉及备份集在源数据库和目标数据库之间的拷贝问题。
  2. 恢复工作:找到距离9月2日最近的一个星期日(2016年8月28日),利用8月28日的0级增量备份和8月29、30、31、9月1日的增量进行恢复。(利用8月28日的0级,8月31日的1级累积,9月1日的1级增量)

2.1 在目标数据库的$ORACLE_HOME/dbs下创建pfile(或init.ora),只需配置初始化参数db_name即可,启动数据库到nomount状态。
2.2 恢复源数据库的参数文件后关闭数据库。

$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Sep 2 09:55:46 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> startup nomount

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/initp201.ora'

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2260088 bytes
Variable Size                285213576 bytes
Database Buffers             775946240 bytes
Redo Buffers                   5517312 bytes

RMAN> restore spfile from '/u03/P201/20160828/ctl_spfile_c-2516054087-20160828-00';

Starting restore at 02-SEP-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=429 device type=DISK

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u03/P201/20160828/ctl_spfile_c-2516054087-20160828-00
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 02-SEP-16

RMAN> shutdown immediate

Oracle instance shut down

RMAN> exit

说明:如有必要,使用create pfile from spfile;命令将参数文件内存转储出来,以检查参数文件中的所有参数设置是否已在目标数据库(目录结构、内存设置等等)上满足。

2.3 用恢复出来的参数文件将数据库启动到nomount状态,然后恢复控制文件。

SQL> startup nomount
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size                  2254952 bytes
Variable Size            1291847576 bytes
Database Buffers          838860800 bytes
Redo Buffers                4923392 bytes
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@TCBH-DB-RECOVERY-241 dbs]$ 
[oracle@TCBH-DB-RECOVERY-241 dbs]$ 
[oracle@TCBH-DB-RECOVERY-241 dbs]$ 
[oracle@TCBH-DB-RECOVERY-241 dbs]$ 
[oracle@TCBH-DB-RECOVERY-241 dbs]$ 
[oracle@TCBH-DB-RECOVERY-241 dbs]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Sep 2 09:58:41 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: P201 (not mounted)

RMAN> restore controlfile from '/u03/P201/20160828/ctl_spfile_c-2516054087-20160828-00';

Starting restore at 02-SEP-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=197 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u02/oradata/p201/control01.ctl
output file name=/u02/oradata/p201/control02.ctl
Finished restore at 02-SEP-16

2.4 启动数据库到mount状态,执行restore和recover操作。

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> restore database;

Starting restore at 02-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=197 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u02/oradata/p201/system01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u02/oradata/p201/zabbix01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u02/oradata/p201/data01.dbf
channel ORA_DISK_1: restoring datafile 00008 to /u02/oradata/p201/indx02.dbf
channel ORA_DISK_1: restoring datafile 00009 to /u02/oradata/p201/tools01.dbf
channel ORA_DISK_1: reading from backup piece /u03/P201/20160828/full_P201_20160828_162.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160828/full_P201_20160828_162.bak tag=TAG20160828T220022
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00002 to /u02/oradata/p201/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /u02/oradata/p201/data02.dbf
channel ORA_DISK_1: restoring datafile 00007 to /u02/oradata/p201/indx01.dbf
channel ORA_DISK_1: restoring datafile 00010 to /u02/oradata/p201/rbsg01.dbf
channel ORA_DISK_1: reading from backup piece /u03/P201/20160828/full_P201_20160828_161.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160828/full_P201_20160828_161.bak tag=TAG20160828T220022
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:55
Finished restore at 02-SEP-16

RMAN> recover database;

Starting recover at 02-SEP-16
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=498
channel ORA_DISK_1: reading from backup piece /u03/P201/20160828/arch_P201_20160828_163.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160828/arch_P201_20160828_163.bak tag=TAG20160828T220317
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u02/archivelog/1_498_918787465.dbf thread=1 sequence=498
unable to find archived log
archived log thread=1 sequence=499
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/02/2016 10:08:56
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 499 and starting SCN of 5596358985699

说明:这里出现错误信息,提示缺少归档。这是必然的,因为此时的控制文件是2016年8月28日备份的(0级增量,相当于一个全备),控制文件中当然不会记录8月29日、8月30日、8月31日、9月1日的增量备份信息(catalog),我们需要使用 catalog start with 命令将之前的备份集信息重新导入到当前控制文件中,然后就可以进行后续的恢复了。

RMAN> catalog start with '/u03/P201/'; --在P201后一定要有/

using target database control file instead of recovery catalog
searching for all files that match the pattern /u03/P201/

List of Files Unknown to the Database
=====================================
File Name: /u03/P201/20160828/ctl_spfile_c-2516054087-20160828-00
File Name: /u03/P201/20160829/arch_P201_20160829_165.bak
File Name: /u03/P201/20160829/arch_P201_20160829_166.bak
File Name: /u03/P201/20160829/full_P201_20160829_167.bak
File Name: /u03/P201/20160829/full_P201_20160829_168.bak
File Name: /u03/P201/20160829/arch_P201_20160829_169.bak
File Name: /u03/P201/20160829/ctl_spfile_c-2516054087-20160829-00
File Name: /u03/P201/20160830/arch_P201_20160830_171.bak
File Name: /u03/P201/20160830/arch_P201_20160830_172.bak
File Name: /u03/P201/20160830/full_P201_20160830_174.bak
File Name: /u03/P201/20160830/full_P201_20160830_173.bak
File Name: /u03/P201/20160830/arch_P201_20160830_175.bak
File Name: /u03/P201/20160830/ctl_spfile_c-2516054087-20160830-00
File Name: /u03/P201/20160831/arch_P201_20160831_177.bak
File Name: /u03/P201/20160831/arch_P201_20160831_178.bak
File Name: /u03/P201/20160831/full_P201_20160831_180.bak
File Name: /u03/P201/20160831/full_P201_20160831_179.bak
File Name: /u03/P201/20160831/arch_P201_20160831_181.bak
File Name: /u03/P201/20160831/ctl_spfile_c-2516054087-20160831-00
File Name: /u03/P201/20160901/arch_P201_20160901_183.bak
File Name: /u03/P201/20160901/arch_P201_20160901_184.bak
File Name: /u03/P201/20160901/full_P201_20160901_185.bak
File Name: /u03/P201/20160901/full_P201_20160901_186.bak
File Name: /u03/P201/20160901/arch_P201_20160901_187.bak
File Name: /u03/P201/20160901/ctl_spfile_c-2516054087-20160901-00

Do you really want to catalog the above files (enter YES or NO)? y
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /u03/P201/20160828/ctl_spfile_c-2516054087-20160828-00
File Name: /u03/P201/20160829/arch_P201_20160829_165.bak
File Name: /u03/P201/20160829/arch_P201_20160829_166.bak
File Name: /u03/P201/20160829/full_P201_20160829_167.bak
File Name: /u03/P201/20160829/full_P201_20160829_168.bak
File Name: /u03/P201/20160829/arch_P201_20160829_169.bak
File Name: /u03/P201/20160829/ctl_spfile_c-2516054087-20160829-00
File Name: /u03/P201/20160830/arch_P201_20160830_171.bak
File Name: /u03/P201/20160830/arch_P201_20160830_172.bak
File Name: /u03/P201/20160830/full_P201_20160830_174.bak
File Name: /u03/P201/20160830/full_P201_20160830_173.bak
File Name: /u03/P201/20160830/arch_P201_20160830_175.bak
File Name: /u03/P201/20160830/ctl_spfile_c-2516054087-20160830-00
File Name: /u03/P201/20160831/arch_P201_20160831_177.bak
File Name: /u03/P201/20160831/arch_P201_20160831_178.bak
File Name: /u03/P201/20160831/full_P201_20160831_180.bak
File Name: /u03/P201/20160831/full_P201_20160831_179.bak
File Name: /u03/P201/20160831/arch_P201_20160831_181.bak
File Name: /u03/P201/20160831/ctl_spfile_c-2516054087-20160831-00
File Name: /u03/P201/20160901/arch_P201_20160901_183.bak
File Name: /u03/P201/20160901/arch_P201_20160901_184.bak
File Name: /u03/P201/20160901/full_P201_20160901_185.bak
File Name: /u03/P201/20160901/full_P201_20160901_186.bak
File Name: /u03/P201/20160901/arch_P201_20160901_187.bak
File Name: /u03/P201/20160901/ctl_spfile_c-2516054087-20160901-00

RMAN> recover database;

Starting recover at 02-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=197 device type=DISK
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u02/oradata/p201/system01.dbf
destination for restore of datafile 00003: /u02/oradata/p201/zabbix01.dbf
destination for restore of datafile 00005: /u02/oradata/p201/data01.dbf
destination for restore of datafile 00008: /u02/oradata/p201/indx02.dbf
destination for restore of datafile 00009: /u02/oradata/p201/tools01.dbf
channel ORA_DISK_1: reading from backup piece /u03/P201/20160831/full_P201_20160831_180.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160831/full_P201_20160831_180.bak tag=TAG20160831T220017
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u02/oradata/p201/sysaux01.dbf
destination for restore of datafile 00006: /u02/oradata/p201/data02.dbf
destination for restore of datafile 00007: /u02/oradata/p201/indx01.dbf
destination for restore of datafile 00010: /u02/oradata/p201/rbsg01.dbf
channel ORA_DISK_1: reading from backup piece /u03/P201/20160831/full_P201_20160831_179.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160831/full_P201_20160831_179.bak tag=TAG20160831T220017
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u02/oradata/p201/sysaux01.dbf
destination for restore of datafile 00006: /u02/oradata/p201/data02.dbf
destination for restore of datafile 00007: /u02/oradata/p201/indx01.dbf
destination for restore of datafile 00010: /u02/oradata/p201/rbsg01.dbf
channel ORA_DISK_1: reading from backup piece /u03/P201/20160901/full_P201_20160901_185.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160901/full_P201_20160901_185.bak tag=TAG20160901T220016
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u02/oradata/p201/system01.dbf
destination for restore of datafile 00003: /u02/oradata/p201/zabbix01.dbf
destination for restore of datafile 00005: /u02/oradata/p201/data01.dbf
destination for restore of datafile 00008: /u02/oradata/p201/indx02.dbf
destination for restore of datafile 00009: /u02/oradata/p201/tools01.dbf
channel ORA_DISK_1: reading from backup piece /u03/P201/20160901/full_P201_20160901_186.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160901/full_P201_20160901_186.bak tag=TAG20160901T220016
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=499
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=500
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=501
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=502
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=503
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=504
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=505
channel ORA_DISK_1: reading from backup piece /u03/P201/20160829/arch_P201_20160829_165.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160829/arch_P201_20160829_165.bak tag=TAG20160829T220007
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
archived log file name=/u02/archivelog/1_499_918787465.dbf thread=1 sequence=499
archived log file name=/u02/archivelog/1_500_918787465.dbf thread=1 sequence=500
archived log file name=/u02/archivelog/1_501_918787465.dbf thread=1 sequence=501
archived log file name=/u02/archivelog/1_502_918787465.dbf thread=1 sequence=502
archived log file name=/u02/archivelog/1_503_918787465.dbf thread=1 sequence=503
archived log file name=/u02/archivelog/1_504_918787465.dbf thread=1 sequence=504
archived log file name=/u02/archivelog/1_505_918787465.dbf thread=1 sequence=505
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=506
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=507
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=508
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=509
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=510
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=511
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=512
channel ORA_DISK_1: reading from backup piece /u03/P201/20160829/arch_P201_20160829_166.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160829/arch_P201_20160829_166.bak tag=TAG20160829T220007
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
archived log file name=/u02/archivelog/1_506_918787465.dbf thread=1 sequence=506
archived log file name=/u02/archivelog/1_507_918787465.dbf thread=1 sequence=507
archived log file name=/u02/archivelog/1_508_918787465.dbf thread=1 sequence=508
archived log file name=/u02/archivelog/1_509_918787465.dbf thread=1 sequence=509
archived log file name=/u02/archivelog/1_510_918787465.dbf thread=1 sequence=510
archived log file name=/u02/archivelog/1_511_918787465.dbf thread=1 sequence=511
archived log file name=/u02/archivelog/1_512_918787465.dbf thread=1 sequence=512
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=513
channel ORA_DISK_1: reading from backup piece /u03/P201/20160829/arch_P201_20160829_169.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160829/arch_P201_20160829_169.bak tag=TAG20160829T220138
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u02/archivelog/1_513_918787465.dbf thread=1 sequence=513
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=514
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=515
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=516
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=517
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=518
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=519
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=520
channel ORA_DISK_1: reading from backup piece /u03/P201/20160830/arch_P201_20160830_171.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160830/arch_P201_20160830_171.bak tag=TAG20160830T220007
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
archived log file name=/u02/archivelog/1_514_918787465.dbf thread=1 sequence=514
archived log file name=/u02/archivelog/1_515_918787465.dbf thread=1 sequence=515
archived log file name=/u02/archivelog/1_516_918787465.dbf thread=1 sequence=516
archived log file name=/u02/archivelog/1_517_918787465.dbf thread=1 sequence=517
archived log file name=/u02/archivelog/1_518_918787465.dbf thread=1 sequence=518
archived log file name=/u02/archivelog/1_519_918787465.dbf thread=1 sequence=519
archived log file name=/u02/archivelog/1_520_918787465.dbf thread=1 sequence=520
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=521
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=522
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=523
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=524
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=525
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=526
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=527
channel ORA_DISK_1: reading from backup piece /u03/P201/20160830/arch_P201_20160830_172.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160830/arch_P201_20160830_172.bak tag=TAG20160830T220007
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
archived log file name=/u02/archivelog/1_521_918787465.dbf thread=1 sequence=521
archived log file name=/u02/archivelog/1_522_918787465.dbf thread=1 sequence=522
archived log file name=/u02/archivelog/1_523_918787465.dbf thread=1 sequence=523
archived log file name=/u02/archivelog/1_524_918787465.dbf thread=1 sequence=524
archived log file name=/u02/archivelog/1_525_918787465.dbf thread=1 sequence=525
archived log file name=/u02/archivelog/1_526_918787465.dbf thread=1 sequence=526
archived log file name=/u02/archivelog/1_527_918787465.dbf thread=1 sequence=527
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=528
channel ORA_DISK_1: reading from backup piece /u03/P201/20160830/arch_P201_20160830_175.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160830/arch_P201_20160830_175.bak tag=TAG20160830T220202
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u02/archivelog/1_528_918787465.dbf thread=1 sequence=528
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=529
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=530
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=531
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=532
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=533
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=534
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=535
channel ORA_DISK_1: reading from backup piece /u03/P201/20160831/arch_P201_20160831_177.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160831/arch_P201_20160831_177.bak tag=TAG20160831T220008
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
archived log file name=/u02/archivelog/1_529_918787465.dbf thread=1 sequence=529
archived log file name=/u02/archivelog/1_530_918787465.dbf thread=1 sequence=530
archived log file name=/u02/archivelog/1_531_918787465.dbf thread=1 sequence=531
archived log file name=/u02/archivelog/1_532_918787465.dbf thread=1 sequence=532
archived log file name=/u02/archivelog/1_533_918787465.dbf thread=1 sequence=533
archived log file name=/u02/archivelog/1_534_918787465.dbf thread=1 sequence=534
archived log file name=/u02/archivelog/1_535_918787465.dbf thread=1 sequence=535
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=536
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=537
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=538
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=539
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=540
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=541
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=542
channel ORA_DISK_1: reading from backup piece /u03/P201/20160831/arch_P201_20160831_178.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160831/arch_P201_20160831_178.bak tag=TAG20160831T220008
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
archived log file name=/u02/archivelog/1_536_918787465.dbf thread=1 sequence=536
archived log file name=/u02/archivelog/1_537_918787465.dbf thread=1 sequence=537
archived log file name=/u02/archivelog/1_538_918787465.dbf thread=1 sequence=538
archived log file name=/u02/archivelog/1_539_918787465.dbf thread=1 sequence=539
archived log file name=/u02/archivelog/1_540_918787465.dbf thread=1 sequence=540
archived log file name=/u02/archivelog/1_541_918787465.dbf thread=1 sequence=541
archived log file name=/u02/archivelog/1_542_918787465.dbf thread=1 sequence=542
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=543
channel ORA_DISK_1: reading from backup piece /u03/P201/20160831/arch_P201_20160831_181.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160831/arch_P201_20160831_181.bak tag=TAG20160831T220155
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u02/archivelog/1_543_918787465.dbf thread=1 sequence=543
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=544
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=545
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=546
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=547
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=548
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=549
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=550
channel ORA_DISK_1: reading from backup piece /u03/P201/20160901/arch_P201_20160901_183.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160901/arch_P201_20160901_183.bak tag=TAG20160901T220008
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
archived log file name=/u02/archivelog/1_544_918787465.dbf thread=1 sequence=544
archived log file name=/u02/archivelog/1_545_918787465.dbf thread=1 sequence=545
archived log file name=/u02/archivelog/1_546_918787465.dbf thread=1 sequence=546
archived log file name=/u02/archivelog/1_547_918787465.dbf thread=1 sequence=547
archived log file name=/u02/archivelog/1_548_918787465.dbf thread=1 sequence=548
archived log file name=/u02/archivelog/1_549_918787465.dbf thread=1 sequence=549
archived log file name=/u02/archivelog/1_550_918787465.dbf thread=1 sequence=550
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=551
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=552
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=553
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=554
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=555
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=556
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=557
channel ORA_DISK_1: reading from backup piece /u03/P201/20160901/arch_P201_20160901_184.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160901/arch_P201_20160901_184.bak tag=TAG20160901T220008
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
archived log file name=/u02/archivelog/1_551_918787465.dbf thread=1 sequence=551
archived log file name=/u02/archivelog/1_552_918787465.dbf thread=1 sequence=552
archived log file name=/u02/archivelog/1_553_918787465.dbf thread=1 sequence=553
archived log file name=/u02/archivelog/1_554_918787465.dbf thread=1 sequence=554
archived log file name=/u02/archivelog/1_555_918787465.dbf thread=1 sequence=555
archived log file name=/u02/archivelog/1_556_918787465.dbf thread=1 sequence=556
archived log file name=/u02/archivelog/1_557_918787465.dbf thread=1 sequence=557
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=558
channel ORA_DISK_1: reading from backup piece /u03/P201/20160901/arch_P201_20160901_187.bak
channel ORA_DISK_1: piece handle=/u03/P201/20160901/arch_P201_20160901_187.bak tag=TAG20160901T220157
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u02/archivelog/1_558_918787465.dbf thread=1 sequence=558
unable to find archived log
archived log thread=1 sequence=559
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/02/2016 10:17:05
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 559 and starting SCN of 5596398978002

2.5 以resetlog方式打开数据库。

RMAN> alter database open resetlogs;

database opened

 

posted @ 2016-09-02 12:03  运维苦旅  阅读(800)  评论(0编辑  收藏  举报