?
Solved

SQL 7 triggers

Posted on 2005-03-03
13
Medium Priority
?
359 Views
Last Modified: 2010-07-27
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
Comment
Question by:DataLoser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 2
  • 2
13 Comments
 
LVL 1

Author Comment

by:DataLoser
ID: 13449287
this is MSSQL 7.0 !!
0
 
LVL 21

Accepted Solution

by:
Kevin3NF earned 200 total points
ID: 13449363
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
 
LVL 69

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 1200 total points
ID: 13450850
>> 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 13450862
Similarly, in Query Analyzer, you can get the text of a specific trigger by using:

EXEC sp_helptext 'triggerName'
0
 
LVL 1

Author Comment

by:DataLoser
ID: 13455228

....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
 
LVL 1

Author Comment

by:DataLoser
ID: 13455238

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
 
LVL 21

Expert Comment

by:Kevin3NF
ID: 13455663
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
 
LVL 1

Author Comment

by:DataLoser
ID: 13458527
...you bet.  Scott, thanks for beefing up the quicky answer and giving some a thoughtful, detailed assist.  You must do some teaching.

:)
0
 
LVL 1

Author Comment

by:DataLoser
ID: 13463178

:)
0
 
LVL 1

Author Comment

by:DataLoser
ID: 13466146
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
 
LVL 1

Author Comment

by:DataLoser
ID: 13467621

Thanks Lunchy.   :)
0
 
LVL 1

Author Comment

by:DataLoser
ID: 13468035

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question