I would like Create a DDL trigger that would intercept all delete,updates,and inserts by a specific application.
Than send an email to me about the :
user name
application
T-SQL statement executed
The problem I am having is I can't create a DDL trigger for Delete,Insert, or Update statements.

Catching DML statements by A specific application and emailing all identiy info and T-SQL String
shayc
Delete, Update, and Insert are DML operations, not DDL operations. You can write DML triggers for these operations.
Thanks
Laurentiu
sally_de
HTH, jens K. Suessmeyer.
---
http://www.sqlserver2005.de
---
Henrik Karlsson
DamsDev2007
If DML Statements are not catchable , how come I can do a trace with SQL Profiler and see what DML statements are executed.
I created a common generic managed stored procedure for Auditing all DML statements based on an aricle at the following url http://g.msn.com/0FCS/1 D135BE85&http://www.sqljunkies.com/article/4cd01686-5178-490c-a90a-5aeef5e35915.scuk&&DI=5784&SU=http%3a%2f%2fwww.Codezone.com%2fSqlJunkies.com&QSP=Creating_a_generic_audit_trigger_with_SQL_2005_CLR&CM=www.sqljunkies.com&CE=%2farticle%2f4cd01686-5178-490c-a90a-5aeef5e35915.scuk&HL=Creating_a_generic_audit_trigger_with_SQL_2005_CLR_Tot%3d2_SIDX%3d1_PSZ%3d10_RNK%3d2.
However, I am not satified with just Auditing the result of the DML statements I would like to record the Top Level T-SQL statement that caused the trigger to run. If the Top-Level T-SQL statement was a stored procedure, I would like to record the name and passed parameters to the triggering stored procedure. Is there anyway to do this, even if a third party solution is needed.
bozo01
DML Statements are not catchable, only the results form the inserted and deleted table as well as the affected columns and DML Operation type.
HTH, Jens K. Suessmeyer.
---
http://www.sqslerver2005.de
---