I have a few databases in which the frontend application manages certain maintenance tasks. In this particular instance, I'm running the INDEX OPTIMIZE job every night and every so often it clashes with the application and fails.

The following is the error that I receive:

Msg 50000, Level 16, State 1, Server MyTestServer01, Procedure CommandExecute, Line 152
Msg 2550, The index "clidx_StatisticalInterface_dPollTime" (partition 1) on table "StatisticalInterface" cannot be reorganized because it is being reorganized by another process.

I know that there are times where the vendor would rather their builtin solution manage the maintenance. I'm sure I could find that feature in the application and turn it off, but this question is in case that I can not.

How would I configure or edit this job to ignore a specific database or a list of databases in the same instance?


Sure can. In the job, you'll see @Databases='USER_DATABASES'. Just switch it to @Databases='USER_DATABASES,-Db1' any that you don't need to be optimized, place a '-' in front of.

enter image description here

Take a look at the parameters list listed on his website:


  • Nice and simple, thank you for that, Kris! It is the end of my working day and my patience got the best of me and I missed your neon sign :( – Sean Perkins Sep 5 '17 at 20:22
  • HA! No worries. Don't thank me, thank Ola! – Kris Gruttemeyer Sep 5 '17 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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