Featured Database Articles

Monitor Event Viewer on Multiple SQL Servers

In
the typical IT department, an un-avoidable task is to monitor the Event Log on
all of the servers. It is tedious to go through all the logs one by one, on a daily basis.
In this article, the methods presented will help in monitoring the Event Viewer
on many servers from a single place. In addition, I am going to discuss
three different ways to monitor Event Log on a list of servers and store the
output either in a .CSV file or on a database table. These methods fetch all of
those errors and warnings that occurred in the last 24 hours.

Method 1:

This method checks the
Event Log for Errors and Warnings on all of the servers listed in
the text file and create a .csv output file.

Let's say we have 3
servers and need to monitor the Event log on all of those servers.

Step1: Create a folder C:\EventLog and
create a text file c:\EventLog\Serverlist.txt with a list of server names.

Example:

SQL2K
ETL
YUKON

Step2: Copy and paste the code below
into c:\EventLog\monitoreventlogtocsv.vbs.