SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Read TRN Data


Read TRN Data

Author
Message
Peter2012
Peter2012
SSC-Addicted
SSC-Addicted (416 reputation)SSC-Addicted (416 reputation)SSC-Addicted (416 reputation)SSC-Addicted (416 reputation)SSC-Addicted (416 reputation)SSC-Addicted (416 reputation)SSC-Addicted (416 reputation)SSC-Addicted (416 reputation)

Group: General Forum Members
Points: 416 Visits: 157
Hi Gurus,

We've configured MS SQL Server 2008 R2 and restored the recent backup of PRD database (.bak file) into our DR server, for instance: PRD DB backup of 14 Oct 2012.

There are some transaction log files (*.TRN) that we'd like to read and find out information related to LSN (first LSN, last LSN, Checkpoing LSN, DatabaseBackup LSN, etc).

We know that it can be done by using this command:
RESTORE HEADERONLY FROM DISK='d:\Temp\WIR_20121014210000.trn'

However, this only read 1 TRN file, is it possible to use SQL query to ready a bunch on TRN files and generate an output containing LSN related information?

Appreciate for your help.

Thanks.



- Peter
KylesWay
KylesWay
SSC-Enthusiastic
SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)

Group: General Forum Members
Points: 193 Visits: 367
I've found this article helpful.
I hope this helps.
Also keep in mind that you can save this data to a table and start slicing and dicing from there. :-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search