Sql Server 还原数据库到指定路径语句

restore database 数据库名称 from disk='备份文件路径' with RECOVERY,REPLACE,move '数据库名称' to '为 数据库名称.mdf 文件指定的存放路径',move '数据库名称_log' to '为 数据库名称_log.ldf 文件指定的存放路径';

示例:

restore database test from disk='E:\test.bak' with RECOVERY,REPLACE,move 'test' to 'E:\dbFile\test.mdf',move 'test_log' to 'E:\dbFile\test_log.ldf';

 

posted @ 2018-03-31 14:51  酒醉的鸵鸟  阅读(4140)  评论(0编辑  收藏  举报