Database level trigger on delete,update operation

  • I want to create trgger on database level on DML commands

    Is it possible to create...pls help me out.

    Any answer will be highly appreciated!!

  • ok... DML triggers for INSERT/UPDATE DELETE have to be on each individual table, i believe; DDL events can be captured on a per-database or per server. so I believe the answer is no, it is not possible.

    what would you want this trigger to do? audit?

    would a DML trace do what you are looking for?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I would like to thanks to for replying me.

    Actually i wants to create trigger on either server or database wherever it is possible. and it should be audit Insert,update,and also delete operation.

    Its only for auditing.

    Suddenly somone has deleted records from table so just looking only to who had deleted.

    Please let me know it is possible. Caz i had tried but never got it.

    Any suggestion will be highly appreciated.

  • DML triggers (delete, insert, update) are applied to individual tables. Database and server-level triggers are only DDL (schema and definition changes)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply