Minion.CheckDBSettingsDB contains the essential CheckDB settings for databases, including process order, history retention, pre-and postcode, native settings, and more. Minion.CheckDBSettingsDB is installed with default settings already in place, via the system-wide default rows (identified by DBName = “MinionDefault”). If you do not need to fine tune your integrity checks at all, no action is required, and all operations will use these default configurations. IMPORTANT: Do not delete the MinionDefault rows! For more information on DBCC CheckDB options, see the MSDN article on DBCC CHECKDB (https://msdn.microsoft.com/en-us/library/ms176064.aspx). IMPORTANT: Remote restores apply only to CheckDB operations, not CheckTable.
Name | Type | Description |
---|---|---|
ID | Int |
Primary key row identifier. |
DBName | nvarchar |
Database name. |
Port | int |
Port number for the instance. If this is NULL, we assume the port number is 1433.
Minion CheckDB includes the port number because certain operations that are shelled out to sqlcmd require it. |
OpLevel | varchar |
The level of object that the operation applies to.
Note: This is not currently in use, but we recommend setting all OpLevel values to ‘DB’ for future functionality.
Valid values: DB |
OpName | Varchar |
The name of the operation (usually, as passed into Minion.CheckDBMaster).
Note: Each level of settings (that is, the default level, and each database level) should have one row for CHECKTABLE and one row for CHECKDB. For more information, see “Configuration Settings Hierarchy”.
Note that AUTO is a valid value for the Minion.CheckDBMaster @OpName parameter, but it is NOT valid as a setting in this table (which defines settings for specific operations).
Valid values: CHECKTABLE CHECKDB CHECKALLOC |
Exclude | Bit |
Exclude database from operations.
For more on this topic, see “How To: Exclude databases from operations” and “Include and Exclude Precedence”. |
GroupOrder | int |
The operation order within a group. Used solely for determining the order in which databases should be processed.
By default, all databases and tables have a value of 0, which means they’ll be processed in the order they’re queried from sysobjects.
Higher numbers have a greater “weight” (they have a higher priority), and will be processed earlier than lower numbers. We recommend leaving some space between assigned order numbers (e.g., 10, 20, 30) so there is room to move or insert rows in the ordering.
For more information, see “How To: Process databases in a specific order”. |
GroupDBOrder | int |
Group to which this database belongs. Used solely for determining the order in which databases should be processed.
By default, all databases have a value of 0, which means they’ll be processed in the order they’re queried from sysobjects.
Higher numbers have a greater “weight” (they have a higher priority), and will be processed earlier than lower numbers. The range of GroupDBOrder weight numbers is 0-255.
For more information, see “How To: Process databases in a specific order”. |
NoIndex | bit |
Enable NOINDEX.
For more information, see the DBCC CheckDB article on MSDN: https://msdn.microsoft.com/en-us/library/ms176064.aspx |
RepairOption | varchar |
The repair option to use.
This field is not yet in use.
Future valid values may include: NULL NONE REPAIR_ALLOW_DATA_LOSS REPAIR_FAST REPAIR_REBUILD
For more information, see the DBCC CheckDB article on MSDN: https://msdn.microsoft.com/en-us/library/ms176064.aspx |
RepairOptionAgree | bit |
Signifies that you agree to the repair option specified in the RepairOption column. This is in place because some repair options (i.e., “REPAIR_ALLOW_DATA_LOSS”) can cause you to lose data.
This field is not yet in use.
For more information, see the DBCC CheckDB article on MSDN: https://msdn.microsoft.com/en-us/library/ms176064.aspx |
WithRollback | varchar |
This field is not yet in use. |
AllErrorMsgs | bit |
Enables or disables the ALL_ERRORMESSAGES option, which displays all reported errors per object. This is on by default.
For more information, see the DBCC CheckDB article on MSDN: https://msdn.microsoft.com/en-us/library/ms176064.aspx |
ExtendedLogicalChecks | bit |
Enables or disables the EXTENDED_LOGICAL_CHECKS option, which performs logical consistency checks where appropriate.
For more information, see the DBCC CheckDB article on MSDN: https://msdn.microsoft.com/en-us/library/ms176064.aspx |
NoInfoMsgs | bit |
Enables or disables the NO_INFOMSGS option, which supresses informational messages.
For more information, see the DBCC CheckDB article on MSDN: https://msdn.microsoft.com/en-us/library/ms176064.aspx |
IsTabLock | Bit |
DBCC CheckDB option -tablock. Causes DBCC CHECKDB to obtain locks instead of using an internal database snapshot.
IMPORTANT: We do not recommend using tablock on production systems! |
IntegrityCheckLevel | varchar |
DBCC CheckDB option. This controls whether or not you include physical only, data purity, or neither.
Valid values: NULL PHYSICAL_ONLY DATA_PURITY |
DisableDOP | bit |
Enable or disable the trace flag that allows CheckDB to run with a degree of parallelism. Allows you to use or not use multithreading.
IMPORTANT: DisableDOP = 1 will disable multithreading – i.e., processing multiple databases at the same time – in Minion CheckDB!
For more information, see “About: Multithreading operations”. |
IsRemote | bit |
Enable or disable remote integrity checks.
Note: Remote operations only apply to DBCC CheckDB. MC does not support remote CheckTable.
IMPORTANT: IsRemote = 1 turns on remote CheckDB for all databases (that the given row applies to). If you wish to handle remote operations dynamically, based on database size, set IsRemote = 0 and configure remote thresholds.
Performing remote integrity checks requires additional setup. See “Minion.CheckDBSettingsRemoteThresholds” and “How to: Set up CheckDB on a Remote Server”. |
PreferredServer | varchar |
The server on which you would like to perform remote CheckDB operations.
Note: This field does not accept Inline Tokens.
Valid inputs: NULL {specific server or server\instance name}
For more information, see “How to: Set up CheckDB on a Remote Server”. |
PreferredServerPort | int |
The port of the server on which you would like to perform remote CheckDB operations.
If this value is NULL, the port is assumed to be 1433.
Valid values: NULL {specific port} |
PreferredDBName | varchar |
The database you want to run remote checks against on the remote server. This field is ignored if you’re running operations locally.
Note: Remote operations only apply to DBCC CheckDB. MC does not support remote CheckTable.
This field accepts Inline Tokens and LIKE expressions.
Valid values: NULL {specific database name}
For more information, see “About: Remote CheckDB” and “How to: Set up CheckDB on a Remote Server”. |
RemoteJobName | varchar |
The name of the temporary CheckDB job on the remote server.
If the RemoteCheckDBMode is “Connected”, this can be NULL. Otherwise, RemoteJobName must be populated.
This field accepts Inline Tokens.
Valid values: NULL {job name}
For more information, see “About: Remote CheckDB” and “How to: Set up CheckDB on a Remote Server”. |
RemoteCheckDBMode | varchar |
The mode of the remote CheckDB operation, if any.
NULL means that remote CheckDB is not in use for this entry. Connected mode runs CheckDB from the local server against the remote server (very like running it against a remote server from SQL Server Management Studio). Disconnected mode creates a setup so that CheckDB runs entirely on the remote server. All objects are created on the remote server, and the remote server runs operations independently and reports back.
Note: Connected mode has fewer moving parts; but Disconnected mode has higher tolerance for things like network fluctuations.
Valid values: Connected Disconnected
For more information, see “About: Remote CheckDB” and “How to: Set up CheckDB on a Remote Server”. |
RemoteRestoreMode | varchar |
The method by which MC will restore a backup to the remote server, for remote integrity check operations.
Note: Remote restores apply only to CheckDB operations, not CheckTable.
Valid values: NONE LastMinionBackup NewMinionBackup
For more information, see “About: Remote CheckDB” and “How to: Set up CheckDB on a Remote Server”. |
DropRemoteDB | bit |
Determines whether the remote CheckDB process drops the remote database after the operation.
You might not want to drop the database if, for example, it’s supposed to be there for development or QA purposes.
For more information, see “About: Remote CheckDB” and “How to: Set up CheckDB on a Remote Server”. |
DropRemoteJob | bit |
Determines whether the remote CheckDB process drops the remote database after the operation.
By default, this should be enabled.
For more information, see “About: Remote CheckDB” and “How to: Set up CheckDB on a Remote Server”. |
LockDBMode | varchar |
This field is not yet in use. |
ResultMode | varchar |
This determines how much detail of the integrity check results to keep in the Minion.CheckDBResult table.
NULL and SUMMARY will keep only the rows like ‘CHECKDB found%allocation errors and %consistency errors in database%’.
FULL will keep everything from a run.
NONE keeps nothing from a run.
Valid values: NULL (this is the same as SUMMARY) SUMMARY FULL NONE |
HistRetDays | int |
Number of days to retain a history of operations (in Minion CheckDB log tables).
Minion CheckDB does not modify or delete information in system tables.
Note: This setting is also optionally configurable at multiple levels. So, you can keep log history for different amounts of time for one database vs another |
PushToMinion | varchar |
Determines whether log data is only stored on the local (client) server, or on both the local server and the remote server.
Valid values will include: Local Remote |
MinionTriggerPath | varchar |
UNC path where the Minion logging trigger file is located.
Not applicable for a standalone Minion CheckDB instance. |
AutoRepair | varchar |
This field is not yet in use. |
AutoRepairTime | varchar |
This field is not yet in use. |
DefaultSchema | varchar |
If you define specific tables to undergo DBCC CHECKTABLE, and you do not define a schema for those tables, then the system uses this DefaultSchema.
Note: This only applies to rows with OpName=CHECKTABLE.
If you leave this value NULL, MC will automatically use the dbo schema. |
DBPreCode | varchar |
Code to run for a database, before the operation begins for that database.
For more on this topic, see “How To: Run code before or after integrity checks”. |
DBPostCode | varchar |
Code to run for a database, after the operation completes for that database.
For more on this topic, see “How To: Run code before or after integrity checks”. |
TablePreCode | varchar |
Code to run for a database, before the operation begins for each included table.
For more on this topic, see “How To: Run code before or after integrity checks”. |
TablePostCode | varchar |
Code to run for a database, after the operation completes for each included table.
For more on this topic, see “How To: Run code before or after integrity checks”. |
StmtPrefix | nvarchar |
This column allows you to prefix every integrity check statement with a statement of your own. This is different from the precode and postcode, because it is run in the same batch. Whereas, precode and postcode are run as completely separate statements, in different contexts.
Code entered in this column MUST end in a semicolon.
For more on this topic, see “How To: Run code before or after integrity checks”. |
StmtSuffix | nvarchar |
This column allows you to suffix every integrity check statement with a statement of your own. This is different from the precode and postcode, because it is run in the same batch. Whereas, precode and postcode are run as completely separate statements, in different contexts.
Code entered in this column MUST end in a semicolon.
For more on this topic, see “How To: Run code before or after integrity checks”. |
DBInternalThreads | tinyint |
The number of CheckTable operations to run simultaneously. Note: If you specify DBInternalThreads in Minion.CheckDBSettingsServer, that value takes precedence over this field. Warning: You can max out server resources very quickly if you use too many concurrent operations. If for example you’re running 5 databases simultaneously, and each of those operations runs 10 tables simultaneously, that can add up very quickly! |
DefaultTimeEstimateMins | Int |
How long you estimate the operation will take, in minutes.
If you want to limit the operation based off of time (e.g., run for two hours), and the database has never been run before. So, the system has no way to know how long the operation will take. |
LogSkips | bit |
Whether or not you want to log skipped objects.
For example: You have limited the operation to an hour, and it is cycling through CheckTable opeartions. Some tables will be skipped if the time limit is exceeded. Do you want to add those to the log, to see which ones were skipped?
It can be a good idea to set LogSkips to 0 (i.e., “do not log tables that were skipped”) if you routinely have a very high number of tables that will be skipped; this prevents log bloat. |
BeginTime | varchar |
The start time at which this configuration applies.
IMPORTANT: Must be in the format hh:mm:ss, or hh:mm:ss:mmm (where mmm is milliseconds), on a 24 hour clock. This means that both ’00:00:00’ and ’08:15:00:000’ are valid times, but ‘8:15:00:000’ is not (because single digit hours must have a leading 0). |
EndTime | Varchar |
The end time at which this configuration applies.
IMPORTANT: Must be in the format hh:mm:ss, or hh:mm:ss:mmm (where mmm is milliseconds), on a 24 hour clock. This means that both ’00:00:00’ and ’08:15:00:000’ are valid times, but ‘8:15:00:000’ is not (because single digit hours must have a leading 0). |
DayOfWeek | varchar |
The day or days to which the settings apply.
Valid inputs: Daily Weekday Weekend [an individual day, e.g., Sunday] |
IsActive | bit |
Whether the current row is valid (active), and should be used in the Minion CheckDB process. |
Comment | varchar |
For your reference only. You can label each row with a short description and/or purpose. |