[oracle@ora10g ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on 16 16:06:47 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORA10G (DBID=4175411955)
RMAN> list backupset;
using target database control file instead of recovery catalog
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
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
302 42.17M DISK 00:00:27 2014-11-21
BP Key: 302 Status: AVAILABLE Compressed: YES Tag: ARC_BAK
Piece Name: /u01/orabackup/backupsets/ora10g-4175411955_20141121_864227317_351.arc
List of Archived Logs in backup set 302
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ---------- ---------- ---------
1 39 1234835 2014-11-18 1247748 2014-11-21
1 40 1247748 2014-11-21 1249682 2014-11-21
1 41 1249682 2014-11-21 1250181 2014-11-21
1 42 1250181 2014-11-21 1258063 2014-11-21
1 43 1258063 2014-11-21 1260208 2014-11-21
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
303 Full 164.91M DISK 00:01:52 2014-11-21
BP Key: 303 Status: AVAILABLE Compressed: YES Tag: DB_BAK
Piece Name: /u01/orabackup/backupsets/ora10g-4175411955_20141121_864227354_352.db
List of Datafiles in backup set 303
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ---------- ----
1 Full 1260226 2014-11-21 /u01/app/oracle/oradata/ora10g/system01.dbf
2 Full 1260226 2014-11-21 /u01/app/oracle/oradata/ora10g/undotbs01.dbf
3 Full 1260226 2014-11-21 /u01/app/oracle/oradata/ora10g/sysaux01.dbf
4 Full 1260226 2014-11-21 /u01/app/oracle/oradata/ora10g/users01.dbf
5 Full 1260226 2014-11-21 /u01/app/oracle/oradata/ora10g/example01.dbf
6 Full 1260226 2014-11-21 /u01/app/oracle/oradata/ora10g/zlm01.dbf
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
304 19.50K DISK 00:00:01 2014-11-21
BP Key: 304 Status: AVAILABLE Compressed: YES Tag: ARC_BAK
Piece Name: /u01/orabackup/backupsets/ora10g-4175411955_20141121_864227471_353.arc
List of Archived Logs in backup set 304
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ---------- ---------- ---------
1 44 1260208 2014-11-21 1260277 2014-11-21
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
305 Full 7.23M DISK 00:00:01 2014-11-21
BP Key: 305 Status: AVAILABLE Compressed: NO Tag: TAG20141121T151114
Piece Name: /u01/orabackup/backupsets/ora10g-c-4175411955-20141121-04.ctl
Control File Included: Ckp SCN: 1260283 Ckp time: 2014-11-21
SPFILE Included: Modification time: 2014-11-21
RMAN> exit
Recovery Manager complete.
[oracle@ora10g ~]$ cd /u01/orabackup/backupsets/
[oracle@ora10g backupsets]$ ll -lrth
total 215M
-rw-r----- 1 oracle oinstall 43M Nov 21 15:09 ora10g-4175411955_20141121_864227317_351.arc
-rw-r----- 1 oracle oinstall 165M Nov 21 15:11 ora10g-4175411955_20141121_864227354_352.db
-rw-r----- 1 oracle oinstall 20K Nov 21 15:11 ora10g-4175411955_20141121_864227471_353.arc
-rw-r----- 1 oracle oinstall 7.3M Nov 21 15:11 ora10g-c-4175411955-20141121-04.ctl
--删除RMAN备份集
[oracle@ora10g backupsets]$ rm -f *
[oracle@ora10g backupsets]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on 16 16:07:59 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORA10G (DBID=4175411955)
RMAN> crosscheck backup;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=154 devtype=DISK
crosschecked backup piece: found to be ‘AVAILABLE‘
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 backup piece: found to be ‘EXPIRED‘
backup piece handle=/u01/orabackup/backupsets/ora10g-4175411955_20141121_864227317_351.arc recid=302 stamp=864227318
crosschecked backup piece: found to be ‘EXPIRED‘
backup piece handle=/u01/orabackup/backupsets/ora10g-4175411955_20141121_864227354_352.db recid=303 stamp=864227356
crosschecked backup piece: found to be ‘EXPIRED‘
backup piece handle=/u01/orabackup/backupsets/ora10g-4175411955_20141121_864227471_353.arc recid=304 stamp=864227472
crosschecked backup piece: found to be ‘EXPIRED‘
backup piece handle=/u01/orabackup/backupsets/ora10g-c-4175411955-20141121-04.ctl recid=305 stamp=864227475
Crosschecked 5 objects
RMAN> delete noprompt expired backupset;
using channel ORA_DISK_1
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