Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Triggers

Author  Topic 

sbuser
Starting Member

6 Posts

Posted - 2008-02-20 : 14:00:38
How do I find a trigger in my SQL databse?

jhocutt
Constraint Violating Yak Guru

385 Posts

Posted - 2008-02-20 : 14:10:38
select * from sysobjects where xtype = 'TR'



"God does not play dice" -- Albert Einstein
"Not only does God play dice, but he sometimes throws them where they cannot be seen."
-- Stephen Hawking
Go to Top of Page

sbuser
Starting Member

6 Posts

Posted - 2008-02-20 : 16:01:35
Thanks!
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-02-21 : 01:19:28
and to know the content use

EXEC sp_helptext 'trigger_name'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sbuser
Starting Member

6 Posts

Posted - 2008-02-22 : 17:16:53
Thanks - this is great!
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-02-23 : 12:07:49
You can also veiw them via Enterprise Manager (assuming 2000) via right clicking the Tables node uder the relevant db

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

sbuser
Starting Member

6 Posts

Posted - 2008-02-27 : 16:14:38
I can't seem to find how to do this from Enterprise Manager. I right-moused over right the Tables node under the relevant db and the only options I got were:

New table
all tasks
New window
refresh
help

Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-02-27 : 16:21:28
Only in 2005.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-02-27 : 16:30:12
quote:
Originally posted by sbuser

I can't seem to find how to do this from Enterprise Manager. I right-moused over right the Tables node under the relevant db and the only options I got were:

New table
all tasks
New window
refresh
help





Select a table and right-click, and then select Manage Triggers





CODO ERGO SUM
Go to Top of Page

sbuser
Starting Member

6 Posts

Posted - 2008-02-27 : 16:30:44
Thanks!

How do you update a trigger?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-02-27 : 16:40:37
Look at CREATE TRIGGER in SQL Server Books Online

CODO ERGO SUM
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-28 : 00:19:29
quote:
Originally posted by sbuser

Thanks!

How do you update a trigger?


use ALTER TRIGGER statement
Go to Top of Page
   

- Advertisement -