Linux下Oracle归档日志自动清理脚本代码(sh)
程序员文章站
2023-03-25 21:31:41
复制代码 代码如下: #!/bin/sh export back_date=`date +%y%m%d` export backup_path=/home/oracle/d...
复制代码 代码如下:
#!/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
下一篇: hbase shell基础和常用命令详解