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

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

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

1.先使用restore filelistonly

restore filelistonly from disk = ‘E:\BaiduYunDownload\shifenzheng.bak‘

2.进行恢复

restore database kaifang
from disk = ‘E:\BaiduYunDownload\shifenzheng.bak‘
with move ‘linshi‘ to ‘D:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\linshi.mdf‘,
move ‘linshi_log‘ to ‘D:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\linshi_log.ldf‘

命令行下从bak文件恢复sqlserver数据库方法,布布扣,bubuko.com

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

上一篇:sql中获得时间的参数


下一篇:.net一次连接执行多条sql语句