Hi
You are right. My post is not complete here. The idea is to commit the delete in batches, because SQL Server will "back-up" the lines it is trying to delete in case the operation is rolled back for some reason. It might be that you would want to wrap the deletion with a begin and commit transaction, though if I remember correctly it worked without when I tried.
If you need to wrap it, try this instead:
SELECT 1
WHILE @@ROWCOUNT > 0
BEGIN
BEGIN TRANSACTION
DELETE TOP (50000)
FROM AIFMESSAGELOG
COMMIT
END
Just replace the tablename with the table you need to flush out. I'm sorry for not answering that part complete and correctly.
Here are some pretty good posts explaining this further and you might find inspiring:
merill.net/.../deleting-millions-of-records-from-a-table-without-blowing-the-transaction-log
wikidba.wordpress.com/.../sql-server-delete-millions-of-rows-without-hampering-the-transaction-log