1

I have a SQL Server backup (.bak) file, and I want use fn_dump_dblog (undocumented function) on it to get all transaction history from it.

I read this article https://www.mssqltips.com/sqlservertip/3555/read-sql-server-transaction-log-backups-to-find-when-transactions-occurred/

and do the same but fn_dump_dblog result only shows query of restoring of that database (most of the rows are NULL)

Please help me - what am I doing wrong? Or there is any alternative way to do that?

Note: I am taking backup in full mode

  • I already tried fn_dblog but that does not help me

  • I can not use fn_dblog or fn_dump_dblog on database directly so I am taking backup (.bak file) every day and then restore it to my local system.

  • can i get transaction history if i have .trn file ?

1 Answers1

4

You can't. A database backup only contains a minimal amount of log records, see How much transaction log a backup includes. If there was no other activity, then the only transaction captured would be the BACKUP itself, as you see.

You did not specify if is a database backup or a log backup, I made an educated guess that you have a database backup. A log backup would contain only log records, but log backup implies a recovery plan and a log chain, you would have mentioned if they were in place.

Remus Rusanu
  • 288,378
  • 40
  • 442
  • 569