sqlserver bak还原
一.查看:
restore filelistonly from disk='F:\Db\A_backup.bak'
二.还原:
RESTORE DATABASE A
FROM DISK = 'F:\Db\A_backup.bak' --bak文件路径
with replace,
MOVE 'A' TO 'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\A.mdf', --mdf文件路径
MOVE 'A_log' TO 'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\A_log.ldf' --ldf文件路径