欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Oracle RMAN无法删除归档一例

程序员文章站 2022-06-27 23:44:44
备注:Oralce 11.2.0.4文章目录一.问题描述二.解决方案2.1 清理归档日志2.2 问题分析2.3 最终解决方案参考:一.问题描述因为空间不足导致无法归档,数据库hang住Thu Jan 14 03:24:49 2021ARC3: Error 19502 Closing archive log file '/oracle/ora11g/db/dbs/arch/1_74591_982339590.dbf'Thu Jan 14 03:24:52 2021ARC0: Error 19...

备注:
Oralce 11.2.0.4

一.问题描述

因为空间不足导致无法归档,数据库hang住

Thu Jan 14 03:24:49 2021
ARC3: Error 19502 Closing archive log file '/oracle/ora11g/db/dbs/arch/1_74591_982339590.dbf'
Thu Jan 14 03:24:52 2021
ARC0: Error 19502 Closing archive log file '/oracle/ora11g/db/dbs/arch/1_74591_982339590.dbf'
ARC1: Error 19502 Closing archive log file '/oracle/ora11g/db/dbs/arch/1_74591_982339590.dbf'
ARC3: Error 19502 Closing archive log file '/oracle/ora11g/db/dbs/arch/1_74591_982339590.dbf'

二.解决方案

首先想到的是清理空间,不过由于早上上班在9:00左右才介入处理,而空间不足导致的归档报错从凌晨3点左右就开始的,清理的5G空间很快被归档日志给占用了。

好在此时数据盘用的是lvm,vg还剩余9G,此时增加了9G的空间

df -h
vgs
lvs
lvresize -l +9 /dev/mapper/vg_orcldb-lv_orcldb1
df -h
lvdisplay
resize2fs /dev/mapper/vg_orcldb-lv_orcldb1
df -h

2.1 清理归档日志

rman target /
delete noprompt archivelog all completed before 'sysdate-5';

结果报错:
RMAN-08137: warning: archived log not deleted, needed for standby or upstream capture process

