0

Can someone help me with an archiving solution where a row in a table when deleted a trigger is raised and the row is moved to another table and under a archive database.

The archive table schema should be kept in sync with current table schema

Quintin Par
  • 4,373
  • 11
  • 49
  • 72
  • 1
    Sorry, are you expecting us to provide a system to do this for you, or did you have a question about some specific detail. Please be more specific. – Zoredache Dec 14 '11 at 19:17

1 Answers1

1

You cannot setup triggers on table alterations. Perhaps you should look at archiving bin logs... instead of trying to archive deletes. Perhaps you should just deny deletes altogether... and simply have a "isDeleted" field.

TheCompWiz
  • 7,409
  • 17
  • 23
  • +1 for a `deleted` boolean. If you want to delete stuff but keep it around, this is how you do it. If you're concerned about bloat, have a `LastModified` time and reap stuff older than X days. – voretaq7 Dec 14 '11 at 19:39