archiving error log

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.

Who is Participating?
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.

anushahannaAuthor Commented:
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?
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...

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.