oracle归档日志的自动清理
2013-10-15 15:48
375 查看
1、rman清理调用脚本
rman清理脚本为/backup/oracle/scripts/rmanclear.sh,dbsid为需要清理数据库实例的sid,将用来传递到rmanclear.sh中的参数。
2、rman清理脚本
其中$1为调用脚本传递的dbsid的值。
3、定时任务
定时任务可以使用crontab去调用。
#!/bin/bash su - oracle -c "/backup/oracle/scripts/rmanclear.sh dbsid " > /dev/null 2>&1
rman清理脚本为/backup/oracle/scripts/rmanclear.sh,dbsid为需要清理数据库实例的sid,将用来传递到rmanclear.sh中的参数。
2、rman清理脚本
#!/bin/bash if [ -f ~/.bash_profile ]; then . ~/.bash_profile fi ORACLE_SID=$1; export ORACLE_SID=$ORACLE_SID $ORACLE_HOME/bin/rman log=/users/robin/log/rman.log <<EOF connect target / run{ crosscheck archivelog all; delete noprompt expired archivelog all; delete noprompt archivelog all completed before 'sysdate - 1'; } exit; EOF
其中$1为调用脚本传递的dbsid的值。
3、定时任务
定时任务可以使用crontab去调用。
相关文章推荐
- Oracle rman 自动清理归档日志
- Oracle自动清理归档日志脚本
- oracle设置自动清理归档日志脚本
- Oracle 日志归档 自动清理
- Linux下Oracle归档日志自动清理脚本代码(sh)
- oracle归档日志清理
- 清理Oracle归档日志
- DB2归档日志的开启已经自动备份后清理归档的脚本
- ORACLE 定时清理归档日志详细过程
- oracle开启自动日志归档
- windows上设置自动删除oracle归档日志
- 《设置定时自动清理归档日志脚本 》
- Oracle自动清理日志脚本
- windows上设置自动删除oracle归档日志
- Oracle监听挂掉以及归档库日志满清理方法
- windows上设置自动删除oracle归档日志
- ORACLE 定时清理归档日志详细过程
- oracle归档、alert、监听日志备份与清理
- Oracle 定时清理归档日志的方法