SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 Log is growing Unpredictably
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MadhavBitra
Starting Member

India
1 Posts

Posted - 01/29/2010 :  06:13:42  Show Profile  Reply with Quote
Hi All,

I have been facing a problem with one of my database;while updating a table contains 50,000 records, the log is growing from 4MB to 14GB. i don't have a clue why it's happening.
I have tried the below options but veined.
CHECKDB,CHECKALLOC,CHECKTABLE,REINDEX.

Could any one suggest me the cause and resolution?

Thanks in Advance,

Kristen
Test

United Kingdom
22431 Posts

Posted - 01/29/2010 :  06:26:50  Show Profile  Reply with Quote
When you do an UPDATE the whole transaction is stored in the log. This transaction cannot be removed / truncated / backed up etc. until it completes. The transaction is essential in case SQL Server has to ROLLBACK your update.

Presumably your update on 50,000 is generating 14GB of logging information (maybe there are triggers that are firing requiring additional logging).

Either do the update in batches, and backup the Tlog in between, or allow the Tlog to grow, make a backup, and then shrink it back to its normal size.

Do not shrink the log if this is anything other than a one-off update (I'm surprised that your normal Tlog is only 4MB, that's very little for normal operations - unless the DB is read only!)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000