• No matter which method you use to determine if a database is being used, it's not a good idea to immediately kill the database.  To Dave's  point, I'll typically take a final backup along with a "Tail Log" backup, which also takes the database offline and then I'll leave it like that for at least two monthly cycles and a quarterly cycle, whichever is the furthest out.  And then I guard the final MDF and LDF locally (as well as on tape) until the year end cycle has passed.  If we needed to drop the database because of space issues, having the MDF and LDF locally might not be feasible so I'll have a special tape made and keep that locally.

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