1

If you are going write a set of program to housekeep the production data, how can you ensure your program will work correctly?

We cannot housekeep the data based on their creation time. We would delete the data only if it has a generation date older than 6 months. But the generation date is not equal to the timestamp of the file, instead we query the database for relavent generation date.

If we implement a logic to compare the generation date and today's date, who can be sure of the logic won't fail on some special occasion? Maybe I am expressing too much concern over this, but when it comes to delete of production data, one needs to be cautious.

1
  1. For your program - Test, test, test

  2. Always make sure that you backup your database before carrying out housekeeping tasks

  3. If possible instead of deleting the data completely, move it to archive tables so that it is always available.

  • this is the answer. Analyse the requirments for the data cleanup, test your procedures thoroughly, backup before you run in live. – ozz Mar 7 '12 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.