root 用户
[root@localhost ~]# mkdir /nstg [root@localhost ~]# cd /nstg/ [root@localhost nstg]# mkdir bin log tmp [root@localhost nstg]# chown -R oracle:oinstall /nstg [root@localhost nstg]# su - oracle [oracle@localhost ~]$ cd /nstg/bin vi del_arch.sh #!/bin/bash echo "----------------------------------------`date`---------------------------------------" source ~/.bash_profile rman target / <<EOF crosscheck archivelog all; delete noprompt expired archivelog all; delete noprompt archivelog all completed before 'sysdate-7'; EOF echo -e "\n" echo "------------------------------------ FINISHED ------------------------------------" [oracle@localhost bin]$ crontab -e * 1 * * * nstg/bin/del_arc.sh
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于