Gonzo TechNet
SQL Maintenance tips & tricks
HowTo Switch/Swap/Cycle the SQL Server Error Log & SQL Server Agent error log

Each time you restart an MSSQL Server, the system automatically starts a new error log. The same is true of the SQL Server Agent. However, if your server is one of high availability, the restart occurances may be rare. Just as bad, is when you have a system that incurs lots of messages (login error, system/application errors, dozens of transaction log backups per day, etc., etc.) This means that the error log can grow to an enormouse size. The larger it gets, the longer and more difficult it is to open and review it. I've seen error logs that are 50mb and greater. Trying to open one of these monsterous error logs with EM or SSMS could take forever, and even become impossible due to timeouts. One easy way to avoid this problem is to "cycle" the error logs. This will close the current log and start a new one. For myself, I like to set up an SSA job that runs bi-week or monthly (depending on amount of activity) that does this automatically.

To cycle the SQL Server errorlog: (execute the following from a query window)
exec sp_cycle_errorlog; GO
To cycle the SQL Server Agent errorlog: (execute the following from a query window)
USE msdb; GO exec sp_cycle_agent_errorlog; GO
Home | TechNet | ADO.Net | DOS | ASP.NET | IIS | VB.NET | VIM (vi) | Windows | XHtml
MS-SQL | T-SQL | SSIS | Oracle