共有两个文件back_cold.bat和back_cold.sql,通过定时任务来调用back_cold.bat
bat:
set day=%date:~0,10%
cd e:dbdata
md %day%
sqlplus /nolog @e:dbdataback_cold.sql %day%
sql:
Rem db cold backup;
conn sys/oracle as sysdba;
shutdown immediate;
host xcopy D:oracleoradatabjmobile*.ora e:dbdata&1;
host xcopy D:oracleoradatabjmobile*.log e:dbdata&1;
host xcopy D:oracleoradatabjmobile*.ctl e:dbdata&1;
startup;
exit;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/45259/viewspace-134896/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/45259/viewspace-134896/