SQL Server stored procedures generate and send HTML monitoring reports

Source: Internet
Author: User
Background

Scheduled tasks are processed in the early hours of the day, which can take up to 6-7 hours of normal time. It is a deadline to ensure that all data is processed before 9 o'clock every day. If not completed, the day of operation to indicate an accident, affecting the customer.
In the early days, if a database data processing failure, will send an alarm message, when the alarm mail more up, from the mail to confirm which database processing failure, is undoubtedly a difficult thing.
By writing stored procedures, all of the DB data processing is monitored, and a daily report is sent in HTML format so that the data processing status can be quickly and accurately known.

Final effect
  • is a list of database servers, one database server can create multiple databases, and each profile is a db.

Implementation method

  • The results in the table, dependent on a table in the operations database, ProcessDurationReport This table of records is the process of processing each database, the processing of time-consuming situation is written, we then through the SQL to calculate the table information, the final stitching into an HTML page, via SQL Server mail Service sent out.

  • Table structure is as follows

  • The related stored procedures are as follows

  • Related Stored Procedure links
Written in the last

The implementation of this feature means simplifying operations, and each day you can view the report to determine the status of the data processing.
can also continue to improve on this basis, into a small web site, real-time to show the status of processing.
You can also add other features to show the history of data processing status.

SQL Server stored procedures generate and send HTML monitoring reports

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.