分类: 数据库开发技术
2010-08-02 18:38:51
windows下oracle和sybase自动备份的脚本示例2009-02-12 11:18oracle
echo auto backup every day;
echo %date%
set dir=k:backuporc2
set filename=%dir%%date:~0,3%.dmp
set logname=%dir%%date:~0,3%.log
exp owner=username file=%filename% buffer=409600000 log=%logname% feedback=100000 direct=y consistent=n;
sybase
echo %date%
set dir=k:sybasebak
set filename=%dir%%date:~13,1%_32
set logfile=%dir%%date:~13,1%_32.log
echo dump database DBNAME to ‘%filename%’ >k:sybasebakbackup_32.sql
echo go >>k:sybasebakbackup_32.sql
isql -Sservicename -Uusername -Ppassword -ik:sybasebakbackup_32.sql -o%logfile%
--UNIX下备份脚本类似。哈哈。
Informix就用unload备份了。