View Contents of a Log Backup

  • I noticed in one of my overnight scheduled log backups that it was huge 500MB for 800MB database. Usually my log backups are relatively small 30MB. I would like to view the contents of the file so that I can see what happened.

    I can't seem to find a way to do this, can you tell me if there is a way to inspect the backup file to see what transactions occurred?

    Thanks,

    Tom

  • I'm not aware of a tool that lets you directly read a log backup file. I'm sure there's a way to do this (for example, Red Gate has a tool that lets you read a full backup file and use it to compare data & structure to a database), but I have never seen a tool that does it. The only way I can think of to even get a good guess would be to do a restore to a point in time using the log backups you have and see what has been happening on the system that way.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • http://www.apexsql.com/sql_tools_log.aspx

    ApexSQL Log

    Order now from $1,499 :w00t:

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • Sean Pearce (8/29/2013)


    http://www.apexsql.com/sql_tools_log.aspx

    ApexSQL Log

    Order now from $1,499 :w00t:

    But that just reads the log. It doesn't read log backups.

    Plus, you don't need a tool to read the log. There's an undocumented command, dbcc log().

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • There's an undocumented command that reads the log backup too, but I doubt it will help much. Unless someone is very, very familiar with the log internals, that'll just return hundred of MB of mostly incomprehensible data.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • tom 28327 (8/28/2013)


    I noticed in one of my overnight scheduled log backups that it was huge 500MB for 800MB database. Usually my log backups are relatively small 30MB. I would like to view the contents of the file so that I can see what happened.

    I can't seem to find a way to do this, can you tell me if there is a way to inspect the backup file to see what transactions occurred?

    Thanks,

    Tom

    Was that about the same time that a Reindexing job or database backup ran, by any chance?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply