Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write an Alert

Status
Not open for further replies.

asociate

Programmer
Apr 14, 2002
17
0
0
IN
hi,
Iam Using SQl Server 7.0
I want to create an alert which should trigger when a field in a database is updated.This alert should run a script which should update a table with the follwing details like hostname(the computer/client which updated the field) ,time and date. IS it possible to create such an alert?. if so can any one explain me how it can be done.
thank you.
 
Hey someone shoot me if I'm wrong, but I'm not sure this has anything to do with alerts. Alerts are usually error generated, and since what you're describing is not necessarily an error, I can't see why you would want an alert.

What you could use is a trigger on the table which will activate on INSERT. If you have a look at books online for the syntax of creating triggers, this should solve your problem I believe. The trigger can run the required script which inserts hostname, date etc.
 
Thanks for ur response . i will search for the syntax for creating the triggers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top