SQL server数据库备份与还原版本不匹配,问题处理
作者:互联网
新建HYGC_new,直接执行如下sql语句即可,原理即为将HYGC.bak直接还原到文件mdf与ldf中
//HYGC.bak为备份过来的文件;HYGC_new为新建的数据库
RESTORE FILELISTONLY FROM DISK = N'E:\nbdatabase\HYGC.bak'
RESTORE DATABASE HYGC_new
FROM DISK = 'E:\nbdatabase\HYGC.bak'
WITH MOVE 'HYGC' TO 'E:\software\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\HYGC_new.mdf',
MOVE 'HYGC_log' TO 'E:\software\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\HYGC_new_log.ldf'
标签:MOVE,ldf,备份,HYGC,server,SQL,new,bak 来源: https://www.cnblogs.com/ablogword/p/15321931.html