Author |
Topic |
techno_mono
Starting Member
6 Posts |
Posted - 2008-12-18 : 15:40:29
|
Hi, i´m working on sql server 2005, monitoring a data base. I have the following task: to create an alarm system by mail, of events like process that take more than 3 seg and the sql server profiler detects.I´m saving the monitoring data in a table of the data base. I also have a trigger that sends the email.The issue ocurrs when the trace starts, and it seems that all the triggers are deleted, all that are related to the table where i save the data of the trace. If I create the trigger while the trace is working, it stops and sends an error.what do you recommend to do? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
techno_mono
Starting Member
6 Posts |
Posted - 2008-12-19 : 08:25:39
|
quote: Originally posted by tkizer I don't understand your issue. You should be using a server-side trace for this rather than SQL Profiler. What error are you getting? What is causing the triggers to be deleted?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
The problem:I have 2 database engine connections:The first,is a remote connection to a server The second is a localhost connection. In the localhost connection I keep the result of monitoring traces of the remote server . I keep this results in a table named t_traces.My task is create an alarm system by mail of events registered in the table t_traces. For this task, I have a trigger, in table t_traces, that sends the email with the alert, when a new row is inserted. But this doesn´t work because when I run the trace, it seems to be deleted the table t_traces and create it again but I lost the trigger of the table t_traces.I don't know what to do...I need an alternative for resolve this task. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
techno_mono
Starting Member
6 Posts |
Posted - 2008-12-22 : 12:44:17
|
Thanks for your answer tkizer.Your method have a problem for my task, how I can read only new records of the table automatically??? |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
techno_mono
Starting Member
6 Posts |
Posted - 2008-12-22 : 13:13:10
|
tkizer, If I save the result of my trace in my_table.trc (for example). I need to create a script to read the new records of my_table.trc like a trigger doI don't know how I can do this possible |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
techno_mono
Starting Member
6 Posts |
Posted - 2008-12-22 : 13:58:49
|
Thanks |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|