生产数据库备份策略

生产服务器备份策略,完全备份每周一次,差异备份每天一次,日志清空每周两次。
数据环境为:windows server 2003 & sql server 2005
--完全备份
BACKUP DATABASE [dongguanupdate080423] TO  DISK = N'd:\backup\dongguanupdate080423_full.bak' WITH  INIT ,  NOUNLOAD ,  NAME = N'dongguan 第三版完全备份',  NOSKIP ,  STATS = 10,  NOFORMAT
--差异备份
BACKUP DATABASE [dongguanupdate080423] 
TO  DISK = N'd:\backup\dongguanupdate080423_diff.bak' 
WITH  INIT ,  NOUNLOAD ,  DIFFERENTIAL ,  
NAME = N'dongguan 第三版差异备份',  NOSKIP ,  STATS = 10,  NOFORMAT
--日志清空
dump transaction dongguanupdate080423 with no_log
backup log dongguanupdate080423 with no_log
dbcc shrinkdatabase(dongguanupdate080423)
-END-
posted @ 2010-03-03 08:47  听风  阅读(356)  评论(0)    收藏  举报