无RMAN备份集情况下的坏块恢复(3)


List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
302    302    1  1  EXPIRED    DISK        /u01/orabackup/backupsets/ora10g-4175411955_20141121_864227317_351.arc
303    303    1  1  EXPIRED    DISK        /u01/orabackup/backupsets/ora10g-4175411955_20141121_864227354_352.db
304    304    1  1  EXPIRED    DISK        /u01/orabackup/backupsets/ora10g-4175411955_20141121_864227471_353.arc
305    305    1  1  EXPIRED    DISK        /u01/orabackup/backupsets/ora10g-c-4175411955-20141121-04.ctl
deleted backup piece
backup piece handle=/u01/orabackup/backupsets/ora10g-4175411955_20141121_864227317_351.arc recid=302 stamp=864227318
deleted backup piece
backup piece handle=/u01/orabackup/backupsets/ora10g-4175411955_20141121_864227354_352.db recid=303 stamp=864227356
deleted backup piece
backup piece handle=/u01/orabackup/backupsets/ora10g-4175411955_20141121_864227471_353.arc recid=304 stamp=864227472
deleted backup piece
backup piece handle=/u01/orabackup/backupsets/ora10g-c-4175411955-20141121-04.ctl recid=305 stamp=864227475
Deleted 4 EXPIRED objects


现在把由RMAN脚本生成的备份集删除了,再查看一次


RMAN> list backup;


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


BS Key  Type LV Size      Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
286    Full    880.50M    DISK        00:01:35    2014-11-12   
        BP Key: 286  Status: AVAILABLE  Compressed: NO  Tag: TAG20141112T141548
        Piece Name: /u01/app/oracle/flash_recovery_area/ORA10G/backupset/2014_11_12/o1_mf_nnndf_TAG20141112T141548_b65yrnkg_.bkp
  List of Datafiles in backup set 286
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- ---------- ----
  1      Full 1202813    2014-11-12 /u01/app/oracle/oradata/ora10g/system01.dbf
  2      Full 1202813    2014-11-12 /u01/app/oracle/oradata/ora10g/undotbs01.dbf
  3      Full 1202813    2014-11-12 /u01/app/oracle/oradata/ora10g/sysaux01.dbf
  4      Full 1202813    2014-11-12 /u01/app/oracle/oradata/ora10g/users01.dbf
  5      Full 1202813    2014-11-12 /u01/app/oracle/oradata/ora10g/example01.dbf
  6      Full 1202813    2014-11-12


还有一个备份集在fra中做的全库备份,也将其删除


RMAN> host;

[oracle@ora10g backupsets]$ cd /u01/app/oracle/flash_recovery_area/ORA10G/backupset/
[oracle@ora10g backupset]$ ll
total 4
drwxr-x--- 2 oracle oinstall 4096 Nov 12 14:15 2014_11_12
[oracle@ora10g backupset]$ rm -rf *
[oracle@ora10g backupset]$ exit
exit
host command complete


RMAN> crosscheck backup;

using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/app/oracle/flash_recovery_area/ORA10G/backupset/2014_11_12/o1_mf_nnndf_TAG20141112T141548_b65yrnkg_.bkp recid=286 stamp=863446548
Crosschecked 1 objects


RMAN> delete noprompt expired backup;


using channel ORA_DISK_1


List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
286    286    1  1  EXPIRED    DISK        /u01/app/oracle/flash_recovery_area/ORA10G/backupset/2014_11_12/o1_mf_nnndf_TAG20141112T141548_b65yrnkg_.bkp
deleted backup piece
backup piece handle=/u01/app/oracle/flash_recovery_area/ORA10G/backupset/2014_11_12/o1_mf_nnndf_TAG20141112T141548_b65yrnkg_.bkp recid=286 stamp=863446548
Deleted 1 EXPIRED objects


RMAN> list backup summary;


RMAN> list backup;


RMAN> exit


好了,现在数据库的RMAN备份彻底没有了,继续我们的测试:


--开启测试表空间热备份模式
SQL> alter tablespace zlm begin backup;


Tablespace altered.


SQL> select * from v$backup;


FILE# STATUS                CHANGE# TIME
----- ------------------ ---------- ----------
    1 NOT ACTIVE                  0
    2 NOT ACTIVE                  0
    3 NOT ACTIVE                  0
    4 NOT ACTIVE                  0
    5 NOT ACTIVE                  0
    6 ACTIVE                1317685 2014-11-26


6 rows selected.


此时可以看到,开启热备模式以后,6号文件的状态从NOT ACTIVE变成了ACTIVE


SQL> select name,checkpoint_change# from v$datafile;

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/6d29b0b5cd7132448789a378b02e4a73.html