Old DBCC

  • Hi all,

    I was asked on an interview a question like "What DBCC command can you use to find out which transactions contribute the most to the growth of the log file?". Seeing that I cannot answer, he hinted that this must be an old DBCC command.

    What is this command please?

    Thanks

  • Answer-

    DBCC opentran()

  • My guess is he's looking for the undocumented DBCC DBLOG, not that I would ever choose to use that to see what's causing log growth, it's not intended to be human-readable, it's output is not documented anywhere and very hard to understand

    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
  • Thanks for quick responses.

    1. DBCC opentran shows only the oldest transaction, and it does not show it's size.

    2. DBCC dblog indeed is not documented anywhere. I had just few results from Google. I got impression that it must be Sybase or very old SQL Server command.

  • It is a very old command, it's still there and still usable (though I prefer the function version if I'm delving into the log), it's just not that easy to use.

    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

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

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