Created
June 12, 2015 16:09
-
-
Save xavierzwirtz/afe8fc92a74a2bdcb051 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
obj.name AS trigger_name | |
,USER_NAME(obj.uid) AS trigger_owner | |
,s.name AS table_schema | |
,OBJECT_NAME(parent_obj) AS table_name | |
,OBJECTPROPERTY( obj.id, 'ExecIsUpdateTrigger') AS isupdate | |
,OBJECTPROPERTY( obj.id, 'ExecIsDeleteTrigger') AS isdelete | |
,OBJECTPROPERTY( obj.id, 'ExecIsInsertTrigger') AS isinsert | |
,OBJECTPROPERTY( obj.id, 'ExecIsAfterTrigger') AS isafter | |
,OBJECTPROPERTY( obj.id, 'ExecIsInsteadOfTrigger') AS isinsteadof | |
,OBJECTPROPERTY(obj.id, 'ExecIsTriggerDisabled') AS [disabled] | |
FROM sysobjects obj | |
INNER JOIN sysusers | |
ON obj.uid = sysusers.uid | |
INNER JOIN sys.tables t | |
ON obj.parent_obj = t.object_id | |
INNER JOIN sys.schemas s | |
ON t.schema_id = s.schema_id | |
INNER JOIN syscomments comments | |
ON comments.id = obj.id | |
WHERE obj.type = 'TR' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment