• Thanks for sharing.  I always enjoy learning from these types of experiences.  One thing I always do no matter how trivial of a script I run against a production database is to wrap the entire script in a transaction as follows:

    BEGIN TRAN
    DELETE FROM table WHERE id = 5
    ROLLBACK 

    This allows me to see how many rows are affected while performing a safe operation.  If I see "1,000,000 rows affected." when I'm expecting 1 row, then obviously something is wrong and I probably just blew out my log file.  If it does work as expected, then I simply swap out the ROLLBACK for a COMMIT or exclude the BEGIN TRAN and ROLLBACK lines from the batch which will auto-commit.  This has saved me from many unexpected and potentially epic fails.

    Please keep in mind that this won't completely ROLLBACK all changes in all scenarios but in general, it's a good practice.