Как восстановить полный (full) и разностный (diff) бэкап базы MSSQL

RESTORE DATABASE [ax_molniya] FROM  DISK = N'\\192.168.0.38\Backup\AXAPTA\ax_molniya_backup_201705291300.bak' WITH  FILE = 1,  MOVE N'FG_PRIMARY' TO N'e:\ax_molniya.mdf',  MOVE N'FG_CUSTTRANSACTION' TO N'e:\ax_molniya_1.ndf',  MOVE N'FG_INVENTCLOSING' TO N'e:\ax_molniya_2.ndf',  MOVE N'FG_INVENTREMAINS' TO N'e:\ax_molniya_3.ndf',  MOVE N'FG_INVENTTRANSACTION' TO N'e:\ax_molniya_4.ndf',  MOVE N'FG_VENDTRANSACTION' TO N'e:\ax_molniya_5.ndf',  MOVE N'FG_INDEXES' TO N'e:\ax_molniya_6.ndf',  MOVE N'ax_molniya_Log' TO N'e:\ax_molniya_7.LDF',  NORECOVERY,  NOUNLOAD,  STATS = 10
GO


RESTORE DATABASE ax_molniya
 FROM  DISK = '\\192.168.0.38\Backup\AXAPTA\ax_molniya_backup_201706041500.bak'
 WITH  FILE = 4,  MOVE N'FG_PRIMARY' TO N'e:\ax_molniya.mdf',  MOVE N'FG_CUSTTRANSACTION' TO N'e:\ax_molniya_1.ndf',  MOVE N'FG_INVENTCLOSING' TO N'e:\ax_molniya_2.ndf',  MOVE N'FG_INVENTREMAINS' TO N'e:\ax_molniya_3.ndf',  MOVE N'FG_INVENTTRANSACTION' TO N'e:\ax_molniya_4.ndf',  MOVE N'FG_VENDTRANSACTION' TO N'e:\ax_molniya_5.ndf',  MOVE N'FG_INDEXES' TO N'e:\ax_molniya_6.ndf',  MOVE N'ax_molniya_Log' TO N'e:\ax_molniya_7.LDF',STANDBY = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\ROLLBACK_UNDO_ax_molniyar.BAK',  NOUNLOAD,  STATS = 10
GO

 

Similar Posts:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *