错误监控通知系统 [英] Error Monitoring Notification system

查看:104
本文介绍了错误监控通知系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Friends



我不知道在SQL部分的语言部分我应该在哪个部分提出这个问题。问题是我的系统有一个表,我的系统记录成功结果以及错误的结果。现在,当我的系统在表中连续发现10个错误结果时我想要的是,系统应该向我发送一个关于此的邮件通知。



提前谢谢

解决方案

对于这样的事情,我建议编写Windows服务或Windows命令行实用程序。如果您提供服务,则使用计时器启动,但通常要检查计数。如果您使用实用程序,那么您可以使用Windows Scheduler安排它。



我个人不喜欢使用Sql发送电子邮件,尽管它可以。我喜欢在C#代码中使用那个逻辑,这就是为什么你应该做一个服务或windows应用程序。



或者,你可以看一下写入记录的过程是什么该表并将逻辑放在那里。



或者,您可以使用触发器并将其全部保存在sql中并使用Sql的电子邮件功能但我建议不要使用

Hello Friends

I don't know in which section I should ask this question, at language part of SQL part. The problem is my system has a table in which my system logs success result as well false result. Now what I want when my system found 10 error result continuously in table, system should send a mail notification to me about this.

Thanks in advance

解决方案

For something like this I would recommend writing either a Windows Service or a Windows Command Line utility. If you do a service, then use a timer to fire off however often you want to check the count. If you use a Utility, then you can schedule it using Windows Scheduler.

Personally I don't like using Sql to send emails, although it can. I like having that logic be outside in C# code which is why you should do a service or windows app.

Or, you could look at what process is writing records to that table and put the logic there.

Or, you could use a trigger and keep it all in sql and using the email feature of Sql but I would recommend against that.


这篇关于错误监控通知系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