先查看數據庫邏輯名稱:sql
restore filelistonly from disk='D:/database.bak'
而後恢復:數據庫
restore database smsdb from disk = 'd:\smsdb.bak' with move '數據庫邏輯名稱' to 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\db_data.mdf' ,move '日誌邏輯名稱' to 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\db_log.ldf'