Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Check W2K Event log and send results to DBA

By gregtm,

This is a simple Script that checks the W2K event log of choice and emails the results to the DBA. This script also uses the find command so you can search for strings in your event logs. It creats two scripts, the first script sp_EventlogSys runs xp_sendmail which executes the second procedure sp_EventlogSysquery and attaches the results to a text file to be mailed to the DBA. This script has been setup to find all ERROR messages in the System event log. Just schedule the sp_eventlogsys to run every n hrs, n week and you'll have only the error messages sent by email.
Cheers
Greg

Total article views: 806 | Views in the last 30 days: 4
 
Related Articles
FORUM

Find the file size of Windows logs(Event,security & system) Using TSQL script.

Find the file size of Windows logs(Event,security & system) Using TSQL script.

FORUM

SSIS logging, Event Handler, and OnVariableValueChanged

Using a scripting task in the event handler to log a variable value

FORUM

Simple Event driven subscriptions in SSRS

A quick script doc on how to create puesdo event driven subscriptions in ssrs

BLOG

Storing Event Data

Among the several core concepts of Extended Events is the concept of storing event payloads / data. ...

FORUM

event viewer

event viewer

 
Contribute