Monitor remote server disk space and send mail alerts through SSIS

Source: Internet
Author: User
Tags ssdt ssis

This article directly refers to the blog Park software Life of the article operation, written here only to make a record.

To the company side of the first two report server received. To prevent downtime, deploy an SSIS package with disk warnings.

Step 1 establishes two variables to receive and write disk capacity

Step 2 Create WMI and SMTP connection managers

Step 3 Drag a WMI Data Reader Task and configure it

Note that almost every option has to be changed

SELECT  from where DriveType=3 and DeviceID='C:'

Step 4 Drag a script Task and configure it

LongGb= 1024x768 * 1024x768 * 1024x768; //Todo:ADDyour code here dts.variables["Diskresults"]. Value= Double. Parse (dts.variables["Diskusageresults"]. Value.tostring ())/GB; Dts.taskresult=(int) scriptresults.success;

(Note, I clicked Edit script when the error, it should be installed before the new version of SSDT deleted, in the old SSDT will be a problem.) Erase the original VS-related stuff and reinstall SSDT.)

Constraint restrictions:

Finally, set up SMTP.

Problem

SQL Agent default startup account NT service\sqlserveragent cross-service access WMI prompt failed, and I tried to add this account to the management group. Then we found a local account to start the SQL Agent. Look at the data as if WMI only recognized the local account. Please explain the situation to other small partners.

Reference documents

Summary WMI-related knowledge

Http://blog.chinaunix.net/uid-7672958-id-2599044.html

Could not load file or assembly ' Microsoft.VisualStudio.Tools.Applications.Core '

http://pietervanhove.azurewebsites.net/?p=461

Wql-wmi Event Watcher Task-access Denied

https://social.technet.microsoft.com/Forums/sqlserver/en-US/fe033702-d1e9-4276-a2a4-99a7ae61c722/ Wql-wmi-event-watcher-task-access-denied?forum=sqlintegrationservices

Monitor remote server disk space and send mail alerts through SSIS

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.