当前位置:网站首页>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
边栏推荐
- Extract the file name under the folder under win
- Codeworks 5 questions per day (average 1500) - day 8
- Anxin vb01 offline voice module access intelligent curtain guidance
- 数据分析系列 之3σ规则/依据拉依达准则来剔除异常值
- AITM3.0005 烟雾毒性测试
- C - Fibonacci sequence again
- ping报错:未知的名称或服务
- C inheritance and interface design polymorphism
- @Configuration注解的详细介绍
- HB 5469 combustion test method for non-metallic materials in civil aircraft cabin
猜你喜欢
[stm32+esp8266 connect Tencent cloud IOT development platform 2] stm32+esp8266-01s connect Tencent cloud
[STM32 + esp-12s connect Tencent cloud IOT development platform 1] creation of cloud platform and burning of at firmware
Balanced binary tree [AVL tree] - insert, delete
Extended tree (I) - graphic analysis and C language implementation
【LeetCode】20、有效的括号
2022 certified surveyors are still at a loss when preparing for the exam? Teach you how to take the exam hand in hand?
Anxinco EC series modules are connected to the multi protocol access products of onenet Internet of things open platform
SAP HR social work experience 0023
【路径规划】使用垂距限值法与贝塞尔优化A星路径
ping报错:未知的名称或服务
随机推荐
SAP HR 家庭成员信息
C - Fibonacci sequence again
Download AWS toolkit pycharm
How to change the formula picture in the paper directly into the formula in word
[experiment sharing] log in to Cisco devices through the console port
[summary] some panels and videos seen
postgres timestamp转人眼时间字符串或者毫秒值
Balanced binary tree [AVL tree] - insert, delete
Stringutils tool class
P5594 [xr-4] simulation match
Enumeration, simulation, and sorting
MP4文件格式解析之结合实例分析
数据分析系列 之3σ规则/依据拉依达准则来剔除异常值
【7.5】15. 三数之和
0-1背包问题
Rock-paper-scissors
B_ QuRT_ User_ Guide(39)
Arbre binaire équilibré [Arbre AVL] - Insérer et supprimer
One of the anti climbing methods
Wechat applet development beginner 1