当前位置:网站首页>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
边栏推荐
- SQL database execution problems
- An example analysis of MP4 file format parsing
- Pigsty:开箱即用的数据库发行版
- List. How to achieve ascending and descending sort() 2020.8.6
- One of the anti climbing methods
- [summary] some panels and videos seen
- Anxin can internally test offline voice module vb-01 to communicate with esp-c3-12f
- [stm32+esp8266 connect Tencent cloud IOT development platform 2] stm32+esp8266-01s connect Tencent cloud
- Installing gradle
- Understand TCP's three handshakes and four waves with love
猜你喜欢

Understand TCP's three handshakes and four waves with love

MongoDB快速入门

HB 5469民用飞机机舱内部非金属材料燃烧试验方法

SAP HR 家庭成员信息

Ora-02437 failed to verify the primary key violation

Navicat connects Oracle

C number of words, plus ¥, longest word, average value
postgis学习
![[experiment sharing] log in to Cisco devices through the console port](/img/e4/fc72ed57de74a0dd51c484a1c2f348.png)
[experiment sharing] log in to Cisco devices through the console port

C simple question one
随机推荐
Open source hardware small project: anxinco esp-c3f control ws2812
C - minute number V3
[stm32+esp8266 connects to Tencent cloud IOT development platform 3] stm32+esp8266-01s dynamically registers devices on Tencent cloud (at instruction mode) -- with source code
Anxin can internally test offline voice module vb-01 to communicate with esp-c3-12f
Benchmarking Detection Transfer Learning with Vision Transformers(2021-11)
C inheritance and interface design polymorphism
Installing gradle
MP4文件格式解析之结合实例分析
Learn about scratch
postgis学习
企业应用需求导向开发之人力部门,员工考勤记录和实发工资业务程序案例
What if once again forgets the login password of raspberry pie? And you don't have a monitor yet! Today, I would like to introduce a method
BSS 7230 航空内饰材料阻燃性能测试
UIC564-2 附录4 –阻燃防火测试:火焰的扩散
SAP HR labor contract information 0016
Anxin vb01 offline voice module access intelligent curtain guidance
Take you hand in hand to build Eureka server with idea
C simple question one
[summary] some panels and videos seen
IDEA 2021.3. X cracking