Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL Server 2008 R2 log growth question - solved!

SQL Server 2008 R2 log growth question - solved!

Scheduled Pinned Locked Moved Database
databasequestionsql-serversysadmin
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GuyThiebaut
    wrote on last edited by
    #1

    A log file has been growing very fast from 2 gig up to 19 gig in a matter of about 4 hours. The recovery model is set as full. Even with backing up the transaction log file, every 30 minutes, I have found that the log file is not getting truncated. I did notice that the file growth stopped as soon as the workday came to a close. On running DBCC SQLPERF(LOGSPACE) I noticed that the log space was being eaten up fairly quickly. Also on running DBCC OPENTRAN I did not see any really old transactions that had not been commited In my investigations someone mentioned that if a person was selecting a large volume of data this could make the log file grow. It is quite possible to select in the region of 9million plus rows in a select query of this database. I was under the impression that the transaction log file only contained updates, deletes and inserts in order to be able to rebuild the database at any point in time. Having googled this I am not any the wiser. I will run some more diagnostic tests on Monday to see if I can discover any more information if I see the log file growing rapidly again. So my question is – would a large number of individual select commands, or a high volume of data being selected get logged to the transaction log file? _____________________________________________ Solved - read below _____________________________________________ It turns out that a user was running a large report which kept falling over. They kept restarting the report. The software is a 3rd party piece of software that appears to write results to some sort of temporary table. I asked the user to run the report first thing this morning, when the office was very quiet. Using DBCC SQLPERF(LOGSPACE) I then noticed the log starting to be eaten up again and when the report completed the log stopped growing. So I think I am going to set up some sort of warning system that monitors log growth over time and alerts me when it starts ballooning as it did on Friday.

    “That which can be asserted without evidence, can be dismissed without evidence.”

    ― Christopher Hitchens

    Richard DeemingR 1 Reply Last reply
    0
    • G GuyThiebaut

      A log file has been growing very fast from 2 gig up to 19 gig in a matter of about 4 hours. The recovery model is set as full. Even with backing up the transaction log file, every 30 minutes, I have found that the log file is not getting truncated. I did notice that the file growth stopped as soon as the workday came to a close. On running DBCC SQLPERF(LOGSPACE) I noticed that the log space was being eaten up fairly quickly. Also on running DBCC OPENTRAN I did not see any really old transactions that had not been commited In my investigations someone mentioned that if a person was selecting a large volume of data this could make the log file grow. It is quite possible to select in the region of 9million plus rows in a select query of this database. I was under the impression that the transaction log file only contained updates, deletes and inserts in order to be able to rebuild the database at any point in time. Having googled this I am not any the wiser. I will run some more diagnostic tests on Monday to see if I can discover any more information if I see the log file growing rapidly again. So my question is – would a large number of individual select commands, or a high volume of data being selected get logged to the transaction log file? _____________________________________________ Solved - read below _____________________________________________ It turns out that a user was running a large report which kept falling over. They kept restarting the report. The software is a 3rd party piece of software that appears to write results to some sort of temporary table. I asked the user to run the report first thing this morning, when the office was very quiet. Using DBCC SQLPERF(LOGSPACE) I then noticed the log starting to be eaten up again and when the report completed the log stopped growing. So I think I am going to set up some sort of warning system that monitors log growth over time and alerts me when it starts ballooning as it did on Friday.

      “That which can be asserted without evidence, can be dismissed without evidence.”

      ― Christopher Hitchens

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      Have a look at the log_reuse_wait_desc column in sys.databases - that should give you some idea of what's preventing the log from being truncated.

      SELECT
      [name],
      recovery_model_desc,
      log_reuse_wait_desc
      FROM
      sys.databases
      ;

      Technet has a description of the values: http://technet.microsoft.com/en-us/library/ms345414%28v=sql.105%29.aspx[^]


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      G 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        Have a look at the log_reuse_wait_desc column in sys.databases - that should give you some idea of what's preventing the log from being truncated.

        SELECT
        [name],
        recovery_model_desc,
        log_reuse_wait_desc
        FROM
        sys.databases
        ;

        Technet has a description of the values: http://technet.microsoft.com/en-us/library/ms345414%28v=sql.105%29.aspx[^]


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        G Offline
        G Offline
        GuyThiebaut
        wrote on last edited by
        #3

        Thanks - yes I was looking at this on Friday. I discovered it was a user who was running a report that kept falling over and they kept restarting it. The software is a 3rd party piece of software and it looks like when users select data the results are written to some sort of temporary table within the database.

        “That which can be asserted without evidence, can be dismissed without evidence.”

        ― Christopher Hitchens

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups