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

link|improve this question

56% accept rate
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
feedback

closed as not a real question by Zypher Dec 14 '11 at 19:42

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. See the FAQ for guidance on how to improve it.

1 Answer

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.

link|improve this answer
+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
feedback

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