标签:
USE master
RESTORE DATABASE WSS_Content FROM DISK = N‘D:\bak\contentbak.bak‘
WITH REPLACE, NORECOVERY
,MOVE ‘WSS_Content‘ TO N‘D:\bak3\WSS_Content.mdf‘
,MOVE ‘WSS_Content_LOG‘ TO N‘D:\bak3\WSS_Content_log.ldf‘
当中MOVE ‘WSS_Content‘这个名字,是之前backup过来的名字,也就是说,之前backup的数据库文件名叫做wss_content,那么这里就应该叫做wss_content,逻辑名。
假设还原之后,发现数据库一直处在“正在还原”,则须要再执行例如以下命令,改动它的状态。
restore database WSS_Content with recovery
标签:
原文地址:http://www.cnblogs.com/bhlsheji/p/4296067.html