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 2000 Forums
 SQL Server Administration (2000)
 how to find a trigger affecting which table,fields,and what it the purpose of trigger

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-07-02 : 09:12:27
Mohanraj.P writes "How to find a trigger affecting which table, fields and what it the purpose and functionallty of trigger

by
mohan"

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-02 : 09:31:49
????? In Query Analyzer, you can go to the object browser, click on the table, then look at the trigger. There's an option to script it. Read the trigger. It should answer all your questions. Maybe you need to explain a little more about what you are trying to accomplish.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-07-02 : 11:45:01
I would look in the documentation myself....

Are triggers stored in syscomments?



Brett

8-)
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-07-02 : 13:31:32
Yes, and can be got at with:

sp_helptext 'MyTriggerName'

Kristen
Go to Top of Page

sa
Yak Posting Veteran

77 Posts

Posted - 2004-07-04 : 08:48:52
if you want to analyze a trigger assigned in particular table you have to open it and read the codes(transact sql statements). developers usually give meaningful names to their triggers usually it is somewhat related to its purpose. but for those paranoids you have to read lines of codes to know its purpose because they often use names which are peculiar
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-04 : 10:20:07
It really doesn't have anything to do with being paranoid, although most DBA's that have been doing this for more then 1 or 2 days are. Most places I've been, they name the triggers something like tr_table_ins for example. That's not too descriptive of what goes on in the trigger.

The only way to know what a trigger does is to look at it.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -