autoexp.sh
#!/bin/sh
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
FILENAME=`date +%Y%m%d%H`
/u01/app/oracle/product/10.2.0/db_1/bin/expdp 'system/oracle@link' dumpfile=$FILENAME full=y logfile=$FILENAME directory=expbak
autodel.sh
#!/bin/sh
find /u01/product/admin/dmsdb/bdump/*.trc -mtime +2 -exec rm -f {} \;
find /u01/product/admin/dmsdb/udump/*.trc -mtime +2 -exec rm -f {} \;
find /data/dmsdb/arch/*.arc -mtime +15 -exec rm -f {} \;
find /data/expbak/*.dmp -mtime +15 -exec rm -f {} \;
find /data/expbak/*.log -mtime +15 -exec rm -f {} \;
loadavg.sh
date >>/root/loadavg.log
cat /proc/loadavg >>/data/run/loadavg.log
阅读(1018) | 评论(0) | 转发(0) |