标签:
----------完整备份----------
--完整备份--
backup database studb
to disk=‘e:\stu.bak‘
--日志备份--
backup log studb
to disk=‘e:\stu_log.bak‘
use master
go
--先还原完整备份--
restore database studb
from disk=‘e:\stu.bak‘
with replace,norecovery
--再还原日志备份--
restore log studb
from disk=‘e:\stu_log.bak‘
with replace
---------差异备份----------
--完整备份--
backup database studb
to disk=‘e:\stu.bak‘
--差异备份--
backup database studb
to disk=‘e:\stu_diff.bak‘
with differential
use master
go
--先还原完整备份--
restore database studb
from disk=‘e:\stu.bak‘
with replace,norecovery
--再还原差异备份--
restore database studb
from disk=‘e:\stu_diff.bak‘
with replace
注:
--replace 覆盖原有数据库
--recovery 还原数据库后,数据库处于正常状态
--norecovery 还原数据库后,数据库处于非正常状态,等待下一步还原
标签:
原文地址:http://www.cnblogs.com/zxh8080/p/5745990.html