日期:2014-05-16  浏览次数:20417 次

从trace文件中查看rman备份操作的信息

1、执行RMAN备份脚本:脚本可以在博客里RMAN栏目下找到

[oracle@bys001 ~]$ sh archback.sh
RMAN> RMAN> 2> 3> 4> RMAN>

[oracle@bys001 ~]$

2.使用SYSDBA用户登陆并如下操作:

[oracle@bys001 ~]$ sqlplus / as sysdba

SYS@bys1>show user

USER is "SYS"
SYS@bys1> oradebug setmypid;
Statement processed.
SYS@bys1>oradebug dump controlf 3;
Statement processed.
SYS@bys1> oradebug tracefile_name;
/u01/diag/rdbms/bys1/bys1/trace/bys1_ora_13317.trc
SYS@bys1>exit

3.查看trace文件中的RMAN备份信息

[oracle@bys001 ~]$ tail -n 100 /u01/diag/rdbms/bys1/bys1/trace/bys1_ora_13317.trc
***************************************************************************
RMAN STATUS RECORDS
***************************************************************************
 (size = 116, compat size = 116, section max = 141, section in-use = 9,
  last-recid= 9, old-recno = 1, last-recno = 9)
 (extent = 1, blkno = 158, numrecs = 141)
Earliest record:
 RECID #1 Recno 1
  Internal Status: 34
  External Status: 18
    Command id: 2013-08-08T16:33:21
  Operation: RMAN
  Start and End time 08/08/13 16:33:24 08/08/13 16:33:42
Latest record:
 RECID #9 Recno 9
  Internal Status: 6
  External Status: 2
    Command id: 2013-09-13T09:40:15
  Operation: backup
  Start and End time 09/13/13 09:40:16 09/13/13 09:40:33
 
 
***************************************************************************
DATAFILE HISTORY RECORDS
***************************************************************************
 (size = 568, compat size = 568, section max = 57, section in-use = 0,
  last-recid= 0, old-recno = 0, last-recno = 0)
 (extent = 1, blkno = 161, numrecs = 57)
 
 
***************************************************************************
NORMAL RESTORE POINT RECORDS
***************************************************************************
 (size = 212, compat size = 212, section max = 2083, section in-use = 0,
  last-recid= 0, old-recno = 0, last-recno = 0)
 (extent = 1, blkno = 191, numrecs = 2083)
 
 
***************************************************************************
DATABASE BLOCK CORRUPTION RECORDS
***************************************************************************
 (size = 80, compat size = 80, section max = 8384, section in-use = 0,
  last-recid= 0, old-recno = 0, last-recno = 0)
 (extent = 1, blkno = 218, numrecs = 8384)
*** END OF DUMP ***

*** 2013-09-13 09:47:20.612
Oradebug command 'dump controlf 3' console output: <none>

*** 2013-09-13 09:47:26.707
Processing Oradebug command 'tracefile_name'

*** 2013-09-13 09:47:26.708
Oradebug command 'tracefile_name' console output:
/u01/diag/rdbms/bys1/bys1/trace/bys1_ora_13317.trc