Reputation: 69
Today i realize on my Sql Server 2008 disk space is full. When i check disk usage, i see sql agent logs as belown picture. How to clean these log files ? I searched somebody says that delete phsically from disk but somebody says dont delete physically. I confused. Should i delete physicaly from disk or any other way for delete log files? Am i need to close server agent when the progressing of this cleaning task?
Thanks,
Upvotes: 2
Views: 122
Reputation: 4014
I would create a SQL agent job that runs daily to roll the active error log file over. If you have need for more than a weeks worth of errors, you can set it to run weekly instead.
exec sp_cycle_errorlog
Upvotes: 1
Reputation: 66
The best way is to create maintenance plan for log history cleanup and schedule it at a suitable frequency.
Upvotes: 1