adminbd

Записи по mssql,oracle,windows и linux

Have a Question?

If you have any question you can ask below or enter what you are looking for!

Как восстановить полный (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

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>