RMAN> delete noprompt archivelog all completed before 'sysdate-5';

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=6602 device type=DISK
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96128_982856478.dbf thread=1 sequence=96128
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96129_982856478.dbf thread=1 sequence=96129
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96130_982856478.dbf thread=1 sequence=96130
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96131_982856478.dbf thread=1 sequence=96131
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96132_982856478.dbf thread=1 sequence=96132
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96133_982856478.dbf thread=1 sequence=96133
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96134_982856478.dbf thread=1 sequence=96134
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96135_982856478.dbf thread=1 sequence=96135
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96136_982856478.dbf thread=1 sequence=96136
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96137_982856478.dbf thread=1 sequence=96137
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96138_982856478.dbf thread=1 sequence=96138
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96139_982856478.dbf thread=1 sequence=96139
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96140_982856478.dbf thread=1 sequence=96140
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96141_982856478.dbf thread=1 sequence=96141
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96142_982856478.dbf thread=1 sequence=96142
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96143_982856478.dbf thread=1 sequence=96143
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96144_982856478.dbf thread=1 sequence=96144
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96145_982856478.dbf thread=1 sequence=96145
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96146_982856478.dbf thread=1 sequence=96146
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96147_982856478.dbf thread=1 sequence=96147
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96148_982856478.dbf thread=1 sequence=96148
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96149_982856478.dbf thread=1 sequence=96149
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96150_982856478.dbf thread=1 sequence=96150
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96151_982856478.dbf thread=1 sequence=96151
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96152_982856478.dbf thread=1 sequence=96152
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96153_982856478.dbf thread=1 sequence=96153
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96154_982856478.dbf thread=1 sequence=96154
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96155_982856478.dbf thread=1 sequence=96155
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96156_982856478.dbf thread=1 sequence=96156
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96157_982856478.dbf thread=1 sequence=96157
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96158_982856478.dbf thread=1 sequence=96158
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96159_982856478.dbf thread=1 sequence=96159
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96160_982856478.dbf thread=1 sequence=96160
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96161_982856478.dbf thread=1 sequence=96161
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96162_982856478.dbf thread=1 sequence=96162
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96163_982856478.dbf thread=1 sequence=96163
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96164_982856478.dbf thread=1 sequence=96164
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96165_982856478.dbf thread=1 sequence=96165
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96166_982856478.dbf thread=1 sequence=96166
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96167_982856478.dbf thread=1 sequence=96167
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96168_982856478.dbf thread=1 sequence=96168
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96169_982856478.dbf thread=1 sequence=96169
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96170_982856478.dbf thread=1 sequence=96170
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96171_982856478.dbf thread=1 sequence=96171
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96172_982856478.dbf thread=1 sequence=96172
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96173_982856478.dbf thread=1 sequence=96173
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96174_982856478.dbf thread=1 sequence=96174
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96175_982856478.dbf thread=1 sequence=96175
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96176_982856478.dbf thread=1 sequence=96176
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96177_982856478.dbf thread=1 sequence=96177
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96178_982856478.dbf thread=1 sequence=96178
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96179_982856478.dbf thread=1 sequence=96179
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96180_982856478.dbf thread=1 sequence=96180
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96181_982856478.dbf thread=1 sequence=96181
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96182_982856478.dbf thread=1 sequence=96182
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96183_982856478.dbf thread=1 sequence=96183
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96184_982856478.dbf thread=1 sequence=96184
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96185_982856478.dbf thread=1 sequence=96185
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96186_982856478.dbf thread=1 sequence=96186
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96187_982856478.dbf thread=1 sequence=96187
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96188_982856478.dbf thread=1 sequence=96188
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96189_982856478.dbf thread=1 sequence=96189
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96190_982856478.dbf thread=1 sequence=96190
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96191_982856478.dbf thread=1 sequence=96191
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96192_982856478.dbf thread=1 sequence=96192
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96193_982856478.dbf thread=1 sequence=96193
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96194_982856478.dbf thread=1 sequence=96194
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96195_982856478.dbf thread=1 sequence=96195
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96196_982856478.dbf thread=1 sequence=96196
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96197_982856478.dbf thread=1 sequence=96197
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96198_982856478.dbf thread=1 sequence=96198
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96199_982856478.dbf thread=1 sequence=96199
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96200_982856478.dbf thread=1 sequence=96200
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96201_982856478.dbf thread=1 sequence=96201
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96202_982856478.dbf thread=1 sequence=96202
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96203_982856478.dbf thread=1 sequence=96203
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96204_982856478.dbf thread=1 sequence=96204
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96205_982856478.dbf thread=1 sequence=96205
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96206_982856478.dbf thread=1 sequence=96206
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96207_982856478.dbf thread=1 sequence=96207
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96208_982856478.dbf thread=1 sequence=96208
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96209_982856478.dbf thread=1 sequence=96209
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96210_982856478.dbf thread=1 sequence=96210
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96211_982856478.dbf thread=1 sequence=96211
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96212_982856478.dbf thread=1 sequence=96212
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96213_982856478.dbf thread=1 sequence=96213
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96214_982856478.dbf thread=1 sequence=96214
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96215_982856478.dbf thread=1 sequence=96215
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96216_982856478.dbf thread=1 sequence=96216
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96217_982856478.dbf thread=1 sequence=96217
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96218_982856478.dbf thread=1 sequence=96218
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96219_982856478.dbf thread=1 sequence=96219
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96220_982856478.dbf thread=1 sequence=96220
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96221_982856478.dbf thread=1 sequence=96221
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96222_982856478.dbf thread=1 sequence=96222
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96223_982856478.dbf thread=1 sequence=96223
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96224_982856478.dbf thread=1 sequence=96224
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96225_982856478.dbf thread=1 sequence=96225
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96226_982856478.dbf thread=1 sequence=96226
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96227_982856478.dbf thread=1 sequence=96227
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96228_982856478.dbf thread=1 sequence=96228
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96229_982856478.dbf thread=1 sequence=96229
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96230_982856478.dbf thread=1 sequence=96230
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96231_982856478.dbf thread=1 sequence=96231
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96232_982856478.dbf thread=1 sequence=96232
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96233_982856478.dbf thread=1 sequence=96233
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96234_982856478.dbf thread=1 sequence=96234
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96235_982856478.dbf thread=1 sequence=96235
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96236_982856478.dbf thread=1 sequence=96236
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96237_982856478.dbf thread=1 sequence=96237
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96238_982856478.dbf thread=1 sequence=96238
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96239_982856478.dbf thread=1 sequence=96239
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96240_982856478.dbf thread=1 sequence=96240
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96241_982856478.dbf thread=1 sequence=96241
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96242_982856478.dbf thread=1 sequence=96242
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96243_982856478.dbf thread=1 sequence=96243
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96244_982856478.dbf thread=1 sequence=96244
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96245_982856478.dbf thread=1 sequence=96245
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96246_982856478.dbf thread=1 sequence=96246
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96247_982856478.dbf thread=1 sequence=96247
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96248_982856478.dbf thread=1 sequence=96248
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96249_982856478.dbf thread=1 sequence=96249
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96250_982856478.dbf thread=1 sequence=96250
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96251_982856478.dbf thread=1 sequence=96251
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96252_982856478.dbf thread=1 sequence=96252
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96253_982856478.dbf thread=1 sequence=96253
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96254_982856478.dbf thread=1 sequence=96254
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96255_982856478.dbf thread=1 sequence=96255
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oracle/ora11g/db/dbs/arch/1_96256_982856478.dbf thread=1 sequence=96256

