Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Truncate or Shrink log while Delete is running
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

itsonlyme4
Posting Yak Master

109 Posts

Posted - 05/07/2015 :  11:10:54  Show Profile  Reply with Quote
SQL Server 2005

Ran a 'Delete from' on a table which is a fully logged operation.

is there a way to truncate or shrink the log WHILE the delete is running?

Log is filling up my drive

Kristen
Test

United Kingdom
22859 Posts

Posted - 05/07/2015 :  15:03:40  Show Profile  Reply with Quote
We delete in batches (of, say, 10,000 or 100,000 rows) in a loop, then do a WAITFOR for a few seconds (to allow other users to gain access and not 100% monopolise the server!!) and we increase TLog Backup frequency to every minute for the duration of the "database housekeeping" routine(s)
Go to Top of Page

itsonlyme4
Posting Yak Master

109 Posts

Posted - 05/08/2015 :  10:56:32  Show Profile  Reply with Quote
Thank you!
Go to Top of Page
  Previous Topic Topic Next 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.02 seconds. Powered By: Snitz Forums 2000