加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

命令行下从bak文件恢复sqlserver数据库方法

发布时间:2020-12-12 13:11:57 所属栏目:MsSql教程 来源:网络整理
导读:注:本文所示访问从SqlServer 2000 - 2014版都是通用的 参考:http://blog.sina.com.cn/s/blog_5cdf6f450102dwir.html 1.先使用restore filelistonly命令显示数据库的逻辑文件名和数据库名称 1 restore filelistonly? from ? disk =? 'E:BaiduYunDownloads
1 restore filelistonly?from? disk =?'E:BaiduYunDownloadshifenzheng.bak'

  

2.进行恢复

1 2 3 4 restore?database? kaifang'E:BaiduYunDownloadshifenzheng.bak'with? move? 'linshi'? to? 'D:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLDATAlinshi.mdf','linshi_log'? 'D:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLDATAlinshi_log.ldf'

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

注:本文所示访问从SqlServer 2000 - 2014版都是通用的

参考:http://blog.sina.com.cn/s/blog_5cdf6f450102dwir.html

1.先使用restore filelistonly命令显示数据库的逻辑文件名和数据库名称

    推荐文章
      热点阅读