rman 备份策略及恢复测试

版本:    os      redhat 6.4x86_64bit                                       db:  oracle 11.2.0.4 


增量差异备份: incremental backup
第一步:   备份 策略:    lv0    --  周日
                                        lv2    --  周一
                                        lv2    --  周二
                                        lv1    --  周三
                                        lv2    --  周四
                                        lv2    --  周五
                                       ==>   周六  可以分两步走:    lv2     or  lv1  


备份脚本:   lv0 :
     RMAN >  run{
                     allocate channel ch1 type disk;
                     allocate channel ch2 type disk;
                     backup incremental level 0 tag 'lv0'  database format '/dba/app/oracle/backup/%d_lv0_db_%S_%T_%U' include current controlfile;
                      sql 'alter system archive log current';
                      sql 'alter system archive log current';
                      backup archivelog all format '/dba/app/oracle/backup/%d_lv0_arch_%S_%T_%U';
                      release channel ch1;
                      release channel ch2;
                            }    

备份脚本:  lv2 :  
      RMAN > run{
                      backup incremental level 2 tag 'lv2' database format '/dba/app/oracle/backup/%d_lv2_db_%S_%T_%U' include current controlfile;
                      sql 'alter system archive log current';
                      sql 'alter system archive log current';
                      backup archivelog all format '/dba/app/oracle/backup/%d_lv2_arch_%S_%T_%U';
                             }   
 
   备份脚本 :  lv1 :
       RMAN> run {
                      backup incremental level 1 tag 'lv1' database format '/dba/app/oracle/backup/%d_lv1_db_%S_%T_%U' include current controlfile;
                      sql 'alter system archive log current';
                      sql 'alter system archive log current';
                      backup archivelog all format '/dba/app/oracle/backup/%d_lv1_arch_%S_%T_%U';
                              }

   RMAN  配置:   可以把 controlfile 自动打开备份     RMAN > configure controlfile autobackup on;


第二步: 备份及拷贝( 通过catalog 也可以,这里为了测试方便,使用local backup)

第三步:  确定恢复策略:

 lv0      周日         A
 lv2      周一         B
 lv2      周二         C
 lv1      周三         D
 lv2      周四         E 
 lv2      周五         F
 lv2 or lv1  周六    G

 假设:  周二 备份前 时间节点 损坏, 这恢复需要:  A+B
 假设 :    周五 备份前 时间节点损坏, 这恢复需要:  A+D+E

   恢复那个加点,就使用那个节点的备份 controlfile 文件, oracle 会自动应用 lv0,lv2 等:


第四步:    测试:     

           我这里主要测试:   C点 备份前 恢复数据:  A+B


  --------------------------------->备份部分:<--------------------------------
RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name MYSQL1 are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO 5 G;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/dba/app/oracle/product/11.2/dbhome_1/dbs/snapcf_mysql1.f'; # default

-----lv0-----

RMAN> run {
2> allocate channel ch1 type disk;
3>  allocate channel ch2 type disk;
4> backup incremental level 0 tag 'lv0'  database format '/dba/app/oracle/backup/%d_lv0_db_%S_%T_%U' include current controlfile;
5> sql 'alter system archive log current';
6> sql 'alter system archive log current';
7> backup archivelog all format '/dba/app/oracle/backup/%d_lv0_arch_%S_%T_%U';
8> release channel ch1;
9> release channel ch2;
10> }

released channel: ORA_DISK_1
allocated channel: ch1
channel ch1: SID=45 device type=DISK

allocated channel: ch2
channel ch2: SID=42 device type=DISK

Starting backup at 2015-01-28 21:38:41
channel ch1: starting incremental level 0 datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00001 name=/dba/app/oracle/oradata/mysql1/system01.dbf
input datafile file number=00005 name=/dba/app/oracle/oradata/mysql1/example01.dbf
input datafile file number=00003 name=/dba/app/oracle/oradata/mysql1/undotbs01.dbf
channel ch1: starting piece 1 at 2015-01-28 21:38:41
channel ch2: starting incremental level 0 datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00002 name=/dba/app/oracle/oradata/mysql1/sysaux01.dbf
input datafile file number=00004 name=/dba/app/oracle/oradata/mysql1/users01.dbf
channel ch2: starting piece 1 at 2015-01-28 21:38:41
channel ch1: finished piece 1 at 2015-01-28 21:38:56
piece handle= /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_12ptson1_1_1 tag=LV0 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:15
channel ch1: starting incremental level 0 datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00006 name=/dba/app/oracle/oradata/mysql1/ogg_01.dbf
channel ch1: starting piece 1 at 2015-01-28 21:38:56
channel ch2: finished piece 1 at 2015-01-28 21:38:56
piece handle= /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_13ptson1_1_1 tag=LV0 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:15
channel ch2: starting incremental level 0 datafile backup set
channel ch2: specifying datafile(s) in backup set
channel ch1: finished piece 1 at 2015-01-28 21:38:57
piece handle= /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_14ptsong_1_1 tag=LV0 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
including current control file in backup set
channel ch2: starting piece 1 at 2015-01-28 21:38:57
channel ch2: finished piece 1 at 2015-01-28 21:38:58
piece handle= /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_15ptsong_1_1 tag=LV0 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:01
Finished backup at 2015-01-28 21:38:58

Starting Control File and SPFILE Autobackup at 2015-01-28 21:38:58
piece handle= /dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870212338_bdksmls1_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2015-01-28 21:38:59

sql statement: alter system archive log current

