Common Workflows
Practical recovery and audit scenarios with Log Reader.
Before any recovery script: back up the database (or restore a copy), generate both Undo and Redo while data is still in the after-change state, save the .sql files, and review them in SSMS. Do not run the same undo twice.
Full limits: Undo / Redo script limits.
Undo an accidental DELETE / UPDATE
- Connect and select the database (FULL recovery recommended so the log has not been truncated).
- Narrow filters to the table and approximate time window, then Read Log.
- On Log Entries, find the offending operations. Open Data Changes if you need before/after values.
- On the row or on the Transactions tab, generate Undo and Redo and save both scripts.
- Review the SQL (keys, SET columns, lookup comments). Test on a copy when you can, then run Undo under change control.
- For multi-statement accidents, use Transaction Recovery on the Transactions page rather than one row at a time.
Point-in-time recovery script
- On Log Entries, click Point-in-Time Recovery to open the side panel. Set the table as
schema.tableand the target time. - Generate the PIT script (undo of decoded DML after that time on that table only).
- Export the script; execute under change control after backup verification. Schema/DDL is not included.
Audit who changed a row
- Use Row History / filters for the table and key.
- Walk the timeline of INSERT/UPDATE/DELETE entries. Login and time come from the transaction begin.
- Export CSV, Excel, or HTML for the ticket.
Watch new changes live
- Connect to the online database and click Monitor Active log on the toolbar.
- Set table / login / time filters (same as Log Entries) and start monitoring.
- Click Close to stop the poll and dismiss the dialog. Ghost cleanup duplicates are not shown.
Read a log backup (.trn / .bak)
- Clear or ignore leftover Search / table filters from a previous live read (the tool also clears them automatically if they would hide every backup row).
- Set Source to Log backup (.trn) or Full backup (.bak) (or leave Online and Browse — Backup Files is first in that dialog).
- Click Browse and open the
.trnor.bak. - Click Read Log. Duration is fitted to the records in the file so Last 1 Hour does not hide yesterday’s backup.
- The status bar should show a non-zero count. If it says Showing 0 after filters, the empty-state text names the remaining filter (search, table, login, txn, or duration).
Pause and resume an investigation
- After you have the source, database, duration, table/login/txn/LSN filters, and search the way you want, use File → Save Investigation.
- Later, File → Open Investigation restores those settings. Connect to the same server if needed.
- Click Read Log. Opening the JSON does not run the read for you, so a stale file path cannot surprise-query the instance.