[oracle@*** rman]$ crontab -l
30 5 * * * /home/oracle/script/backup.sh
[oracle@*** rman]$ more /home/oracle/script/backup.sh
#!/bin/sh
export PATH
ORACLE_BASE=/u01/app/oracle
ORACLE_SID=scmprd
export Today=`date +%Y%m%d`
export ORACLE_BASE ORACLE_SID
export ORACLE_HOME=/u01/app/oracle/product/OraDb11g_home1
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
rman target / @/home/oracle/script/backup.sql log /home/oracle/log/${Today}.log
30 5 * * * /home/oracle/script/backup.sh
[oracle@*** rman]$ more /home/oracle/script/backup.sh
#!/bin/sh
export PATH
ORACLE_BASE=/u01/app/oracle
ORACLE_SID=scmprd
export Today=`date +%Y%m%d`
export ORACLE_BASE ORACLE_SID
export ORACLE_HOME=/u01/app/oracle/product/OraDb11g_home1
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
rman target / @/home/oracle/script/backup.sql log /home/oracle/log/${Today}.log
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21302630/viewspace-1711440/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/21302630/viewspace-1711440/