Minion CheckDB allows you to define a rotation scenario for your operations. For example, a nightly round of 10 databases would perform integrity checks on 10 databases the first night, another 10 databases the second night, and so on. You can choose to set up a CheckDB rotation for databases, CheckTable rotation for tables, or a combination of both.

You can also use the rotational scheduling to limit operations by time; for example, you could configure MC to cycle through DBCC CheckDB operations for 90 minutes each night.

The table Minion.CheckDBSettingsRotation holds the rotation scenario for your operations (e.g., “run CheckDB on 10 databases every night; the next night, process the next 10; and so on”). This table applies to both CheckDB and CheckTable operations.

For more information, see “How to: Configure Rotational Scheduling”.

Example 1: DBCount rotation

Let’s say we enable one of the default settings in Minion.CheckDBSettingsRotation, so we have a rotational schedule of 10 databases per run:

IDDBNameOpNameRotationLimiterRotationLimiterMetricRotationMetricValue
1MinionDefaultCHECKDBDBCountcount10


Note: not all columns are shown here.


To enable this row, run: 

UPDATE Minion.CheckDBSettingsRotation

SET IsActive = 1

WHERE ID = 1;


If our Minion CheckDB schedule is set to run CheckDB nightly, and we have 13 databases (DB1 through DB13), then:

  • The first night would perform CheckDB on 10 databases: DB1 through DB10.
  • The second night would include DB11, DB12, DB13, and DB1 through DB7.
  • The third night would include DB8 through DB13, and DB1 through DB4.
  • And, so on.

Example 2: Time rotation

DBNameOpNameRotationLimiterRotationLimiterMetricRotationMetricValue
MinionDefaultCHECKDBTimeMins60

Note that not all columns are shown here.

If our Minion CheckDB schedule is set to run CheckDB nightly, and we have 13 databases (DB1 through DB13), then it might go like this:

  • The first night, MC estimates that it can perform CheckDB on 4 databases in 60 minutes: DB1 through DB4.
  • The second night, MC estimates that it can process the next 5 databases in 60 minutes: DB5 through DB9.
  • The third night, MC estimates it can process 3 databases: DB10 through DB12.
  • The fourth night, MC estimates it can process 5 databases: DB13 and DB1 through DB4.
  • And, so on.

Rotational Scheduling Internals

The procedure Minion.CheckDBRotationLimiter (internal use only) sets up the list of objects that should run in the current batch. Here’s how:

  1. What’s been processed: The SP pulls the list of objects that ran in the last batch from the Minion.CheckDBLogDetails table, and inserts that list to the Minion.CheckDBRotationDBs table. Now, the procedure knows which objects have been processed.
  2. Keep the latest run: The SP then deletes all but the latest ExecutionDateTime for each object from the Minion.CheckDBRotationDBs table. It only keeps the latest run because it's tracking the last time an object was processed.
  3. Remove processed objects: After that, the stored procedure deletes any objects from the work table Minion.CheckDBThreadQueue that exist in the Minion.CheckDBRotationDBs table. This means that objects which have already been processed for this period won't be included in the current run.
  4. Limit the list: Finally, it deletes any objects from Minion.CheckDBThreadQueue that are over the metric value. For example, if you're only going to run 10 databases per run, this will only keep the first 10 databases in the list.