sp_helpdb & DBCC sqlperf('logspace') returns different LOG file sizes for same DB

  • Dear All,

    When I execute sp_helpdb ('DBname') I get LOG file size as "160832 KB (Size) growth (10%)"

    But when I run "DBCC sqlperf('logspace')", I get "157.0547 (Log Size in MB), 7.119584 (Log Space Used (%))"

    for the same datbase.

    why this difference.? Log file size should be same in both the cases right.?

    Thanks.

  • Hi San,

    You executed sp_helpdb ('DBname') and got LOG file size as "160832 KB (Size) growth (10%)" i.e 157.0625 MB

    and when run "DBCC sqlperf('logspace')", got

    "157.0547 (Log Size in MB), 7.119584 (Log Space Used (%))"

    for the same datbase.

    Size Value of log file is almost same (differs by .0078) . I hope that as this database is being used at the time, when you run these commands, so this minute difference is there.

    Ankur 🙂

  • You executed sp_helpdb ('DBname') and got LOG file size as "160832 KB (Size) growth (10%)" i.e 157.0625 MB

    Ankur, I dint understand this point. Can you pls clarify.

    Thanks for your reply.

  • Hi San,

    We know that log is being used by SS to record transactions taking place.

    Even the commands which you have run was also logged in the same log file. I hope no logical truncation of log taken place in time between running these commands, so it resulted in increase of log size by this much size.

    Moreover if this database is being used by other users, it can be resulted in higher differences in size, as their activities are being logged at the same time in this log file.

    Hope it clearified the doubt.

    Ankur

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

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