SQLServer2008还原数据库3154错误解决方法

时间:2022-05-19 20:43:51
USE MASTER
RESTORE DATABASE DB_DEMO
FROM DISK = 'D:\DB_DEMO_backup.bak'
WITH MOVE 'DB_DEMO' TO 'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DB_DEMO.mdf',
MOVE 'DB_DEMO_LOG' TO 'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DB_DEMO_log.ldf',
STATS = 10, REPLACE

GO


ps.原因在于备份数据库物的理文件名,物理地址在还原环境上有所改变.