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文件路径

posted @ 2015-02-07 11:58  金虹巴巴  阅读(339)  评论(0编辑  收藏  举报