sql statement: alter system archive log current

Starting backup at 2015-01-28 21:38:59
current log archived
channel ch1: starting archived log backup set
channel ch1: specifying archived log(s) in backup set
input archived log thread=1 sequence=64 RECID=59 STAMP=870212006
input archived log thread=1 sequence=65 RECID=60 STAMP=870212010
input archived log thread=1 sequence=66 RECID=61 STAMP=870212010
input archived log thread=1 sequence=67 RECID=62 STAMP=870212013
channel ch1: starting piece 1 at 2015-01-28 21:39:00
channel ch2: starting archived log backup set
channel ch2: specifying archived log(s) in backup set
input archived log thread=1 sequence=68 RECID=63 STAMP=870212016
input archived log thread=1 sequence=69 RECID=64 STAMP=870212339
channel ch2: starting piece 1 at 2015-01-28 21:39:00
channel ch1: finished piece 1 at 2015-01-28 21:39:01
piece handle=/dba/app/oracle/backup/MYSQL1_lv0_arch_%S_20150128_17ptsonk_1_1 tag=TAG20150128T213900 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
channel ch1: starting archived log backup set
channel ch1: specifying archived log(s) in backup set
input archived log thread=1 sequence=70 RECID=65 STAMP=870212339
input archived log thread=1 sequence=71 RECID=66 STAMP=870212340
channel ch1: starting piece 1 at 2015-01-28 21:39:01
channel ch2: finished piece 1 at 2015-01-28 21:39:01
piece handle=/dba/app/oracle/backup/MYSQL1_lv0_arch_%S_20150128_18ptsonk_1_1 tag=TAG20150128T213900 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:01
channel ch1: finished piece 1 at 2015-01-28 21:39:02
piece handle=/dba/app/oracle/backup/MYSQL1_lv0_arch_%S_20150128_19ptsonl_1_1 tag=TAG20150128T213900 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
Finished backup at 2015-01-28 21:39:02

Starting Control File and SPFILE Autobackup at 2015-01-28 21:39:02
piece  handle=/dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870212342_bdksmpds_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2015-01-28 21:39:03

released channel: ch1

released channel: ch2


------------
change  db data:
------------

SQL> create tablespace dominicli datafile '/dba/app/oracle/oradata/mysql1/dominicli.dbf' size 32m ; 

Tablespace created.

SQL> conn scott/scott
Connected.
SQL> select * from tab;

TNAME        TABTYPE CLUSTERID
------------------------------ ------- ----------
DEPT        TABLE
DOMINIC         TABLE
EMP        TABLE
TEST25        TABLE

SQL> drop table dominic purge;

Table dropped.

SQL> commit;

Commit complete.

SQL> create table test as select * from dept where deptno=20;

Table created.

SQL> select * from test;

    DEPTNO DNAME   LOC
---------- -------------- -------------
20 RESEARCH   DALLAS

SQL> select current_scn from v$database;

CURRENT_SCN
-----------
    3403558


------level 2级 备份
RMAN> run {
2> backup incremental level 2 tag 'lv2' database format '/dba/app/oracle/backup/%d_lv2_db_%S_%T_%U' include current controlfile;
3> sql 'alter system archive log current';
4> sql 'alter system archive log current';
5> backup archivelog all format '/dba/app/oracle/backup/%d_lv2_arch_%S_%T_%U';
6> }

Starting backup at 2015-01-28 21:48:40
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=29 device type=DISK
channel ORA_DISK_1: starting incremental level 2 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/dba/app/oracle/oradata/mysql1/sysaux01.dbf
input datafile file number=00001 name=/dba/app/oracle/oradata/mysql1/system01.dbf
input datafile file number=00005 name=/dba/app/oracle/oradata/mysql1/example01.dbf
input datafile file number=00004 name=/dba/app/oracle/oradata/mysql1/users01.dbf
input datafile file number=00003 name=/dba/app/oracle/oradata/mysql1/undotbs01.dbf
input datafile file number=00006 name=/dba/app/oracle/oradata/mysql1/ogg_01.dbf
input datafile file number=00007 name=/dba/app/oracle/oradata/mysql1/dominicli.dbf
channel ORA_DISK_1: starting piece 1 at 2015-01-28 21:48:40
channel ORA_DISK_1: finished piece 1 at 2015-01-28 21:49:15
piece handle=/dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1bptsp9o_1_1 tag=LV2 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting incremental level 2 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 2015-01-28 21:49:17
channel ORA_DISK_1: finished piece 1 at 2015-01-28 21:49:18
piece handle=/dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1cptspas_1_1 tag=LV2 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2015-01-28 21:49:18

Starting Control File and SPFILE Autobackup at 2015-01-28 21:49:18
piece handle=/dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870212958_bdkt6y5l_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2015-01-28 21:49:19

sql statement: alter system archive log current

sql statement: alter system archive log current

Starting backup at 2015-01-28 21:49:19
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=64 RECID=59 STAMP=870212006
input archived log thread=1 sequence=65 RECID=60 STAMP=870212010
input archived log thread=1 sequence=66 RECID=61 STAMP=870212010
input archived log thread=1 sequence=67 RECID=62 STAMP=870212013
input archived log thread=1 sequence=68 RECID=63 STAMP=870212016
input archived log thread=1 sequence=69 RECID=64 STAMP=870212339
input archived log thread=1 sequence=70 RECID=65 STAMP=870212339
input archived log thread=1 sequence=71 RECID=66 STAMP=870212340
input archived log thread=1 sequence=72 RECID=67 STAMP=870212959
input archived log thread=1 sequence=73 RECID=68 STAMP=870212959
input archived log thread=1 sequence=74 RECID=69 STAMP=870212959
channel ORA_DISK_1: starting piece 1 at 2015-01-28 21:49:19
channel ORA_DISK_1: finished piece 1 at 2015-01-28 21:49:20
piece handle=/dba/app/oracle/backup/MYSQL1_lv2_arch_%S_20150128_1eptspav_1_1 tag=TAG20150128T214919 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2015-01-28 21:49:20

