• pkenny (2/29/2008)


    What is unique about server 2005? Can't this be done with previous versions of SQL. Nice solution BTW! Presumably the new database is secured in some way eg. you are the DBO?

    Peter.

    DDL triggers is a 2005 option only. The new database is secured in a way so that only administrators (sa) would have access. Since that is usually not enough, one could put a trigger on tables that hold the information that would have a contraint that would only allow you to delete if you were logged in with your domain name.

    e.g.

    IF suser_sname() = 'yourdomain\username'

    BEGIN

    End

    ELSE

    ROLLBACK TRAN

    END

    Something like that would be fun to catch those trying to hide the audit trail.