SQL Server 异名数据库bak还原
RESTORE DATABASE test --数据名称
FROM DISK = 'C:\Users\Administrator\Desktop\test.bak' --bak文件路径
with replace,
MOVE 'TestCode' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\test.mdf', --mdf文件路径
MOVE 'TestCode_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\test_log.ldf' --ldf文件路径