Starting Control File and SPFILE Autobackup at 2015-01-28 21:49:20
piece handle=/dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870212960_bdkt70mz_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2015-01-28 21:49:21


-----change  db for database:
SQL> conn scott/scott
Connected.
SQL> select * from tab;

TNAME        TABTYPE CLUSTERID
------------------------------ ------- ----------
DBA        TABLE
DEPT        TABLE
DOMINIC         TABLE
EMP        TABLE

SQL> select count(*) from dba;

  COUNT(*)
----------
   2097152

SQL> select count(*) from dominic;

  COUNT(*)
----------
   1048582
   
SQL> select current_scn from v$database;

CURRENT_SCN
-----------
    3404568

------incremental  lv2 -----

RMAN> run {  
2> backup incremental level 2 tag 'lv2' database format '/dba/app/oracle/backup/%d_lv2_db_%S_%T_%U' include current controlfile;
3> sql 'alter system archive log current';
4> sql 'alter system archive log current';
5>  backup archivelog all format '/dba/app/oracle/backup/%d_lv2_arch_%S_%T_%U';
6>  }

Starting backup at 2015-01-28 21:58:59
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=43 device type=DISK
channel ORA_DISK_1: starting incremental level 2 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/dba/app/oracle/oradata/mysql1/sysaux01.dbf
input datafile file number=00001 name=/dba/app/oracle/oradata/mysql1/system01.dbf
input datafile file number=00005 name=/dba/app/oracle/oradata/mysql1/example01.dbf
input datafile file number=00004 name=/dba/app/oracle/oradata/mysql1/users01.dbf
input datafile file number=00003 name=/dba/app/oracle/oradata/mysql1/undotbs01.dbf
input datafile file number=00006 name=/dba/app/oracle/oradata/mysql1/ogg_01.dbf
input datafile file number=00007 name=/dba/app/oracle/oradata/mysql1/dominicli.dbf
channel ORA_DISK_1: starting piece 1 at 2015-01-28 21:58:59
channel ORA_DISK_1: finished piece 1 at 2015-01-28 21:59:06
piece handle=/dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1gptspt3_1_1 tag=LV2 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting incremental level 2 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 2015-01-28 21:59:07
channel ORA_DISK_1: finished piece 1 at 2015-01-28 21:59:08
piece handle=/dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1hptspta_1_1 tag=LV2 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2015-01-28 21:59:08

Starting Control File and SPFILE Autobackup at 2015-01-28 21:59:08
piece handle=/dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870213548_bdktsdor_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2015-01-28 21:59:09

sql statement: alter system archive log current

sql statement: alter system archive log current

Starting backup at 2015-01-28 21:59:10
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=64 RECID=59 STAMP=870212006
input archived log thread=1 sequence=65 RECID=60 STAMP=870212010
input archived log thread=1 sequence=66 RECID=61 STAMP=870212010
input archived log thread=1 sequence=67 RECID=62 STAMP=870212013
input archived log thread=1 sequence=68 RECID=63 STAMP=870212016
input archived log thread=1 sequence=69 RECID=64 STAMP=870212339
input archived log thread=1 sequence=70 RECID=65 STAMP=870212339
input archived log thread=1 sequence=71 RECID=66 STAMP=870212340
input archived log thread=1 sequence=72 RECID=67 STAMP=870212959
input archived log thread=1 sequence=73 RECID=68 STAMP=870212959
input archived log thread=1 sequence=74 RECID=69 STAMP=870212959
input archived log thread=1 sequence=75 RECID=70 STAMP=870213550
input archived log thread=1 sequence=76 RECID=71 STAMP=870213550
input archived log thread=1 sequence=77 RECID=72 STAMP=870213550
channel ORA_DISK_1: starting piece 1 at 2015-01-28 21:59:10
channel ORA_DISK_1: finished piece 1 at 2015-01-28 21:59:11
piece handle=/dba/app/oracle/backup/MYSQL1_lv2_arch_%S_20150128_1jptspte_1_1 tag=TAG20150128T215910 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2015-01-28 21:59:11

Starting Control File and SPFILE Autobackup at 2015-01-28 21:59:11
piece handle=/dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870213551_bdktshlt_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2015-01-28 21:59:12


----change db for data ----
SQL> create tablespace dba2 datafile '/dba/app/oracle/oradata/mysql1/dba2.dbf' size 32m
  2   autoextend on 
  3  next 32m maxsize 1g;

Tablespace created.

SQL> create user db2 identified by db2 default tablespace dba2 account unlock;

User created.

SQL> grant dba to db2;

Grant succeeded.
SQL> create table db2_tab as select * from scott.dominic;

Table created.

SQL> select * from tab;

TNAME        TABTYPE CLUSTERID
------------------------------ ------- ----------
DB2_TAB         TABLE

SQL> create table db3_tab as select * from db2_tab;

Table created.

SQL> insert into db3_tab select * from db3_tab;

1048582 rows created.

SQL> commit;


