vendredi 27 février 2015

How to restore transaction log with multiple files


I restore database logs like :



RESTORE LOG [paytrn] FROM DISK = N'C:\backup\log.trn' WITH FILE = 1, NORECOVERY, NOUNLOAD, STATS = 100
GO
RESTORE LOG [paytrn] FROM DISK = N'C:\backup\log.trn' WITH FILE = 2, NORECOVERY, NOUNLOAD, STATS = 100
GO


But have many files , is there any way to restore all files without write restore for every file? Something like :



RESTORE LOG [paytrn] FROM DISK = N'C:\backup\log.trn' WITH FILE = ALL, NORECOVERY, NOUNLOAD, STATS = 100


Some script which will be update transaction log in sequential order





Aucun commentaire:

Enregistrer un commentaire