2

我正在使用此查询将备份文件恢复到新数据库。

RESTORE FILELISTONLY
FROM DISK = 'D:\abc.bak'

RESTORE DATABASE TestDB2 
FROM disk = 'D:\abc.bak'
WITH
MOVE 'cse' TO 'E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL \DATA\TestDB2.mdf',
MOVE 'cse_log' TO 'E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\TestDB2_log.ldf'
GO

但它抛出一个错误:

Msg 3132, Level 16, State 1, Line 1
媒体集有 2 个媒体族,但只提供了 1 个。必须提供所有成员。
消息 3013,级别 16,状态 1,第 1 行
RESTORE DATABASE 异常终止。

我是 SQL Server 2008 的新手。请帮忙。

4

1 回答 1

-1
RESTORE DATABASE TestDB2 
FROM DISK = 'D:\abc.bak'
WITH FILE = 1,  
MOVE 'CSE' TO N'E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL \DATA\TestDB2.mdf',  
MOVE N'(your DB name)_LOG' TO N'E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\TestDB2_log.ldf',  
NOUNLOAD,  
REPLACE,  
STATS = 10
GO
于 2015-01-23T13:24:55.440 回答