当前位置:网站首页>DataGuard active / standby cleanup archive settings
DataGuard active / standby cleanup archive settings
2022-07-07 23:44:00 【Joyce. Du】
cat /rmancc/shell/rmanlog.sh
#!/bin/sh
export ORACLE_SID=cc
rman target / <<EOF
run{
sql 'alter system archive log current' ;
backup format '/rmancc/%d_log_%T_%U' archivelog until time 'sysdate' delete all input ;
delete noprompt obsolete;
}
quit;
EOF
cat /rmancc/shell/rmanlog_clear.sh
#!/bin/sh
export ORACLE_SID=cc
rman target / <<EOF
run{
crosscheck archivelog all;
delete noprompt expired archivelog all;
delete noprompt archivelog until time 'sysdate';
}
quit;
EOF
PR End :
root crontab clear archivelog part :
0,30 * * * * su - oracle -c "/rmancc/shell/rmanlog.sh" 1>>/rmancc/shell/rmanlog.log 2>>/rmancc/shell/rmanlog.err
#0,30 * * * * su - oracle -c "/rmancc/shell/rmanlog_clear.sh" 1>>/rmancc/shell/rmanlog_clear.log 2>>/rmancc/shell/rmanlog_clear.err
DR End :
root crontab clear archivelog part :
#0,30 * * * * su - oracle -c "/rmancc/shell/rmanlog.sh" 1>>/rmancc/shell/rmanlog.log 2>>/rmancc/shell/rmanlog.err
0,30 * * * * su - oracle -c "/rmancc/shell/rmanlog_clear.sh" 1>>/rmancc/shell/rmanlog_clear.log 2>>/rmancc/shell/rmanlog_clear.err
When disaster recovery is switched , Need to put PR Terminal crontab To DR Terminal crontab;
take DR Terminal crontab To PR Terminal crontab;
Return to the original after failback crontab
Be careful :
(1) When dr Of mrp The process didn't start , But the database plays (tnsname through ),pr The archiving of will be done by pr Of lns Normal transmission to dr, here dr The archive deletion script of cannot delete an archive that is not applied , An error is as follows :

RMAN-08137: warning: archived log not deleted, needed for standby or upstream capture process
therefore dr The archive directory of is easy to fill , once dr The archive directory of is full , It will lead to pr Unable to continue transferring archives , Which leads to pr The archive on the end cannot be deleted normally , When deleting, it will also report RMAN-08137: warning: archived log not deleted, needed for standby or upstream capture process, Finally lead to pr Archive full , Cause trouble ;

(2) If dr Monitoring exception of ,pr Cannot transfer archive to dr,pr Cannot backup and delete normally
边栏推荐
猜你喜欢
![Balanced binary tree [AVL tree] - insert, delete](/img/1f/cd38b7c6f00f2b3e85d4560181a9d2.png)
Balanced binary tree [AVL tree] - insert, delete

Chisel tutorial - 03 Combinatorial logic in chisel (chisel3 cheat sheet is attached at the end)

Summary of SQL single table query 2020.7.27

Pycharm essential plug-in, change the background (self use, continuous update) | CSDN creation punch in

神奇快速幂

MySQL Architecture

【LeetCode】20、有效的括号

关于CH32库函数与STM32库函数的区别

An example analysis of MP4 file format parsing

Design and implementation of spark offline development framework
随机推荐
C method question 1
webflux - webclient Connect reset by peer Error
Summary of SQL single table query 2020.7.27
P1067 [noip2009 popularity group] polynomial output (difficult, pit)
507 field D - extraterrestrial relics
AITM3.0005 烟雾毒性测试
BSS 7230 flame retardant performance test of aviation interior materials
Idea automatically generates serialVersionUID
解析token的网址
MP4文件格式解析之结合实例分析
Anxin vb01 offline voice module access intelligent curtain guidance
SAP HR奖罚信息导出
Ora-01741 and ora-01704
Dependency injection 2 advantage lifecycle
Progress broadcast | all 29 shield machines of Guangzhou Metro Line 7 have been launched
HB 5469民用飞机机舱内部非金属材料燃烧试验方法
Benchmarking Detection Transfer Learning with Vision Transformers(2021-11)
postgis学习
An example analysis of MP4 file format parsing
C cat and dog