根源就在这里,这个库以前作为ogg的source端使用过一段时间,后来业务变更,ogg就停掉了。但是配置ogg时注册进ogg的一些服务并没有清除,ogg 11g的 logretention和12c的integrated在日志没有被抽取的时候,会阻止rman中的归档备份被清除。
登入ogg把之前的两个抽取进程unregister一下
GGSCI (hubsrac01 as oggadmin@orclrac1) 7> dblogin userid oggadmin,password oggadmin
GGSCI (hubsrac01 as oggadmin@orclrac1) 7> unregister extract fm1 database
GGSCI (hubsrac01 as oggadmin@orclrac1) 7> unregister extract et1 database
清除过程中数据库的alert信息如下
GoldenGate Apply: OGG$FM1 APPLY Dropped
APPLY OGG$FM1: Apply User: OGGADMIN
APPLY OGG$FM1: Apply Tag: 00
Tue Aug 30 15:05:40 2016
Streams Capture: OGG$CAP_FM1 CAPTURE Dropped
CAPTURE OGG$CAP_FM1: Start SCN: 46167477979 (0xbfcbcedb.0000000a)
CAPTURE OGG$CAP_FM1: First SCN: 46167477979 (0xbfcbcedb.0000000a)
CAPTURE OGG$CAP_FM1: Required Checkpoint SCN: 46264409580 (0xc592ddec.0000000a)
CAPTURE OGG$CAP_FM1: Captured SCN: 46264409883 (0xc592df1b.0000000a)
CAPTURE OGG$CAP_FM1: Applied SCN: 46264409580 (0xc592ddec.0000000a)
CAPTURE OGG$CAP_FM1: Capture Type: LOCAL
CAPTURE OGG$CAP_FM1: Logminer Id: 4
CAPTURE OGG$CAP_FM1: Source Database: ORCLRAC
Tue Aug 30 15:05:53 2016
ALTER SYSTEM SET service_names='SYS$OGGADMIN.OGG$Q_ET1.ORCLRAC' SCOPE=MEMORY SID='orclrac2';
Tue Aug 30 15:06:31 2016
GoldenGate Apply: OGG$ET1 APPLY Dropped
APPLY OGG$ET1: Apply User: OGGADMIN
APPLY OGG$ET1: Apply Tag: 00
Tue Aug 30 15:06:32 2016
Streams Capture: OGG$CAP_ET1 CAPTURE Dropped
CAPTURE OGG$CAP_ET1: Start SCN: 46165434320 (0xbfac9fd0.0000000a)
CAPTURE OGG$CAP_ET1: First SCN: 46165434320 (0xbfac9fd0.0000000a)
CAPTURE OGG$CAP_ET1: Required Checkpoint SCN: 46264410538 (0xc592e1aa.0000000a)
CAPTURE OGG$CAP_ET1: Captured SCN: 46264410853 (0xc592e2e5.0000000a)
CAPTURE OGG$CAP_ET1: Applied SCN: 46264410538 (0xc592e1aa.0000000a)
CAPTURE OGG$CAP_ET1: Capture Type: LOCAL
CAPTURE OGG$CAP_ET1: Logminer Id: 2
CAPTURE OGG$CAP_ET1: Source Database: ORCLRAC
Tue Aug 30 15:06:42 2016
ALTER SYSTEM SET service_names='hubsrac' SCOPE=MEMORY SID='orclrac2';
再次检查obsolete
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 326851 2016/08/28 00:01:42
Backup Piece 326851 2016/08/28 00:01:42 /mnt/orclbackup/log_20160828_328204_1
Backup Set 326855 2016/08/28 01:01:55
Backup Piece 326855 2016/08/28 01:01:55 /mnt/orclbackup/log_20160828_328208_1
Backup Set 326859 2016/08/28 02:01:54
Backup Piece 326859 2016/08/28 02:01:54 /mnt/orclbackup/log_20160828_328212_1
Backup Set 326872 2016/08/28 03:01:44
Backup Piece 326872 2016/08/28 03:01:44 /mnt/orclbackup/log_20160828_328227_1
Backup Set 326880 2016/08/28 04:01:33
Backup Piece 326880 2016/08/28 04:01:33 /mnt/orclbackup/log_20160828_328234_1
Backup Set 326884 2016/08/28 05:01:35
Backup Piece 326884 2016/08/28 05:01:35 /mnt/orclbackup/log_20160828_328238_1
Backup Set 326888 2016/08/28 06:02:08
Backup Piece 326888 2016/08/28 06:02:08 /mnt/orclbackup/log_20160828_328242_1
Backup Set 326892 2016/08/28 07:01:20
Backup Piece 326892 2016/08/28 07:01:20 /mnt/orclbackup/log_20160828_328246_1
Backup Set 326893 2016/08/28 07:02:27
Backup Piece 326893 2016/08/28 07:02:27 /mnt/orclbackup/log_20160828_328247_1
Backup Set 326897 2016/08/28 08:01:17
Backup Piece 326897 2016/08/28 08:01:17 /mnt/orclbackup/log_20160828_328251_1
Backup Set 326898 2016/08/28 08:02:24
Backup Piece 326898 2016/08/28 08:02:24 /mnt/orclbackup/log_20160828_328252_1
Backup Set 326902 2016/08/28 09:01:14
Backup Piece 326902 2016/08/28 09:01:14 /mnt/orclbackup/log_20160828_328256_1
Backup Set 326903 2016/08/28 09:02:19
Backup Piece 326903 2016/08/28 09:02:19 /mnt/orclbackup/log_20160828_328257_1
Backup Set 326907 2016/08/28 10:01:17
Backup Piece 326907 2016/08/28 10:01:17 /mnt/orclbackup/log_20160828_328261_1
Backup Set 326908 2016/08/28 10:02:24
Backup Piece 326908 2016/08/28 10:02:24 /mnt/orclbackup/log_20160828_328262_1
Backup Set 326912 2016/08/28 11:02:08
Backup Piece 326912 2016/08/28 11:02:08 /mnt/orclbackup/log_20160828_328266_1
Backup Set 326916 2016/08/28 12:02:13
Backup Piece 326916 2016/08/28 12:02:13 /mnt/orclbackup/log_20160828_328270_1
Backup Set 326920 2016/08/28 13:02:23
Backup Piece 326920 2016/08/28 13:02:23 /mnt/orclbackup/log_20160828_328274_1
Backup Set 326924 2016/08/28 14:01:26
Backup Piece 326924 2016/08/28 14:01:26 /mnt/orclbackup/log_20160828_328278_1
Backup Set 326925 2016/08/28 14:02:41
删除即可
RMAN> delete obsolete;
--------------------------------------推荐阅读 --------------------------------------