Trigger vanished from enterprise studio but still running in background

I recently created a trigger to pull some information from one table into another once certain fields were updated.

Once i was happy that it was working fine i left it alone and it has been working since without any problems.

I now need to modify the code slightly but i cannot find it through management studio; i have even tried running the following SQL on the server and it is not being found.

select object_name(id), object_name(deltrig),
object_name(instrig), object_name(updtrig)
from sysobjects
where xtype ='U'
and
(deltrig > 0 or instrig > 0 or updtrig > 0)

The wierd thing is that it is obviously still running because records are benig added to the table when updates take place.

Does anyone have any ideas what may be causing this?
jodmanAsked:
Who is Participating?
 
jodmanConnect With a Mentor Author Commented:
I never managed to work out what happened here guys; thanks for your help anyway.
0
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
>where xtype ='U'
only shows tables...
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
ooops, sorry :)

you must be looking in the wrong database (with the query you mention) ...
0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
jodmanAuthor Commented:
No i am definately looking in the right database and on the right server; at first i simply assumed that the trigger had been deleted and so began re-creating it but it is definately still working in the background.
0
 
chapmandewConnect With a Mentor Commented:
SEe if this returns anything:


select object_name(parent_id), * From sys.triggers
where object_name(parent_id) = 'yourtablename'
0
 
jodmanAuthor Commented:
Thanks for your suggestion but this still does not return details of the trigger.
0
 
chapmandewConnect With a Mentor Commented:
Then it probably doesn't exist....try one more thing:

use yourdatabasename
go

select object_id('triggername','tr')

does this return a numeric value?
0
 
jodmanAuthor Commented:
thanks
0
All Courses

From novice to tech pro — start learning today.