sqlserver還原bak備份文件

先查看數據庫邏輯名稱: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'
相關文章
相關標籤/搜索