手动恢复出现如下错误:

the backup set holds a backup of a database other than the existing database. Restore database is terminating abnormally

那就用强制回复。从文件swlicense.bak中,将数据及表结构恢复到一个新的数据库SWLicManitenance中。

 

RESTORE FILELISTONLY FROM DISK='D:\PanShengbo\swLicense.bak'


RESTORE DATABASE SWLicMaintenance FROM DISK='D:\PanShengbo\swLicense.bak'
WITH
   MOVE 'swLicense' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQL2008R2\MSSQL\DATA\SWLicMaintenance.mdf',
   MOVE 'swLicense_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQL2008R2\MSSQL\DATA\SWLicMaintenance_log.ldf'
  
  

备份:BACKUP DATABASE SWLicMaintenance
  
TO DISK = 'd:\SWLicMaintenance.bak' 
RESTORE FILELISTONLY 
  
FROM DISK = 'd:\SWLicMaintenance.bak'

posted on 2012-12-18 11:32  Black Bean  阅读(207)  评论(0编辑  收藏  举报