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
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Trigger documentation

Author  Topic 

collinsca
Starting Member

23 Posts

Posted - 2007-06-28 : 05:34:52
I am documenting a database.

When I view dependencies on a table I can see a view- so I go to views and copy the information.
But when there is a trigger as a dependency- I cannot find where to go to view it.

Are triggers within stored procedures somewhere? Or do they have their own separate place somewhere?

As you can see- I don’t know much about SQL…

Thanks

Carat
Yak Posting Veteran

92 Posts

Posted - 2007-06-28 : 06:20:10
Information about triggers is stored in sys.triggers.

You can join this view with sys.sql_dependencies and sys.objects to see more information.
Go to Top of Page

collinsca
Starting Member

23 Posts

Posted - 2007-06-28 : 06:38:48
Carat

Thanks for replying.

Where is sys.triggers? I am in the db, and i can see:
database diagrams
tables
views
programmability
service broker
storage
security

Where abouts are they?

Not sure what you mean by the second statement..
Go to Top of Page

Carat
Yak Posting Veteran

92 Posts

Posted - 2007-06-28 : 12:07:19
These are Object Catalog Views like sys.views, sys.indexes, sys.foreign_keys ...

Just use this simple query to retreive information about all the triggers in your database "SELECT * FROM sys.triggers".
You can than join this view with sys.sql_dependencies to see on which table the trigger was created.
Go to Top of Page
   

- Advertisement -