数据库卡在恢复中

时间:2015-01-04 10:41:44

标签: sql-server database-restore

我使用sql server manager来恢复名为" surveytest"的数据库。来自名为" survey"的数据库中的(目标数据库) (来源数据库),当我这样做时," surveytest"数据库应该恢复,但它也会进行"调查"数据库处于恢复模式,它一直停留在那里直到我运行..

RESTORE DATABASE [survey] WITH RECOVERY 

有人能看出为什么会这样吗?下面的代码是来自sql server manager的生成代码。

USE [master]

BACKUP LOG [Survey] 
    TO  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\Survey_LogBackup_2015-01-04_10-36-04.bak' 
 WITH NOFORMAT, NOINIT,  
 NAME = N'Survey_LogBackup_2015-01-04_10-36-04', NOSKIP, NOREWIND, 
 NOUNLOAD,  NORECOVERY ,  STATS = 5


RESTORE DATABASE [SurveyTest] 
    FROM  DISK = N'D:\Work-Projects\Survey.2\Survey.bak' 
WITH  FILE = 1,  
MOVE N'Survey' TO N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\SurveyTest.mdf',  
MOVE N'Survey_log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\SurveyTest_log.ldf',  
NOUNLOAD,  REPLACE,  STATS = 5
GO

0 个答案:

没有答案