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‘
如果还原之后,发现数据库一直处在“正在还原”,则需要再运行如下命令,修改它的状态。
restore database WSS_Content with recovery