Solved

Trigger vanished from enterprise studio but still running in background

Posted on 2008-06-19
8
252 Views
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'
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?
0
Comment
Question by:jodman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 143

Assisted Solution

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

Expert Comment

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

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

Author Comment

by:jodman
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.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 60

Assisted Solution

by:chapmandew
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'
0
 

Author Comment

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

Assisted Solution

by:chapmandew
chapmandew earned 40 total points
ID: 21823172
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
 

Accepted Solution

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

Author Comment

by:jodman
ID: 22168296
thanks
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

726 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