automatically check sql and windows error logs

  • I want to automatically check the windows log and the sql server log for a number of specific errors.

    Is there a way i can automate this in a sql script?

  • sp_readerrorlog can help you reading the SQL Server log.

    More info here.

    For what the Windows logs is concerned, you should probably narrow down the scope of the question. Which logs do you want to read?

    -- Gianluca Sartori

  • Gianluca Sartori (8/5/2011)


    sp_readerrorlog can help you reading the SQL Server log.

    More info here.

    For what the Windows logs is concerned, you should probably narrow down the scope of the question. Which logs do you want to read?

    Thanks for that.

    In relation to the windows logs and what i want to monitor for, i honestly dont know. Company i am currently with had a process where they checked database and windows logs for any errors that may warrant investigation, and mailed the list each day to admins.

    When the last dba left though it seems he either deleted the script to check the windows logs, or someone else deleted it, so i cannot see what it was monitoring for.

    The company want this fixed, so thats my current job, to reverse engineer a process thats missing all its scripts, and that nobody has any specific requirements for!

    Chances are it was searching for anything with SQL in the description. thats my starting point anyway.

  • This might help:

    http://gallery.technet.microsoft.com/scriptcenter/ed188912-1a20-4be9-ae4f-8ac46cf2aae4

    MCITP SQL 2005, MCSA SQL 2012

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply