RESTORE DATABASE Supervision FROM DISK = 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\Backup\Supervision.bak'
with replace,
MOVE 'Supervision' TO 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\DATA\Supervision.mdf',
MOVE 'Supervision_log' TO 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\DATA\Supervision_log.ldf'、
RESTORE DATABASE db(数据库名称) FROM DISK = 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\Backup\Supervision.bak(还原文件目录)'
with replace,
MOVE db(数据库名称)TO 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\DATA\db(数据库名称).mdf',
MOVE 'db(数据库名称)_log' TO 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\DATA\db(数据库名称).ldf'
with replace,
MOVE 'Supervision' TO 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\DATA\Supervision.mdf',
MOVE 'Supervision_log' TO 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\DATA\Supervision_log.ldf'、
RESTORE DATABASE db(数据库名称) FROM DISK = 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\Backup\Supervision.bak(还原文件目录)'
with replace,
MOVE db(数据库名称)TO 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\DATA\db(数据库名称).mdf',
MOVE 'db(数据库名称)_log' TO 'D:\SQLDERVER2012\MSSQL11.MSSQLSERVER\MSSQL\DATA\db(数据库名称).ldf'
本文介绍如何使用T-SQL命令还原SQLServer数据库到指定路径,包括数据文件和日志文件的具体操作步骤。
1955

被折叠的 条评论
为什么被折叠?



