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文件路径
SQL Server 异名数据库bak还原
内容版权声明:除非注明,否则皆为本站原创文章。