GeoVIP
GeoVIP

Reputation: 1564

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

Upvotes: 0

Views: 2766

Answers (1)

SFrejofsky
SFrejofsky

Reputation: 772

There is no way to restore multiple transaction log files in one shot. They are additive files and must be loaded in sequential order from start to finish. Unfortunately they do not function like differential backups.

Upvotes: 1

Related Questions