Spdeleteolderrecords Doesn't Complete. Follow
I recently updated the Maintenance plan on my MCSQL 2008 R2 server to include the recommended call to SpDeleteOlderRecords call. The plan has been timing out. I copied the code to a new query window to run it stand alone to find that it was still not completing after over an hour. This particular DB has been up and running for over a year without any maintenance so I would expect that there would be a lot to delete but I would not expect the process to take over an hour. The other problem with the procedure is, due to the number of records being locked, the row locks are being escalated to table locks causing blocking in the production system.
What can be done to get the cleanup done and get the maintenance plan running in a timely manner?
Thanking all in advance,
Please sign in to leave a comment.