################ Analyze some special table ##########################
00 10 * * 1,4 sh /home/oracle/analyze/analyze_part.sh >/home/oracle/analyze/analyze_part.log 2>&1
#30 12 * * * sh /home/oracle/analyze/dailycheck.sh >/home/oracle/analyze/dailycheck.log 2>&1
#40 12 * * * sh /home/oracle/analyze/rename.sh
[root@testdb01 ~]# cat /home/oracle/analyze/analyze_part.sh
su - oracle -c "sqlplus system/syspass"<
@/home/oracle/analyze/analyze_part.sql
select to_char(sysdate,'YYYYMMDD W HH24:MI:SS') from dual;
[root@testdb01 ~]# cat /home/oracle/analyze/dailycheck.sh
su - oracle -c "sqlplus system/orapass"<
@/home/oracle/analyze/dailycheck.sql
select to_char(sysdate,'YYYYMMDD W HH24:MI:SS') from dual;
exit;
sh rename.sh
[root@testdb01 ~]# cat /home/oracle/analyze/rename.sh
#!/bin/bash
cd /u10/orabackup/check/
dat='date +%m%d'
mv dailycheck.out dailycheck$dat.out
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24447726/viewspace-1807096/
,如需转载,请注明出处,否则将追究法律责任。