导航

数据库还原错误 (with move)

Posted on 2008-12-29 16:50  龚振  阅读(367)  评论(0编辑  收藏  举报

数据库还原时大部分错都都是因为数据库的物理地址变更和逻辑名不相符而引起的,使用with move 可以解决此类问题.例如:

 

restore database Northwind from disk = 'c:\Northwind.bak'

with move 'Northwind'     to 'd:\microsoft sql server\mssql.1\mssql\data\Northwind.mdf'

    ,move 'Northwind_log' to 'd:\microsoft sql server\mssql.1\mssql\data\Northwind.ldf'

aaaaaaaaaa