Delete archivelog in the primary database

ORACLE_RMAN_delete archivelog in the primary database

About RMAN-08137, please refer to :

1.  Case 1

Check that the standby database is uptodate - if not, restartmanaged recovery and resolve the gap first then query the Primaryv$archived_log view again for any log sequences that still have applied='NO'.
If you still have logs with applied='NO' and you are certain that these logshas been applied at standby and there is no 'gap', you need to remove theentries from the rman repository:
a. check that  the physical files still exist on disk and if they do, usean OS command to delete them
b. run crosschek followed by delete expired to remove them from the rmanrepository

RMAN>crosscheckarchivelog all;
RMAN>delete expired archivelog all;


Once the problematic log(s)  have been removed from the rman repositoryyou can resume normal use of 'delete input' option on  the backup command.

 

2.  Case 2

RMAN is used to backup archivelogs fromPrimary site using the syntax:
    backup archivelog ...... delete input;
All logs are backed up successfully but not deleted; for each log the
following error is returned:
RMAN-8137: WARNING: archive log not deleted as it is still needed
archive log filename=<log> thread=<thrd> sequence=<seq>
The archivelogs have definitely been shipped and applied to standby site
which runs in maximum availability mode.
No logs are being deleted from Primary site after backup leaving the database
at risk of going down if the archivelog directory fills.
Logs have to be deleted manually.
WORKAROUND:

-----------
Donot use DELETE INPUT option when backing up logs in a Data Guard environment.
Use instead (for example):
backup ARCHIVELOG UNTIL TIME '<date>' not backed up 1 times to devicetype
sbt;
delete archivelog until time '<date>' backed up 1 times to device typesbt;
Just a case:

delete noprompt archivelog until time'sysdate -1' backed up 1 times to device type sbt;
Or

run{

ALLOCATE CHANNEL FOR MAINTENANCE TYPEDISK;
    crosscheck archivelog all;
    delete noprompt archivelog until time 'sysdate -1' backed up1 times to device type sbt;
    delete noprompt archivelog until time 'sysdate -1' backed up1 times to device type disk;
    release channel;

}

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值