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

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Truncate or Shrink log while Delete is running

Author  Topic 

itsonlyme4
Posting Yak Master

109 Posts

Posted - 2015-05-07 : 11:10:54
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

22859 Posts

Posted - 2015-05-07 : 15:03:40
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 - 2015-05-08 : 10:56:32
Thank you!
Go to Top of Page
   

- Advertisement -