SQL Server 2008 - Worth the Wait
In the first article in the series, I explained the setup of a report that ensures that backups are happening as per the backup policy. In this article, I will explain how to monitor SQL Server errorlog, leveraging the capabilities of DTS. Just in case you have not read the first article, in this series, I am covering how to monitor three elements of Microsoft SQL Server:
It is important for any DBA to know if there are any errors in errorlog. Timely knowledge of errors can prevent major problems. DTS is used to bring the information from all the servers to one place so you can run queries against that data, and take action based on the results.
You can read the SQL Server errorlog by issuing the extended stored procedure — "xp_readerrorlog". The process uses a DTS package to consolidate the output of xp_readerrorlog from all the SQL Servers to a central server. It then runs the queries against the central repository to check for strings like "error" or "fail." If you want, you can include "1105" or "9002," which are the error numbers for a data file that is full or a log file that is full.
These are four parts of the reporting process:
In this case the central repository server is "SQLSRVCNTREP" and the database with central repository is "dbamaint." The query may need to be changed for 6.5 version servers. For this setup you need to create a "dbamaint" database on all the servers that need to be monitored. Create three tables on each server to hold errorlogs.
The script running the DTS package and other sqls to monitor can be scheduled in NT Scheduler on your central repository or monitoring server. The multiple steps taken to set up the errorlog monitoring are given below: