Transaction logs larger than actual data imported

  • Hi,

    We have production server with Windows 2008 and SQL 2008. Our transaction logs are larger than the actual data being imported into the databases. This is not happening on SQL 2005 servers that use the same database.

    Please reply ASAP as this is critical server.

  • Sounds like you just need to do a transaction log backup which will decrease the size of the log files. Do you have a regularly scheduled transaction log backup task?

    Dave Coats

  • Hi Dave,

    Thanks for you prompt reply. Yes we do backup regularly and database recovery model is set to Simple.

  • Oh ok....I just assumed it was set to Full since it was a Production system. Thanks for clarifying.

    Dave Coats

  • Our application database's transaction logs grow more than what the actual data is imported.

    Is it possible to see what occupies our transaction logs (all committed, uncommiteed, broken) through queries or some mechanism. If we can schedule for this we may probably get an idea on this.

    Please let me know your thoughts on this and any other method apart from the above method.

  • satish.adlurmohan (8/5/2010)


    Our application database's transaction logs grow more than what the actual data is imported.

    That's quite normal. Log records have headers and other information in them about the transaction as well as the actual changed 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
  • But this is not the case in SQL 2005 server.

  • Could be that you have more memory on the 2008 server and checkpoint is occuring less frequently and the log is growing until checkpoint occurs and clears the log.

    What does the following return: SELECT log_reuse_wait_desc from sys.databases WHERE name='your2008db'

    Paul Randal
    CEO, SQLskills.com: Check out SQLskills online training!
    Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
    SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
    Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005

  • Hi Paul,

    Can i have your e-mail ID?

  • Please continue the thread here where everyone can benefit from the discussion.

    Paul Randal
    CEO, SQLskills.com: Check out SQLskills online training!
    Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
    SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
    Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005

  • Dave Coats (8/5/2010)


    Sounds like you just need to do a transaction log backup which will decrease the size of the log files. Do you have a regularly scheduled transaction log backup task?

    Btw - this is incorrect. A log backup will *never* decrease the size of the log file. The *only* way to do that is using a DBCC SHRINKFILE.

    Paul Randal
    CEO, SQLskills.com: Check out SQLskills online training!
    Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
    SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
    Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005

  • I had the same situation in three months ago. My DB log file began to increase and increase, I went around and around in the end i found the reason of such behaviour. I executed DBCC OpenTran and i found that there is one transaction with was running for long time, i checked this process, which began this transaction and i found that this process is hung up i killed it ,after killing process my transaction file size went down and everything go right.

  • SELECT log_reuse_wait_desc from sys.databases WHERE name='your2008db'

    The above command shows NOTHING for all databases

  • For both 2005 & 2008 the recovey model is Simple??

  • Yes. Both are simple.

    And there are no active transactions when i executed DBCC OPENTRAN

Viewing 15 posts - 1 through 15 (of 23 total)

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