Quantcast
Viewing all articles
Browse latest Browse all 15889

How to check the size of SQL Error Log

The task is to check if the SQL error log and SQL agent error log size reach x MB, then cycle the logs. This is done programmatically and automatically, not using SSMS or other manual methods.

I know how to create a job to cycle SQL error logs using T-SQL, but could not find anything on the internet or SQL books about querying the file size of the error log. There are system stored procedures for checking database and transaction log sizes, but not SQL error logs or SQL Agent error logs. Related posts mentioned about increasing the number of error logs, but still nothing abouthow to check the size of the error.

Please help!

Thanks!


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>