November 3, 2005 at 12:01 am
Hi,
You could list out those triggers from sysobjects table where xtype = 'TR'
November 3, 2005 at 2:40 am
create table #test (trgname varchar(100), owner varchar(40),isupdate bit,isdelelete bit,isinsert bit,isafter bit, isinsteafof bit)
exec sp_msforeachtable 'insert into #test exec sp_helptrigger ''?'''
select * from #test
go
drop table #test
November 3, 2005 at 9:15 am
and here's another method that i use myself; i need to find all trigers and their trigger body if it exists:
select parent_objects.name,
trigger_sysobjects.name,
syscomments.text
FROM sysobjects trigger_sysobjects
INNER JOIN sysobjects parent_objects on parent_objects.id= trigger_sysobjects.parent_obj
INNER JOIN syscomments on trigger_sysobjects.id=syscomments.id
WHERE trigger_sysobjects.xtype='TR'
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply