sqlserver还原bak备份文件

先查看数据库逻辑名称:

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'

  

posted @ 2014-06-29 15:15  冰吻的夜  阅读(552)  评论(0编辑  收藏  举报