archiving error log

Posted on 2009-12-19
Last Modified: 2012-05-08
Do you find benefits in collecting the error logs in a table for future reference?

What are some good practises for using error log for watching the general health of the SQL Server on a daily basis.

Question by:anushahanna
    LVL 1

    Accepted Solution

    Hi to you,
                logs are very usefull to troubleshoot database errors. But be carefull with the size of those files. Logs grown fast when errors occured. I had a disk full on my c:\drive because of them Be sure to have a good sql script that clean them one in a while.

    LVL 6

    Author Comment

    do you filter and store error logs by event ids, to minimize space? can you please share some examples of scripts that help you in a daily basis, by storing the logs this way?
    LVL 5

    Assisted Solution

    Archiving SQL logs are useful for many reasons; some of them are:
    -Troubleshoot server/database errors and issues;
    -Tracking errors and build some KPIs
    -To be Sarbanes Oxleys(SOX) compliant, you MUST archive your error logs; In case of audit (internal/external) you'll be safe, because SOX demands everything to be logged according to your business.

    To manage the size of your log file, this tip will be helpful:

    Here below is a stored procedure to help you archive your error log, in that way you automate everything once, and further concentrate on others issues:

    Hope this is what you were looking for...


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
    Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video discusses moving either the default database or any database to a new volume.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now