July 9, 2002 at 3:13 am
Is there a way that I can issue a delete statement and tell it not to record the transaction in the transaction log?
I have a table and need to delete over 2 million records off the table on a regular basis after archiving the data. The problem is when I delete all these records my transaction log fills up and my customers cannot work
July 9, 2002 at 3:27 am
You could use the truncate table command instead of delete if you are deleting all the rows in the table.
Regards,
Andy Jones
.
July 9, 2002 at 3:41 am
You could put the table in its own database and set the Recovery option to Simple (in 2000); or set Truncate Log on Checkpoint (in 7 or earlier).
So long as you have regular backups, this won't be an issue
July 9, 2002 at 3:49 am
I only need to delete selected records
July 9, 2002 at 4:59 am
Then without switching recovery modes your best bet is to delete the records in reasonable sized chunks. Depending on your log size, I'd say anywhere from 10k to 100k records per chunk. Steve has an article about batching operations that has some code you can use.
Andy
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply