OCP-1Z0-053-V12.02-338题

 

338.You run the following commands:

RMAN> list expired backup;

RMAN> delete expired backup;

What will happen to the backup set pieces associated with the backups that appear in the list expired backup command?

A. They will be renamed.

B. Nothing will happen to them. The backup set pieces do not exist.

C. They will be deleted immediately since they are not in the flash recovery area.

D. You will need to manually remove the physical files listed in the output of the commands.

E. They will become hidden files and removed 10 days later.

Answer: B

答案解析:

实验验证:

首先备份数据文件6

RMAN> backup datafile 6;


Starting backup at 08-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/test1107/test01.dbf

channel ORA_DISK_1: starting piece 1 at 08-NOV-13

channel ORA_DISK_1: finished piece 1 at 08-NOV-13

piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp tag=TAG20131108T093420 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 08-NOV-13


Starting Control File and SPFILE Autobackup at 08-NOV-13

piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830943261_97sxmgdc_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 08-NOV-13


OS删除这个备份集

[oracle@rtest ~]$ rm -f /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp


使用 list expired backup列出失效的备份集,没有结果。

RMAN>  list expired backup;


specification does not match any backup in the repository


经过crosscheck backupset找出失效的备份集,然后再使用list expired backup;才能有结果,然后进行删除。故即使有失效的备份集,如果没有经过crosscheck 校验,list expired backup是不会出结果的。

RMAN> crosscheck backupset;


using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_annnn_TAG20131108T081845_97ss5r8g_.bkp RECID=44 STAMP=830938727

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_annnn_TAG20131108T081845_97ss5qyb_.bkp RECID=45 STAMP=830938727

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpdxy_.bkp RECID=54 STAMP=830940284

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpfgk_.bkp RECID=55 STAMP=830940285

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpcc6_.bkp RECID=56 STAMP=830940283

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830940663_97sv28vk_.bkp RECID=57 STAMP=830940664

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830942444_97swsyk3_.bkp RECID=59 STAMP=830942446

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830943261_97sxmgdc_.bkp RECID=61 STAMP=830943262

Crosschecked 8 objects


crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp RECID=60 STAMP=830943260

Crosschecked 1 objects



RMAN>  list expired backup;



List of Backup Sets

===================



BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

58      Full    1.11M      DISK        00:00:00     08-NOV-13      

        BP Key: 60   Status: EXPIRED  Compressed: NO  Tag: TAG20131108T093420

        Piece Name: /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp

  List of Datafiles in backup set 58

  File LV Type Ckp SCN    Ckp Time  Name

  ---- -- ---- ---------- --------- ----

  6       Full 1546195    08-NOV-13 /u01/app/oracle/oradata/test1107/test01.dbf


RMAN> delete expired backupset;


using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3


List of Backup Pieces

BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name

------- ------- --- --- ----------- ----------- ----------

60      58      1   1   EXPIRED     DISK        /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp


Do you really want to delete the above objects (enter YES or NO)? y

deleted backup piece

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp RECID=60 STAMP=830943260

Deleted 1 EXPIRED objects

原文地址:https://www.cnblogs.com/hzcya1995/p/13316457.html