RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3154)

chenghaibing2008發表於2012-02-16
TITLE: Microsoft SQL Server Management Studio
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------
ADDITIONAL INFORMATION:

The media family on device 'E:\DBBak\HTbak' is incorrectly formed. SQL Server cannot process this media family.

RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)



USE master
RESTORE DATABASE History
   FROM DISK = 'e:\DBBak\HT.bak'
   WITH MOVE 'HT' TO 'e:\DB\History.mdf', 
   MOVE 'HT_Log' TO 'e:\DB\History_log.ldf',
STATS = 10, REPLACE
GO


USE master
RESTORE DATABASE 新建的沒有任何資料的資料庫名
   FROM DISK = 'e:\資料庫備份檔案.bak'
   WITH MOVE '原來的邏輯名稱' TO 'e:\新建的沒有任何資料的資料庫名.mdf',
   MOVE '原來的邏輯名稱_log' TO 'e:\新建的沒有任何資料的資料庫名_log.ldf',
STATS = 10, REPLACE
GO


相關文章