• Backups and restores are a wonderful thing but, if the data is THAT important and mistakes in the form of modifications and deletions are made THAT often, then it's time to setup a simple audit system on the table. That'll save a whole bunch of headaches provided that the audit trigger is written correctly. With the addition of something like the ORIGINAL_LOGIN(), you might be able to catch someone doing it directly in the database (it won't help much through an application but at least you'll know someone is doing it through an app).

    The next thing to do would be to tighten up who has privs to delete/modify rows because they're obviously not very good at it. Seriously!

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)