I have a table with over 120 million records. In order to keep the number of records down to a minimum, I have to find a way to export summary data and then delete records on a monthly basis from this table. Supporting tables don't have any where near as many records and I only have to delete from this one table. Currently using circular logging.
Records do not get edited.... simply post a record, pull summary data, export summary data and delete records when old.
My Log File Size is set to 50000 and my number of primary logs was set to 25... I just upped it to 50 today. Secondary Log files is set to 0.
My delete query isn't pretty, but it's simple -
Delete
From MetricsData
Where Month(Timekey_dttm) = 11 and Day(Timekey_dttm) < 5;
commit;
My script repeats this and increments the Day(Timekey_dttm) < 10... 15.. etc., until I've covered all days in the month.
Once I'm able to successfully delete records in this manner, I'll clean up the query/script to address year changes, etc.
Can someone explain why I'm still getting Transaction Log File Full msgs? I'm now allocating 10 gig to my Transaction Logs. My backups aren't that big.
Should I look at an alternative delete solution?
Thanks in advance.