[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

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.

2 Solutions
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...


Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Tackle projects and never again get stuck behind a technical roadblock.
Join Now