我已经成功创建了名为SCPT_Pandora_snap的数据库SCPT_Pandora的快照。当我尝试从此快照恢复SCPT_Pandora时,出现错误(“'DATABASE_SHAPSHOT'不是可识别的设备类型选项”)。我在两台服务器(2005和2008企业版)上尝试了这个,并且两者都收到了同样的错误。这是代码:
IF EXISTS ( SELECT name
FROM sys.databases
WHERE name = N'SCPT_Pandora_snap' )
DROP DATABASE SCPT_Pandora_snap
GO
CREATE DATABASE SCPT_Pandora_snap ON
(
NAME = SCPT_Pandora,
FILENAME = 'D:\SQL2008_data\SCPT_Pandora_snap.ss'
) AS SNAPSHOT OF SCPT_Pandora
GO
USE Master
GO
RESTORE DATABASE SCPT_Pandora FROM DATABASE_SHAPSHOT = 'SCPT_Pandora_snap';
GO
谢谢!
答案 0 :(得分:1)
这只是一个错字,你正在从sNapshot恢复:
RESTORE DATABASE SCPT_Pandora FROM DATABASE_SHAPSHOT = 'SCPT_Pandora_snap';
^^^