-1

I read a recommendation for setting up a job to run EXEC sp_cycle_errorlog to recycle the SQL Server error log, so that it stops getting so large.

Do I need to set up this job for all of the databases on an instance, or will setting this up for the SQL Server instance do the trick and keep the error log from getting large?

0
1

You only need to set this up at the instance level, because the error log is not specific to any databases on an instance.

However, if you have many SQL Server instances in your environment, you would have to set it up on each server independently.

When you create the T-SQL step in the SQL Agent, if you see a dropdown list of the databases on your instance, just make sure master is selected, to make sure it runs on the entire instance.

3
  • thanks for your answer. I would like to set it up for the instance but when setting up the scheduled job you have no choice but to select a DB...you can't select the instance in the drop down....all you see are databases – Neville Feb 11 '18 at 22:56
  • so I just doubled checked I agree this log should be setup for the instance level, but if you go through the steps for scheduling this as a reoccurring job they give you no option to select the instance just DB names. – Neville Feb 11 '18 at 23:04
  • Perhaps you're seeing the list of databases in the dropdown for the job step, but you only need to make sure master is selected, and then it will run for the entire instance. – Randolph West Feb 12 '18 at 0:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.