I have a two part question I have the code below and it does a grat job of pulling in the triggers and telling me if they are enabled or not. But I only need to see the disables ones and I need to e-mail that info the the developers on a nightly bases.
ALTER PROCEDURE [dbo].[triggerstatus]
IF object_id('tempdb..#TRIGGER_STATUS') IS NOT NULL
DROP TABLE #TRIGGER_STATUS
select *, CASE WHEN OBJECTPROPERTY(id,'ExecIsTriggerDisabled') = 0 THEN 'NO' ELSE 'YES' END AS [TRIGGER_DISABLED]
WHERE xtype = 'TR'
ORDER BY name
select * from #TRIGGER_STATUS