Trigger vanished from enterprise studio but still running in background

Posted on 2008-06-19
Last Modified: 2011-09-20
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'
(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?
Question by:jodman
  • 4
  • 2
  • 2
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 20 total points
ID: 21822671
>where xtype ='U'
only shows tables...
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21822675
ooops, sorry :)

you must be looking in the wrong database (with the query you mention) ...

Author Comment

ID: 21822730
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.
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

LVL 60

Assisted Solution

chapmandew earned 40 total points
ID: 21823070
SEe if this returns anything:

select object_name(parent_id), * From sys.triggers
where object_name(parent_id) = 'yourtablename'

Author Comment

ID: 21823126
Thanks for your suggestion but this still does not return details of the trigger.
LVL 60

Assisted Solution

chapmandew earned 40 total points
ID: 21823172
Then it probably doesn't exist....try one more thing:

use yourdatabasename

select object_id('triggername','tr')

does this return a numeric value?

Accepted Solution

jodman earned 0 total points
ID: 22168283
I never managed to work out what happened here guys; thanks for your help anyway.

Author Comment

ID: 22168296

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to SUM hours for the same record 1 38
Where clause in stored procedure 8 56
T-SQL to Update Table Dynamically 2 48
configure service broker on all databases 2 81
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In a recent question ( here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question