昨天作了一个备份恢复,怕忘了,保留一下语句样例。
/**//**
* SQL Server数据库备份和恢复
*/
BACKUP DATABASE [qms070704] TO DISK = N'D:\qms0707.bak' WITH NOINIT , NOUNLOAD ,
NAME = N'qms070704 备份', NOSKIP , STATS = 10, NOFORMAT
RESTORE FILELISTONLY FROM DISK = N'D:\WebQMS070704.BAK' WITH FILE = 1 , NOUNLOAD
go
RESTORE DATABASE [qms070704] FROM DISK = N'D:\WebQMS070704.BAK'
WITH FILE = 1, NOUNLOAD , STATS = 10, RECOVERY , REPLACE ,
MOVE N'WebQMS_Data' TO N'D:\Program Files\Microsoft SQL Server\MSSQL\data\qms070704_Data.MDF',
MOVE N'WebQMS_Log' TO N'D:\Program Files\Microsoft SQL Server\MSSQL\data\qms070704_Log.LDF'
posted on 2007-07-04 15:49
Victor.Stone 阅读(427)
评论(2) 编辑 收藏 引用