Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Log Files growing beyond belief

Status
Not open for further replies.
Nov 21, 2000
26
0
0
US
I have several databases that we utilize to create and manipulate very large databases. I am getting in to situations on some of these where my log files are growing larger then my data files. This is a problem because when I do a Shrink Database on the database the data file shrinks but the log file does not.

What can I do to limit the size of my log files?

I have attempted to set a fixed size for the log files and now allow them to expand, however, this does not work because sometimes a query will crash with an error that the log file was full and the update could not complete. I have the Truncate log on checkpoint option turned on all databases.

Any ideas?
 
Just detach databases, remove the log file and attach the database again. John Fill
1c.bmp


ivfmd@mail.md
 
depending on what you are doing, you can do iterative updates/deletes or whatever in a loop

loop begin.....

set rowcount 10000
your manipulation
check how many rows are updated. if zero get out
loop end...

basically, in some fashion you need to break up your transaction in to smaller chunks... the above will work, but depending on how you check the loop, you may have performance problems... obviously, you need something to get you out of the loop. Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top