0

So I was given a database and im trying to solve a trigger bug (it's pretty small change) however I've looked at every function/trigger so I did a:

select * from sys.triggers where name = 'NAME'

and it returned this:

NAME    1181247263  1   OBJECT_OR_COLUMN    2053582354  TR  SQL_TRIGGER 2012-11-13 09:41:13.707 2013-03-19 14:08:22.583 0   0   0   0

What exactly does this mean? is there literally a folder/function called OBJECT_OR_COLUMN

because I can't see it? Im doing this in SQL Server management studio btw.

3 Answers3

1

This will tell you the associated table...

select  t.name As TriggerName, 
        ss.name As SchemaName, 
        so2.name As TableName
from    sys.triggers t
Join    sysobjects so
        On  t.object_id = so.id
Join    sysobjects so2
        On  so.parent_obj = so2.id
Join    sys.schemas ss
        On  so2.uid = ss.schema_id
Where   t.name = 'NAME'
Eric J. Price
  • 2,740
  • 1
  • 15
  • 21
0

The first column is name, which appears to be the name of your trigger is 'NAME'

If you need to find where it is, use this query from here Need to list all triggers in SQL Server database with table name and table's schema

Community
  • 1
  • 1
Jason Carter
  • 915
  • 6
  • 15
0

You'll need to query sys.objects to see where the parent is.

This should find it for you:

select * from sys.objects where object_id = '2053582354'

The "OBJECT_OR_COLUMN" means the parent of the trigger is an object or column.

Dan
  • 537
  • 3
  • 10