Question: How do you list DML triggers created or modified in the last N days? Query the current database’s sys.objects catalog, filter the two DML trigger types, and compare their create_date and modify_date with your cutoff.

DECLARE @Days int = 7;
DECLARE @Cutoff datetime = DATEADD(DAY, -@Days, GETDATE());
SELECT o.name AS [Trigger Name],
CASE o.type WHEN 'TR' THEN 'SQL DML Trigger'
WHEN 'TA' THEN 'DML Assembly Trigger' END AS [Trigger Type],
sc.name AS [Schema_Name],
OBJECT_NAME(o.parent_object_id) AS [Table Name],
o.create_date AS [Trigger Create Date],
o.modify_date AS [Trigger Modified Date]
FROM sys.objects AS o
INNER JOIN sys.schemas AS sc ON o.schema_id = sc.schema_id
WHERE o.type IN ('TR', 'TA')
AND (o.create_date >= @Cutoff OR o.modify_date >= @Cutoff)
ORDER BY o.modify_date DESC, o.name;This keeps the original seven-day example and its table, schema and trigger-type columns. The original DATEDIFF(D, date, GETDATE()) < 7 counted midnight boundaries. The cutoff here is a rolling seven-day interval in server-local time. Change @Days for your requirement.
These are catalog dates, not the trigger’s last execution time. Matching create and modify dates are common for a newly created trigger, but they aren’t an audit history proving that nothing ever happened to it. Metadata visibility also matters: run with permission to see the objects you are investigating. This query lists table and view DML triggers, not server-level or database-level DDL triggers.
I have been very cautious about triggers throughout my career. During a performance health check, I want to know what additional work a simple data modification is quietly invoking. Expensive trigger code runs in the modifying transaction and can turn an ordinary update into a much larger job.
My preference is to put that business logic in the stored procedure or application path that modifies the data, where the work is explicit. That is a design preference, not a claim that every trigger is slow or unnecessary. When a trigger is required, review its set-based handling of multiple rows, its dependencies and its cost.
The script answers where to look; reviewing the trigger definition and its actual workload answers whether it is a problem. A recent modify date alone doesn’t establish a performance regression.
Microsoft: sys.objects documents the types and catalog dates.
Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.





1 Comment. Leave new
I do agree with you that triggers are risky as there are a lot of cases where you can end up with undesirable results and it can be alarming when you see 2 things in the messages window about rows being updated. Nothing more scary than doing an update on a single row and seeing a notice that the entire table was modified! We ran into that one where a trigger was dumping the entire table to an auditable version of the table every time something changed in the table. it was a small table, but a 100 row table that has 10 updates happen on it, has 1000 rows in the audit table when only 10 need to be stored.
That being said, we run service broker where I work and we need data to be synced between very specific tables on 2 different SQL instances. We use service broker for this and triggers on the source tables. When a row is inserted,updated or deleted on some very specific tables, the data gets synced across to the second system. I am not sure how we could do this without a trigger. Thoughts?