--创建备份设备 sp_addumpdevice 'disk',jasonbak ,'C:\jason.bak' --备份 backupdatabase northwind to jasonbak with noinit--(附加,不加参数时默认) with init--(重写备份设备的内容) with format--(重新格式化备份设备,使用) --还原 restore filelistonly from jasonbak --查看文件列表(只能看到第一个备份内容) restore headeronly from a] --查看设备内内容 restore verifyonly from a --校验
restoredatabase pubs from jasonbak restoredatabase northwind from jasonbak withfile=2 restoredatabase northwind from jasonbak with norecovery restorelog northwind from jasonbak withfile=2 --Changed to Simple修改恢复模型后一定要完全备份数据库 backupdatabase northwind to jasonbak with format --change back to Full createtable jason2 (Idd int) backuplog northwind to jasonbak restore verifyonly from jasonbak dropdatabase northwind restoredatabase northwind from jasonbak with norecovery restorelog northwind from jasonbak withfile=2 --Full Backup nw --Create Table1 ,write down the time --Create Table2 ,write down the time --Backup Log --Drop nw --Recover Nw --Recover Table1, No table2 backupdatabase northwind to jasonbak with format Createtable table1 (IDD int) --21.13.26 Createtable table2 (IDD int) --21.13.35 backuplog northwind to jasonbak restore northwind from jasonbak with stopat=""