• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 360
  • Last Modified:

SQL 7 triggers

Triggers....what are they?  Where are they stored?  How can I see them in Enterprise Manager?

How can I look to see what 'triggers' are attached to a specific table, or field??
0
DataLoser
Asked:
DataLoser
  • 8
  • 2
  • 2
2 Solutions
 
DataLoserAuthor Commented:
this is MSSQL 7.0 !!
0
 
Kevin3NFCommented:
Simply put, a trigger is a TSQL statement that fires in repsonse to an insert, update or delete on a table (not a field).  In Enterprise Manager, right-click the table, all tasks, manage triggers.  This is accurate for SQL 2000, but I think it was pretty similar in SQL 7.  I have no idea where they are stored....
0
 
Scott PletcherSenior DBACommented:
>> what are they? <<
As explained by Kevin3NF above, except that "TSQL statement" should be "TSQL statement(s)"; most triggers are more than one statement.


>> Where are they stored? <<
In the system tables; specifically, sysobjects (trigger name only) and syscomments (text of trigger).


>> How can I see them in Enterprise Manager? <<
I assume as noted by Kevin3NF, but I don't use EM for triggers, so cannot confirm.


>> How can I look to see what 'triggers' are attached to a specific table <<
EXEC sp_helpTrigger 'tableName'
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Scott PletcherSenior DBACommented:
Similarly, in Query Analyzer, you can get the text of a specific trigger by using:

EXEC sp_helptext 'triggerName'
0
 
DataLoserAuthor Commented:

....ok, I'm an idiot.  I found this fantastic little utility called "SQL Print" that would print out each table in my SQL 7.0 database and list all triggers/code connected with table.  Trying to duplicate this same thing in SQL 7.0, but no luck.  Maybe that is the value of the utility.  May have to buy it.
0
 
DataLoserAuthor Commented:

Does anyboy know SQL 7.0 and know of any "built in" features for printing out the scheme of the database??  Ya'know, like a good map of the whole structure?
0
 
Kevin3NFCommented:
I believe database diagrams are available built-in....that will help for the tables.  You can generate scripts foralmost any object....,.

Did your original question about triggers get answered sufficiently?
0
 
DataLoserAuthor Commented:
...you bet.  Scott, thanks for beefing up the quicky answer and giving some a thoughtful, detailed assist.  You must do some teaching.

:)
0
 
DataLoserAuthor Commented:

:)
0
 
DataLoserAuthor Commented:
Kevin,
     When you answered only ONE of the question, aside from the other you answered incorrectly..........THEN blew through my last question with haste and said ""Did your original question about triggers get answered sufficiently?""......which means "even though I do poor work.......give me my points quickly".........WELL it just cracked us all up.
     I'm not trying to convince you to help me in the future......frankly, I can't waste too much time with young guys shedding tears at the slightest 'chain tug'......BUT, I am going to apologize, because I realize us fellas are in our upper 30's and have a more mature sense of humor.  Now I realize you are too young for a manly adult 'ball busting' and I am sorry we offended you.

      Really though, please don't take things so seriously.  I have learned a lot about taking a joke and taking criticism.  You may not value me, or my humor........but don't get in the habit of burning bridges.  Someday you may need to cross an old one.

     Scott, thanks again and I apologize for the extra verbage in the thread and apologize if I offended you also.

     CHeers!!   :)

0
 
DataLoserAuthor Commented:

Thanks Lunchy.   :)
0
 
DataLoserAuthor Commented:

Kevin3NF........my apologies.  I was totally out of line and my comments were uncalled for.  In my small mind and big heart, I meant the comments as a comical jab, but that is no excuse.

I would fully expect you not to post in my threads again and also expect it will be my loss.  

Again, I was un-professional and rude and hope you accept my public apology.

Sincerely,
DataLoser
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 8
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now