--完全备份
backup database demo
to nwdevice02
with name = 'fullbak'
--日志备份
backup log demo
to nwdevice02
with name = 'log1'
backup database demo
to nwdevice02
with name = 'fullbak'
--日志备份
backup log demo
to nwdevice02
with name = 'log1'
--restore full backup
restore database demo
from nwdevice02
with file=1,norecovery
restore database demo
from nwdevice02
with file=1,norecovery
--restore log backup
restore log demo
from nwdevice02
with file=4,recovery
restore log demo
from nwdevice02
with file=4,recovery
--完全备份
backup database demo
to nwdevice
with name='完全备份'
backup database demo
to nwdevice
with name='完全备份'
--差异备份
backup database demo
to nwdevice
with differential,
name = '差异备份1'
--日志备份 log1
backup log demo
to nwdevice
with name='日志1'
backup database demo
to nwdevice
with differential,
name = '差异备份1'
--日志备份 log1
backup log demo
to nwdevice
with name='日志1'
--日志备份 log2
backup log demo
to nwdevice
with name='日志2'
backup log demo
to nwdevice
with name='日志2'
--还原完全备份
restore database demo
from nwdevice
with norecovery --相当于第二项(选项)
file = 1
--还原差异
restore database demo
from nwdevice
with recovery,
file= 2
/* 第一完全备,第二次差异备份*/
restore database demo
from nwdevice
with norecovery --相当于第二项(选项)
file = 1
--还原差异
restore database demo
from nwdevice
with recovery,
file= 2
/* 第一完全备,第二次差异备份*/
--还原日志
restore log demo
from nwdevice
with file= 2,
norecovery
restore log demo
from nwdevice
with file= 2,
norecovery
restore log demo
from nwdevice
with file= 3,
recovery
from nwdevice
with file= 3,
recovery
本文转自 jankie 51CTO博客,原文链接:,如需转载请自行联系原作者