----levle 1 ------backup

[ oracle@dominic ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jan 28 22:03:44 2015

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

connected to target database: MYSQL1 (DBID=944962381)

RMAN> run {
2> backup incremental level 1 tag 'lv1' database format '/dba/app/oracle/backup/%d_lv1_db_%S_%T_%U' include current controlfile;
3> sql 'alter system archive log current';
4> sql 'alter system archive log current';
5>  backup archivelog all format '/dba/app/oracle/backup/%d_lv1_arch_%S_%T_%U';
6> }

Starting backup at 2015-01-28 22:05:42
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=52 device type=DISK
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/dba/app/oracle/oradata/mysql1/sysaux01.dbf
input datafile file number=00001 name=/dba/app/oracle/oradata/mysql1/system01.dbf
input datafile file number=00005 name=/dba/app/oracle/oradata/mysql1/example01.dbf
input datafile file number=00004 name=/dba/app/oracle/oradata/mysql1/users01.dbf
input datafile file number=00008 name=/dba/app/oracle/oradata/mysql1/dba2.dbf
input datafile file number=00003 name=/dba/app/oracle/oradata/mysql1/undotbs01.dbf
input datafile file number=00006 name=/dba/app/oracle/oradata/mysql1/ogg_01.dbf
input datafile file number=00007 name=/dba/app/oracle/oradata/mysql1/dominicli.dbf
channel ORA_DISK_1: starting piece 1 at 2015-01-28 22:05:43
channel ORA_DISK_1: finished piece 1 at 2015-01-28 22:06:08
piece handle=/dba/app/oracle/backup/MYSQL1_lv1_db_%S_20150128_1lptsq9m_1_1 tag=LV1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 2015-01-28 22:06:09
channel ORA_DISK_1: finished piece 1 at 2015-01-28 22:06:10
piece handle=/dba/app/oracle/backup/MYSQL1_lv1_db_%S_20150128_1mptsqag_1_1 tag=LV1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2015-01-28 22:06:10

Starting Control File and SPFILE Autobackup at 2015-01-28 22:06:10
piece handle=/dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870213970_bdkv6lcl_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2015-01-28 22:06:11

sql statement: alter system archive log current

sql statement: alter system archive log current

Starting backup at 2015-01-28 22:06:11
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=64 RECID=59 STAMP=870212006
input archived log thread=1 sequence=65 RECID=60 STAMP=870212010
input archived log thread=1 sequence=66 RECID=61 STAMP=870212010
input archived log thread=1 sequence=67 RECID=62 STAMP=870212013
input archived log thread=1 sequence=68 RECID=63 STAMP=870212016
input archived log thread=1 sequence=69 RECID=64 STAMP=870212339
input archived log thread=1 sequence=70 RECID=65 STAMP=870212339
input archived log thread=1 sequence=71 RECID=66 STAMP=870212340
input archived log thread=1 sequence=72 RECID=67 STAMP=870212959
input archived log thread=1 sequence=73 RECID=68 STAMP=870212959
input archived log thread=1 sequence=74 RECID=69 STAMP=870212959
input archived log thread=1 sequence=75 RECID=70 STAMP=870213550
input archived log thread=1 sequence=76 RECID=71 STAMP=870213550
input archived log thread=1 sequence=77 RECID=72 STAMP=870213550
input archived log thread=1 sequence=78 RECID=73 STAMP=870213816
input archived log thread=1 sequence=79 RECID=74 STAMP=870213971
input archived log thread=1 sequence=80 RECID=75 STAMP=870213971
input archived log thread=1 sequence=81 RECID=76 STAMP=870213971
channel ORA_DISK_1: starting piece 1 at 2015-01-28 22:06:11
channel ORA_DISK_1: finished piece 1 at 2015-01-28 22:06:14
piece handle=/dba/app/oracle/backup/MYSQL1_lv1_arch_%S_20150128_1optsqaj_1_1 tag=TAG20150128T220611 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 2015-01-28 22:06:15

Starting Control File and SPFILE Autobackup at 2015-01-28 22:06:15
piece handle=/dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870213975_bdkv6q4f_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2015-01-28 22:06:16




-----list backup 

connected to target database: MYSQL1 (DBID=944962381)

RMAN> list backup;

using target database control file instead of recovery catalog

List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
30      Incr 0  739.65M    DISK        00:00:08     2015-01-28 21:38:49
        BP Key: 31   Status: AVAILABLE  Compressed: NO  Tag: LV0
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_13ptson1_1_1
  List of Datafiles in backup set 30
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  2    0  Incr 3402703    2015-01-28 21:38:41 /dba/app/oracle/oradata/mysql1/sysaux01.dbf
  4    0  Incr 3402703    2015-01-28 21:38:41 /dba/app/oracle/oradata/mysql1/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
31      Incr 0  729.88M    DISK        00:00:09     2015-01-28 21:38:50
        BP Key: 32   Status: AVAILABLE  Compressed: NO  Tag: LV0
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_12ptson1_1_1
   List of Datafiles in backup set 31
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  1    0  Incr 3402702    2015-01-28 21:38:41 /dba/app/oracle/oradata/mysql1/system01.dbf
  3    0  Incr 3402702    2015-01-28 21:38:41 /dba/app/oracle/oradata/mysql1/undotbs01.dbf
  5    0  Incr 3402702    2015-01-28 21:38:41 /dba/app/oracle/oradata/mysql1/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
32      Incr 0  34.52M     DISK        00:00:00     2015-01-28 21:38:56
        BP Key: 33   Status: AVAILABLE  Compressed: NO  Tag: LV0
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_14ptsong_1_1
  List of Datafiles in backup set 32
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  6    0  Incr 3402719    2015-01-28 21:38:56 /dba/app/oracle/oradata/mysql1/ogg_01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
33      Incr 0  9.33M      DISK        00:00:01     2015-01-28 21:38:57
        BP Key: 34   Status: AVAILABLE  Compressed: NO  Tag: LV0
        Piece Name:  /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_15ptsong_1_1
  Control File Included: Ckp SCN: 3402719      Ckp time: 2015-01-28 21:38:56

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
34      Full    9.36M      DISK        00:00:00     2015-01-28 21:38:58
        BP Key: 35   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T213858
        Piece Name: /dba/app/oracle/fast_recovery_area/MYSQL1 /autobackup/2015_01_28/o1_mf_s_870212338_bdksmls1_.bkp
  SPFILE Included: Modification time: 2015-01-28 21:05:05
  SPFILE db_unique_name: MYSQL1
  Control File Included: Ckp SCN: 3402726      Ckp time: 2015-01-28 21:38:58

BS Key  Size       Device Type Elapsed Time Completion Time    
------- ---------- ----------- ------------ -------------------
35      24.00K     DISK        00:00:00     2015-01-28 21:39:00
        BP Key: 36   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T213900
         Piece Name: /dba/app/oracle/backup/MYSQL1_lv0_arch_%S_20150128_17ptsonk_1_1

  List of Archived Logs in backup set 35
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    64      3402257    2015-01-28 21:30:27 3402424    2015-01-28 21:33:26
  1    65      3402424    2015-01-28 21:33:26 3402427    2015-01-28 21:33:30
  1    66      3402427    2015-01-28 21:33:30 3402430    2015-01-28 21:33:30
  1    67      3402430    2015-01-28 21:33:30 3402433    2015-01-28 21:33:33

BS Key  Size       Device Type Elapsed Time Completion Time    
------- ---------- ----------- ------------ -------------------
36      182.50K    DISK        00:00:00     2015-01-28 21:39:00
        BP Key: 37   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T213900
         Piece Name: /dba/app/oracle/backup/MYSQL1_lv0_arch_%S_20150128_18ptsonk_1_1

  List of Archived Logs in backup set 36
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    68      3402433    2015-01-28 21:33:33 3402444    2015-01-28 21:33:36
  1    69      3402444    2015-01-28 21:33:36 3402742    2015-01-28 21:38:59

BS Key  Size       Device Type Elapsed Time Completion Time    
------- ---------- ----------- ------------ -------------------
37      2.50K      DISK        00:00:00     2015-01-28 21:39:01
        BP Key: 38   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T213900
         Piece Name: /dba/app/oracle/backup/MYSQL1_lv0_arch_%S_20150128_19ptsonl_1_1

  List of Archived Logs in backup set 37
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    70      3402742    2015-01-28 21:38:59 3402751    2015-01-28 21:38:59
  1    71      3402751    2015-01-28 21:38:59 3402759    2015-01-28 21:38:59

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
38      Full    9.39M      DISK        00:00:00     2015-01-28 21:39:02
        BP Key: 39   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T213902
        Piece Name: /dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870212342_bdksmpds_.bkp
  SPFILE Included: Modification time: 2015-01-28 21:05:05
  SPFILE db_unique_name: MYSQL1
  Control File Included: Ckp SCN: 3402768      Ckp time: 2015-01-28 21:39:02

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
39      Incr 2  2.59M      DISK        00:00:31     2015-01-28 21:49:11
        BP Key: 40   Status: AVAILABLE  Compressed: NO  Tag: LV2
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1bptsp9o_1_1
  List of Datafiles in backup set 39
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  1    2  Incr 3403796    2015-01-28 21:48:40 /dba/app/oracle/oradata/mysql1/system01.dbf
  2    2  Incr 3403796    2015-01-28 21:48:40 /dba/app/oracle/oradata/mysql1/sysaux01.dbf
  3    2  Incr 3403796    2015-01-28 21:48:40 /dba/app/oracle/oradata/mysql1/undotbs01.dbf
  4    2  Incr 3403796    2015-01-28 21:48:40 /dba/app/oracle/oradata/mysql1/users01.dbf
  5    2  Incr 3403796    2015-01-28 21:48:40 /dba/app/oracle/oradata/mysql1/example01.dbf
  6    2  Incr 3403796    2015-01-28 21:48:40 /dba/app/oracle/oradata/mysql1/ogg_01.dbf
  7    2  Incr 3403796    2015-01-28 21:48:40 /dba/app/oracle/oradata/mysql1/dominicli.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
40      Incr 2  9.36M      DISK        00:00:01     2015-01-28 21:49:17
        BP Key: 41   Status: AVAILABLE  Compressed: NO  Tag: LV2
         Piece Name: /dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1cptspas_1_1    <--- 我使用这个控制文件恢复
  Control File Included: Ckp SCN: 3403816      Ckp time: 2015-01-28 21:49:16

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
41      Full    9.39M      DISK        00:00:00     2015-01-28 21:49:18
        BP Key: 42   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T214918
        Piece Name: /dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870212958_bdkt6y5l_.bkp
  SPFILE Included: Modification time: 2015-01-28 21:41:36
  SPFILE db_unique_name: MYSQL1
  Control File Included: Ckp SCN: 3403823      Ckp time: 2015-01-28 21:49:18

BS Key  Size       Device Type Elapsed Time Completion Time    
------- ---------- ----------- ------------ -------------------
42      977.50K    DISK        00:00:00     2015-01-28 21:49:19
        BP Key: 43   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T214919
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv2_arch_%S_20150128_1eptspav_1_1

  List of Archived Logs in backup set 42
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    64      3402257    2015-01-28 21:30:27 3402424    2015-01-28 21:33:26
  1    65      3402424    2015-01-28 21:33:26 3402427    2015-01-28 21:33:30
  1    66      3402427    2015-01-28 21:33:30 3402430    2015-01-28 21:33:30
  1    67      3402430    2015-01-28 21:33:30 3402433    2015-01-28 21:33:33
  1    68      3402433    2015-01-28 21:33:33 3402444    2015-01-28 21:33:36
  1    69      3402444    2015-01-28 21:33:36 3402742    2015-01-28 21:38:59
  1    70      3402742    2015-01-28 21:38:59 3402751    2015-01-28 21:38:59
  1    71      3402751    2015-01-28 21:38:59 3402759    2015-01-28 21:38:59
  1    72      3402759    2015-01-28 21:38:59 3403840    2015-01-28 21:49:19
  1    73      3403840    2015-01-28 21:49:19 3403849    2015-01-28 21:49:19
  1    74      3403849    2015-01-28 21:49:19 3403857    2015-01-28 21:49:19

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
43      Full    9.39M      DISK        00:00:00     2015-01-28 21:49:20
        BP Key: 44   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T214920
        Piece Name: /dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870212960_bdkt70mz_.bkp
  SPFILE Included: Modification time: 2015-01-28 21:41:36
  SPFILE db_unique_name: MYSQL1
  Control File Included: Ckp SCN: 3403866      Ckp time: 2015-01-28 21:49:20

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
44      Incr 2  108.27M    DISK        00:00:05     2015-01-28 21:59:04
        BP Key: 45   Status: AVAILABLE  Compressed: NO  Tag: LV2
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1gptspt3_1_1
  List of Datafiles in backup set 44
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  1    2  Incr 3404986    2015-01-28 21:58:59 /dba/app/oracle/oradata/mysql1/system01.dbf
  2    2  Incr 3404986    2015-01-28 21:58:59 /dba/app/oracle/oradata/mysql1/sysaux01.dbf
  3    2  Incr 3404986    2015-01-28 21:58:59 /dba/app/oracle/oradata/mysql1/undotbs01.dbf
  4    2  Incr 3404986    2015-01-28 21:58:59 /dba/app/oracle/oradata/mysql1/users01.dbf
  5    2  Incr 3404986    2015-01-28 21:58:59 /dba/app/oracle/oradata/mysql1/example01.dbf
  6    2  Incr 3404986    2015-01-28 21:58:59 /dba/app/oracle/oradata/mysql1/ogg_01.dbf
  7    2  Incr 3404986    2015-01-28 21:58:59 /dba/app/oracle/oradata/mysql1/dominicli.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
45      Incr 2  9.36M      DISK        00:00:01     2015-01-28 21:59:07
        BP Key: 46   Status: AVAILABLE  Compressed: NO  Tag: LV2
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1hptspta_1_1
  Control File Included: Ckp SCN: 3404988      Ckp time: 2015-01-28 21:59:06

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
46      Full    9.39M      DISK        00:00:00     2015-01-28 21:59:08
        BP Key: 47   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T215908
        Piece Name: /dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870213548_bdktsdor_.bkp
  SPFILE Included: Modification time: 2015-01-28 21:41:36
  SPFILE db_unique_name: MYSQL1
  Control File Included: Ckp SCN: 3404995      Ckp time: 2015-01-28 21:59:08

BS Key  Size       Device Type Elapsed Time Completion Time    
------- ---------- ----------- ------------ -------------------
47      112.22M    DISK        00:00:00     2015-01-28 21:59:10
        BP Key: 48   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T215910
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv2_arch_%S_20150128_1jptspte_1_1

  List of Archived Logs in backup set 47
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    64      3402257    2015-01-28 21:30:27 3402424    2015-01-28 21:33:26
  1    65      3402424    2015-01-28 21:33:26 3402427    2015-01-28 21:33:30
  1    66      3402427    2015-01-28 21:33:30 3402430    2015-01-28 21:33:30
  1    67      3402430    2015-01-28 21:33:30 3402433    2015-01-28 21:33:33
  1    68      3402433    2015-01-28 21:33:33 3402444    2015-01-28 21:33:36
  1    69      3402444    2015-01-28 21:33:36 3402742    2015-01-28 21:38:59
  1    70      3402742    2015-01-28 21:38:59 3402751    2015-01-28 21:38:59
  1    71      3402751    2015-01-28 21:38:59 3402759    2015-01-28 21:38:59
  1    72      3402759    2015-01-28 21:38:59 3403840    2015-01-28 21:49:19
  1    73      3403840    2015-01-28 21:49:19 3403849    2015-01-28 21:49:19
  1    74      3403849    2015-01-28 21:49:19 3403857    2015-01-28 21:49:19
  1    75      3403857    2015-01-28 21:49:19 3405011    2015-01-28 21:59:09
  1    76      3405011    2015-01-28 21:59:09 3405020    2015-01-28 21:59:10
  1    77      3405020    2015-01-28 21:59:10 3405028    2015-01-28 21:59:10

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
48      Full    9.39M      DISK        00:00:00     2015-01-28 21:59:11
        BP Key: 49   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T215911
        Piece Name: /dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870213551_bdktshlt_.bkp
  SPFILE Included: Modification time: 2015-01-28 21:41:36
  SPFILE db_unique_name: MYSQL1
  Control File Included: Ckp SCN: 3405037      Ckp time: 2015-01-28 21:59:11

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
49      Incr 1  385.34M    DISK        00:00:18     2015-01-28 22:06:00
        BP Key: 50   Status: AVAILABLE  Compressed: NO  Tag: LV1
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv1_db_%S_20150128_1lptsq9m_1_1
  List of Datafiles in backup set 49
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  1    1  Incr 3411508    2015-01-28 22:05:43 /dba/app/oracle/oradata/mysql1/system01.dbf
  2    1  Incr 3411508    2015-01-28 22:05:43 /dba/app/oracle/oradata/mysql1/sysaux01.dbf
  3    1  Incr 3411508    2015-01-28 22:05:43 /dba/app/oracle/oradata/mysql1/undotbs01.dbf
  4    1  Incr 3411508    2015-01-28 22:05:43 /dba/app/oracle/oradata/mysql1/users01.dbf
  5    1  Incr 3411508    2015-01-28 22:05:43 /dba/app/oracle/oradata/mysql1/example01.dbf
  6    1  Incr 3411508    2015-01-28 22:05:43 /dba/app/oracle/oradata/mysql1/ogg_01.dbf
  7    1  Incr 3411508    2015-01-28 22:05:43 /dba/app/oracle/oradata/mysql1/dominicli.dbf
  8    1  Incr 3411508    2015-01-28 22:05:43 /dba/app/oracle/oradata/mysql1/dba2.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
50      Incr 1  9.36M      DISK        00:00:01     2015-01-28 22:06:09
        BP Key: 51   Status: AVAILABLE  Compressed: NO  Tag: LV1
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv1_db_%S_20150128_1mptsqag_1_1
  Control File Included: Ckp SCN: 3411524      Ckp time: 2015-01-28 22:06:08

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
51      Full    9.39M      DISK        00:00:00     2015-01-28 22:06:10
        BP Key: 52   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T220610
        Piece Name: /dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870213970_bdkv6lcl_.bkp
  SPFILE Included: Modification time: 2015-01-28 22:00:36
  SPFILE db_unique_name: MYSQL1
  Control File Included: Ckp SCN: 3411530      Ckp time: 2015-01-28 22:06:10

BS Key  Size       Device Type Elapsed Time Completion Time    
------- ---------- ----------- ------------ -------------------
52      389.77M    DISK        00:00:03     2015-01-28 22:06:14
        BP Key: 53   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T220611
        Piece Name: /dba/app/oracle/backup/MYSQL1_lv1_arch_%S_20150128_1optsqaj_1_1

  List of Archived Logs in backup set 52
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    64      3402257    2015-01-28 21:30:27 3402424    2015-01-28 21:33:26
  1    65      3402424    2015-01-28 21:33:26 3402427    2015-01-28 21:33:30
  1    66      3402427    2015-01-28 21:33:30 3402430    2015-01-28 21:33:30
  1    67      3402430    2015-01-28 21:33:30 3402433    2015-01-28 21:33:33
  1    68      3402433    2015-01-28 21:33:33 3402444    2015-01-28 21:33:36
  1    69      3402444    2015-01-28 21:33:36 3402742    2015-01-28 21:38:59
  1    70      3402742    2015-01-28 21:38:59 3402751    2015-01-28 21:38:59
  1    71      3402751    2015-01-28 21:38:59 3402759    2015-01-28 21:38:59
  1    72      3402759    2015-01-28 21:38:59 3403840    2015-01-28 21:49:19
  1    73      3403840    2015-01-28 21:49:19 3403849    2015-01-28 21:49:19
  1    74      3403849    2015-01-28 21:49:19 3403857    2015-01-28 21:49:19
  1    75      3403857    2015-01-28 21:49:19 3405011    2015-01-28 21:59:09
  1    76      3405011    2015-01-28 21:59:09 3405020    2015-01-28 21:59:10
  1    77      3405020    2015-01-28 21:59:10 3405028    2015-01-28 21:59:10
  1    78      3405028    2015-01-28 21:59:10 3411404    2015-01-28 22:03:34
  1    79      3411404    2015-01-28 22:03:34 3411547    2015-01-28 22:06:11
  1    80      3411547    2015-01-28 22:06:11 3411556    2015-01-28 22:06:11
  1    81      3411556    2015-01-28 22:06:11 3411564    2015-01-28 22:06:11

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
53      Full    9.39M      DISK        00:00:00     2015-01-28 22:06:15
        BP Key: 54   Status: AVAILABLE  Compressed: NO  Tag: TAG20150128T220615
        Piece Name: /dba/app/oracle/fast_recovery_area/MYSQL1/autobackup/2015_01_28/o1_mf_s_870213975_bdkv6q4f_.bkp
  SPFILE Included: Modification time: 2015-01-28 22:00:36
  SPFILE db_unique_name: MYSQL1
  Control File Included: Ckp SCN: 3411573      Ckp time: 2015-01-28 22:06:15
  
 [ oracle@dominic ~]$ cd /dba/app/oracle/backup/
[ oracle@dominic backup]$ ls
MYSQL1_lv0_arch_%S_20150128_17ptsonk_1_1  MYSQL1_lv0_db_%S_20150128_15ptsong_1_1    MYSQL1_lv2_db_%S_20150128_1bptsp9o_1_1
MYSQL1_lv0_arch_%S_20150128_18ptsonk_1_1  MYSQL1_lv1_arch_%S_20150128_1optsqaj_1_1  MYSQL1_lv2_db_%S_20150128_1cptspas_1_1
MYSQL1_lv0_arch_%S_20150128_19ptsonl_1_1  MYSQL1_lv1_db_%S_20150128_1lptsq9m_1_1    MYSQL1_lv2_db_%S_20150128_1gptspt3_1_1
MYSQL1_lv0_db_%S_20150128_12ptson1_1_1    MYSQL1_lv1_db_%S_20150128_1mptsqag_1_1    MYSQL1_lv2_db_%S_20150128_1hptspta_1_1
MYSQL1_lv0_db_%S_20150128_13ptson1_1_1    MYSQL1_lv2_arch_%S_20150128_1eptspav_1_1  ppfile
MYSQL1_lv0_db_%S_20150128_14ptsong_1_1    MYSQL1_lv2_arch_%S_20150128_1jptspte_1_1



------------------------------------> 恢复部分:<--------------------------------
拷贝其他库: 通过pfile 文件启动 nomount 状态:

RMAN> restore controlfile from '/dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1cptspas_1_1';

Starting restore at 2015-01-29 10:15:12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/dba/app/oracle/oradata/mysql1/control01.ctl
output file name=/dba/app/oracle/fast_recovery_area/mysql1/control02.ctl
Finished restore at 2015-01-29 10:15:14

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> restore database;

Starting restore at 2015-01-29 10:15:34
Starting implicit crosscheck backup at 2015-01-29 10:15:34
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
Crosschecked 10 objects
Finished implicit crosscheck backup at 2015-01-29 10:15:34

Starting implicit crosscheck copy at 2015-01-29 10:15:34
using channel ORA_DISK_1
Finished implicit crosscheck copy at 2015-01-29 10:15:34

searching for all files in the recovery area
cataloging files...
no files cataloged

using channel ORA_DISK_1

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 /dba/app/oracle/oradata/mysql1/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /dba/app/oracle/oradata/mysql1/users01.dbf
channel ORA_DISK_1: reading from backup piece /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_13ptson1_1_1
channel ORA_DISK_1: piece handle=/dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_13ptson1_1_1 tag=LV0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
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 /dba/app/oracle/oradata/mysql1/system01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /dba/app/oracle/oradata/mysql1/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /dba/app/oracle/oradata/mysql1/example01.dbf
channel ORA_DISK_1: reading from backup piece /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_12ptson1_1_1
channel ORA_DISK_1: piece handle=/dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_12ptson1_1_1 tag=LV0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
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 00006 to /dba/app/oracle/oradata/mysql1/ogg_01.dbf
channel ORA_DISK_1: reading from backup piece /dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_14ptsong_1_1
channel ORA_DISK_1: piece handle=/dba/app/oracle/backup/MYSQL1_lv0_db_%S_20150128_14ptsong_1_1 tag=LV0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
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 00007 to /dba/app/oracle/oradata/mysql1/dominicli.dbf
channel ORA_DISK_1: reading from backup piece /dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1bptsp9o_1_1
channel ORA_DISK_1: piece handle=/dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1bptsp9o_1_1 tag=LV2
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2015-01-29 10:16:37


RMAN> recover database;

Starting recover at 2015-01-29 10:17:37
using channel ORA_DISK_1
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: /dba/app/oracle/oradata/mysql1/system01.dbf
destination for restore of datafile 00002: /dba/app/oracle/oradata/mysql1/sysaux01.dbf
destination for restore of datafile 00003: /dba/app/oracle/oradata/mysql1/undotbs01.dbf
destination for restore of datafile 00004: /dba/app/oracle/oradata/mysql1/users01.dbf
destination for restore of datafile 00005: /dba/app/oracle/oradata/mysql1/example01.dbf
destination for restore of datafile 00006: /dba/app/oracle/oradata/mysql1/ogg_01.dbf
channel ORA_DISK_1: reading from backup piece /dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1bptsp9o_1_1
channel ORA_DISK_1: piece handle=/dba/app/oracle/backup/MYSQL1_lv2_db_%S_20150128_1bptsp9o_1_1 tag=LV2
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

starting media recovery

unable to find archived log
archived log thread=1 sequence=72
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/29/2015 10:17:38
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 72 and starting SCN of 3403796

SQL> alter database open resetlogs;


数据验证:
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/dba/app/oracle/oradata/mysql1/system01.dbf
/dba/app/oracle/oradata/mysql1/sysaux01.dbf
/dba/app/oracle/oradata/mysql1/undotbs01.dbf
/dba/app/oracle/oradata/mysql1/users01.dbf
/dba/app/oracle/oradata/mysql1/example01.dbf
/dba/app/oracle/oradata/mysql1/ogg_01.dbf
/dba/app/oracle/oradata/mysql1/dominicli.dbf
7 rows selected.
SQL> conn scott/scott
Connected.
SQL> select * from tab;
TNAME       TABTYPE CLUSTERID
------------------------------ ------- ----------
DEPT       TABLE
EMP       TABLE
TEST       TABLE
TEST25       TABLE
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
    3404453
SQL> select count(*) from test;
  COUNT(*)
----------
  1
SQL> select * from test;
    DEPTNO DNAME  LOC
---------- -------------- -------------
 20 RESEARCH  DALLAS
SQL> select count(*) from test25;
  COUNT(*)
----------
    262144
                          
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值