当前位置:网站首页>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
边栏推荐
- C simple question one
- Pycharm basic settings latest version 2022
- SAP HR social work experience 0023
- Balanced binary tree [AVL tree] - insert, delete
- [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
- C语言学习
- 【路径规划】使用垂距限值法与贝塞尔优化A星路径
- 【7.4】25. K 个一组翻转链表
- Lm12 rolling heikin Ashi double K-line filter
- go time包常用函数
猜你喜欢

2022 certified surveyors are still at a loss when preparing for the exam? Teach you how to take the exam hand in hand?

Class C design questions

Extended tree (I) - graphic analysis and C language implementation

0-1背包问题

一份假Offer如何盗走了「Axie infinity」5.4亿美元?

Mobile heterogeneous computing technology - GPU OpenCL programming (basic)
![[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

SAP HR 社会工作经历 0023

SAP HR reward and punishment information export
![[stm32+esp8266 connect Tencent cloud IOT development platform 2] stm32+esp8266-01s connect Tencent cloud](/img/78/3cc67a28872ff4d465484cbaee2f6e.jpg)
[stm32+esp8266 connect Tencent cloud IOT development platform 2] stm32+esp8266-01s connect Tencent cloud
随机推荐
Right click the idea file to create new. There is no solution to create new servlet
@Configuration注解的详细介绍
Interface
Flash download setup
Dependency injection 2 advantage lifecycle
二叉排序树【BST】——创建、查找、删除、输出
May day C - most
C method question 2
Take you hand in hand to build feign with idea
受限线性表
Anxin vb01 offline voice module access intelligent curtain guidance
ping报错:未知的名称或服务
Rock-paper-scissors
Chisel tutorial - 02 Chisel environment configuration and implementation and testing of the first chisel module
Lm12 rolling heikin Ashi double K-line filter
The file format and extension of XLS do not match
Flash encryption process and implementation of esp32
Oracle statistics by time
Reverse output three digit and arithmetic sequence
May day d-light