Solved

Trigger vanished from enterprise studio but still running in background

Posted on 2008-06-19
8
241 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
  • 4
  • 2
  • 2
8 Comments
 
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...
0
 
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) ...
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
 
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

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.

Join & Write a Comment

Suggested Solutions

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now