Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favourite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved 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: 799 | 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

FORUM

event viewer

event viewer

BLOG

Export SQL Server Error Messages from Event Viewer As HTML

i use the following powershell script to retrive all sql server error logs from event viewer and exp...

 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones