x

How to know what are the tables have triggers from database?

How to know what are the tables have triggers from database?
more ▼

asked Dec 04, 2011 at 06:23 AM in Default

Naren gravatar image

Naren
27 17 18 19

(comments are locked)
10|1200 characters needed characters left

2 answers: sort oldest

You'll need to look in either sys.objects where type = 'TR' and get the parent_object_id

or [sys.triggers][2] and get the parent_id

[2]: http://msdn.microsoft.com/en-us/library/ms188746(v=SQL.90).aspx
more ▼

answered Dec 04, 2011 at 10:39 AM

Kev Riley gravatar image

Kev Riley ♦♦
53k 47 49 76

(comments are locked)
10|1200 characters needed characters left
you can find the trigger details in sys.triggers . to determining dependencies for a specific trigger check sys.sql_expression_dependencies system catalog
more ▼

answered Dec 04, 2011 at 10:40 AM

salum gravatar image

salum
213 1

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1948
x120
x84

asked: Dec 04, 2011 at 06:23 AM

Seen: 872 times

Last Updated: Dec 04, 2011 at 11:53 AM