时间:2021-07-01 10:21:17 帮助过:4人阅读
-- 第一步、恢复完全备份
RESTORE DATABASE idealmonitor
FROM DISK = ‘D:\INSTALL\SQLServer\MSSQL12.MSSQLSERVER\MSSQL\Backup\idealmonitor20171820.bak‘
WITH MOVE ‘idealmonitor‘ TO ‘D:\INSTALL\SQLServer\MSSQL12.MSSQLSERVER\MSSQL\DATA\idealmonitor.mdf‘,
MOVE ‘idealmonitor_log‘ TO ‘D:\INSTALL\SQLServer\MSSQL12.MSSQLSERVER\MSSQL\DATA\idealmonitor_log.LDF‘, norecovery
-- 第二步、恢复差异备份
RESTORE DATABASE idealmonitor
FROM DISK = ‘D:\INSTALL\SQLServer\MSSQL12.MSSQLSERVER\MSSQL\Backup\diffbackup.bak‘
WITH MOVE ‘idealmonitor‘ TO ‘D:\INSTALL\SQLServer\MSSQL12.MSSQLSERVER\MSSQL\DATA\idealmonitor.mdf‘,
MOVE ‘idealmonitor_log‘ TO ‘D:\INSTALL\SQLServer\MSSQL12.MSSQLSERVER\MSSQL\DATA\idealmonitor_log.LDF‘, recovery
SQLServer笔记
标签:sqlserver blog pre install dea sql code ase ack