当前位置:网站首页>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
边栏推荐
- 一份假Offer如何盗走了「Axie infinity」5.4亿美元?
- Enumeration, simulation, and sorting
- Arbre binaire équilibré [Arbre AVL] - Insérer et supprimer
- Flash download setup
- P1308 [noip2011 popularity group] count the number of words
- P1067 [noip2009 popularity group] polynomial output (difficult, pit)
- 解析token的网址
- ESP at installation esp8266 and esp32 versions
- C method question 1
- Oracle string sorting
猜你喜欢
List. How to achieve ascending and descending sort() 2020.8.6
SAP HR奖罚信息导出
SAP 内存参数调优过程
95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)
Extended tree (I) - graphic analysis and C language implementation
BSS 7230 航空内饰材料阻燃性能测试
Interface
Chisel tutorial - 03 Combinatorial logic in chisel (chisel3 cheat sheet is attached at the end)
Anxinco esp32-a1s development board is adapted to Baidu dueros routine to realize online voice function
BSS 7230 flame retardant performance test of aviation interior materials
随机推荐
go time包常用函数
二叉排序树【BST】——创建、查找、删除、输出
SQL database execution problems
数据库面试题+解析
HB 5469 combustion test method for non-metallic materials in civil aircraft cabin
Slam interview summary
Apng2gif solutions to various problems
【7.4】25. Turn over the linked list in groups of K
P2141 [noip2014 popularization group] abacus mental arithmetic test
Boost regex library source code compilation
ESP at installation esp8266 and esp32 versions
507 field D - extraterrestrial relics
Possible SQL for Oracle table lookup information
Anxin vb01 offline voice module access intelligent curtain guidance
Resolve the URL of token
Live server usage
Right click the idea file to create new. There is no solution to create new servlet
Anxin can internally test offline voice module vb-01 to communicate with esp-c3-12f
ping报错:未知的名称或服务
Dependency injection