当前位置:网站首页>Dataguard 主备清理归档设置
Dataguard 主备清理归档设置
2022-07-07 21:53: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端:
root crontab 清理archivelog部分:
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端:
root crontab 清理archivelog部分:
#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
当容灾切换时,需要将PR端的crontab转为DR端的crontab;
将DR端的crontab转为PR端的crontab;
回切后再恢复原来的crontab
注意:
(1)当dr的mrp进程没起,但是数据库起着(tnsname通),pr的归档会由pr的lns正常传输到dr,此时dr的归档删除的脚本无法删除没有应用的归档,报错如下:

RMAN-08137: warning: archived log not deleted, needed for standby or upstream capture process
所以dr的归档目录很容易满,一旦dr的归档目录满,就会导致pr无法继续传输归档,从而导致pr端的归档无法正常删除,删除的时候也会报RMAN-08137: warning: archived log not deleted, needed for standby or upstream capture process,最后导致pr归档满,引发故障;

(2)如果dr的监听异常,pr无法传输归档到dr,pr无法正常备份删除
边栏推荐
- ASP. Net core middleware request processing pipeline
- Anxinco EC series modules are connected to the multi protocol access products of onenet Internet of things open platform
- Summary of common methods of object class (September 14, 2020)
- 【leetcode】day1
- SAP HR social work experience 0023
- 2021icpc Shanghai h.life is a game Kruskal reconstruction tree
- 数据库面试题+解析
- SRM supplier cloud collaborative management platform solution for building materials industry to realize business application scalability and configuration
- Markdown
- UE4_ Ue5 panoramic camera
猜你喜欢

2021icpc Shanghai h.life is a game Kruskal reconstruction tree

SAP HR 社会工作经历 0023

MySQL Index Optimization Practice II

SAP 内存参数调优过程

2022 Season 6 perfect children's model Shaanxi finals came to a successful conclusion

SAP HR 劳动合同信息 0016

MySQL架构

B_QuRT_User_Guide(37)

0-1背包问题

家用电器行业渠道商协同系统解决方案:助力家电企业快速实现渠道互联网化
随机推荐
Summary of SQL single table query 2020.7.27
Unity3d learning notes 5 - create sub mesh
ESP at installation esp8266 and esp32 versions
Anxinco EC series modules are connected to the multi protocol access products of onenet Internet of things open platform
V-for traversal object
[experiment sharing] log in to Cisco devices through the console port
Take you hand in hand to build feign with idea
Illegal behavior analysis 1
Mobile heterogeneous computing technology - GPU OpenCL programming (basic)
Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting
Unity3d Learning Notes 6 - GPU instantiation (1)
Display the server hard disk image to the browser through Servlet
Oracle database backup and recovery
Interface
POJ2392 SpaceElevator [DP]
生鲜行业数字化采购管理系统:助力生鲜企业解决采购难题,全程线上化采购执行
C # exchange number, judge to pass the exam
电子设备行业智能供应链协同平台解决方案:解决低效, 赋能产业数字化升级
Stringutils tool class
B / Qurt Utilisateur Guide (36)