#!/bin/sh
export BACK_DATE=`date +%Y%m%d`
export BACKUP_PATH=/home/oracle/dbbak
echo `mkdir -p ${BACKUP_PATH}/archivelog/${BACK_DATE}`
rman msglog=$BACKUP_PATH/archivelog/${BACK_DATE}/arch_0_$BACK_DATE.log << EOF
connect target /;
delete expired archivelog all;
delete noprompt archivelog until time 'sysdate - 1' ;
exit
EOF
Linux下Oracle归档日志自动清理脚本代码(sh)
时间:2024-3-2 15:49 作者:韩俊 分类: Linux
标签: linux