RMAN 与control文件的关系

试验:

SQL> oradebug setmypid;
Statement processed.
SQL>

接着,进行backup:

 

RMAN> list backup;    

using target database control file instead of recovery catalog
specification does not match any backup in the repository

RMAN> backup database;

Starting backup at 02-APR-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=41 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 02-APR-14
channel ORA_DISK_1: finished piece 1 at 02-APR-14
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_04_02/o1_mf_nnndf_TAG20140402T164749_9mqmorj0_.bkp tag=TAG20140402T164749 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:17
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 02-APR-14
channel ORA_DISK_1: finished piece 1 at 02-APR-14
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_04_02/o1_mf_ncsnf_TAG20140402T164749_9mqmt1w2_.bkp tag=TAG20140402T164749 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 02-APR-14

RMAN> list backup;


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


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1       Full    1.10G      DISK        00:02:13     02-APR-14      
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20140402T164749
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_04_02/o1_mf_nnndf_TAG20140402T164749_9mqmorj0_.bkp
  List of Datafiles in backup set 1
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1059075    02-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1059075    02-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1059075    02-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1059075    02-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1059075    02-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2       Full    9.36M      DISK        00:00:05     02-APR-14      
        BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: TAG20140402T164749
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_04_02/o1_mf_ncsnf_TAG20140402T164749_9mqmt1w2_.bkp
  SPFILE Included: Modification time: 02-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1059260      Ckp time: 02-APR-14

RMAN>

此时,看controlfile的dump:

SQL> oradebug dump controlf 4;
Statement processed.
SQL>

查看目录 下的 trc文件

[oracle@localhost trace]$ pwd
/u01/app/oracle/diag/rdbms/orcl/orcl/trace
[oracle@localhost trace]$
看到最新生成的文件名:orcl_ora_13835.trc


查看此文件内容,确实可以看到backup的metada 反映在其中。

Earliest record:
 RECID #1 Recno 1 Record timestamp  04/02/14 16:47:52 piece #1  copy #1 pool 0
  Backup set key: stamp=843842869, count=1
  V$RMAN_STATUS: recid=140735352737336, stamp=140735352737328
  Flags: <concurrent access>
  Device: DISK
  Handle: /u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_04_02/o1_mf_nnndf_TAG20140402T164749_9mqmorj0_.bkp
  Media-Handle:
  Comment:
  Tag: TAG20140402T164749
  Completion time  04/02/14 16:50:01
Latest record:
 RECID #2 Recno 2 Record timestamp  04/02/14 16:50:09 piece #1  copy #1 pool 0
  Backup set key: stamp=843843006, count=2
  V$RMAN_STATUS: recid=140735352737336, stamp=140735352737328
  Flags: <concurrent access>
  Device: DISK
  Handle: /u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_04_02/o1_mf_ncsnf_TAG20140402T164749_9mqmt1w2_.bkp
  Media-Handle:
  Comment:
  Tag: TAG20140402T164749
  Completion time  04/02/14 16:50:11
 RECID #1 Recno 1 Record timestamp  04/02/14 16:47:52 piece #1  copy #1 pool 0
  Backup set key: stamp=843842869, count=1
  V$RMAN_STATUS: recid=140735352737336, stamp=140735352737328
  Flags: <concurrent access>
  Device: DISK
  Handle: /u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_04_02/o1_mf_nnndf_TAG20140402T164749_9mqmorj0_.bkp
  Media-Handle:
  Comment:
  Tag: TAG20140402T164749
  Completion time  04/02/14 16:50:01


你可能感兴趣的:(rman)