Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

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. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

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 Answer 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.

share|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

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