注:本文所示訪問從SqlServer 2000 - 2014版都是通用的。
1、先使用restore filelistonly命令顯示數(shù)據(jù)庫的邏輯文件名和數(shù)據(jù)庫名稱:
restore filelistonly
from
disk =
'E:\BaiduYunDownload\shifenzheng.bak'
2、進行恢復(fù):
restore
database
kaifang
with
move
'linshi'
to
'D:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\linshi.mdf'
,
'linshi_log'
'D:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\linshi_log.ldf'