Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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

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.