RMAN> 

2.2 问题分析

之前这个库是有备库的,不过公司业务缩减,要求服务器降配,前两周的刚刚把备库下线了
主库log_archive_dest_state_2已经设置为defer,主库alert日志查看也没有往备库传日志了。
但是归档居然删不掉

alter system set log_archive_dest_state_2=defer scope=both;
SQL> 
SQL> show parameter  log_archive_dest_state_2;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2             string      DEFER
log_archive_dest_state_20            string      enable
log_archive_dest_state_21            string      enable
log_archive_dest_state_22            string      enable
log_archive_dest_state_23            string      enable
log_archive_dest_state_24            string      enable
log_archive_dest_state_25            string      enable
log_archive_dest_state_26            string      enable
log_archive_dest_state_27            string      enable
log_archive_dest_state_28            string      enable
log_archive_dest_state_29            string      enable
SQL> 

itpub上正确取消dataguard的步骤
复盘了下,此次总共涉及下线3个备库
有1个备库我是按照下面步骤来的,然后shutdown了备库,后面系统组的同事下线的。
另外2个备库只修改了主库的 log_archive_dest_state_2 参数,并未调整备库,所以Oracle默认备库还存在。
导致删除这2个备库的报错,最终未删除,归档日志将磁盘撑爆,数据库hang住

On Standby DB:
i) SQL>alter database recover managed standby database cancel;
ii) SQL> alter system set log_archive_dest_state_2=DEFER;

On Primary DB:

i) SQL> alter system set log_archive_dest_state_2=DEFER;

2.3 最终解决方案

RMAN> delete noprompt force archivelog all completed before ‘sysdate-5’;
此为11g的bug,需要在delete后加上force关键字,metalink上有记载

RMAN-08137 When deleting archivelogs even when Streams CAPTURE does not require them [ID 1079953.1]

In this Document
  Symptoms
  Changes
  Cause
  Solution
  References

Symptoms
Applies To: 11gR1-11gR2

RMAN is unable to delete archive logs from database even though they are not needed by CAPTURE process anymore.

Changes
 

Cause
In 11g, RMAN looks at MIN_REQUIRED_CAPTURE_CHANGE# in v$database and not at DBA_CAPTURE. By default this value is updated every 6 hours. So by default the value in v$database will be six hours behind the current value.

Solution
Since changing frequency of update to MIN_REQUIRED_CAPTURE_CHANGE# in v$database can not be controlled, following workaround can be used:

Archive log which are not needed by capture process can be deleted using:

delete noprompt force archivelog all completed before 'sysdate-10/1440';

参考:

1.https://blog.51cto.com/yangjunfeng/2132820

本文地址:https://blog.csdn.net/u010520724/article/details/112602196