Determines which settings from the Minion.CheckDBSettingsDB table apply for a given database and operation, at a given time. This procedure is generally for internal use, but you can use it manually as needed.

Note that this function is shared between Minion modules.

Also: To determine the settings from the Minion.CheckDBSettingsServer table will be used, use the Minion.CheckDBMaster procedure with @StmtOnly = 1, and @TestDateTime populated.

 

Name Type Description
@Module varchar

The name of the Minion module.

 

Valid inputs include:

CHECKDB

@DBName varchar

Database name.

@OpName varchar

Operation name.

 

Valid inputs:

NULL

AUTO

CHECKDB

CHECKTABLE

@SettingID int

An output parameter that provides the ID of the row in Minion.CheckDBSettingsDB that applies to the module, database, operation, and time provided.

@TestDateTime datetime

The date and time of the operation. Automatic operations provide the present date and time to get the applicable settings.

 

If you’re running Minion.DBMaintDBSettingsGet by hand, you can pass in any date and time as a “what if” to see what settings would be used at that time.

Example Execution

DECLARE @SettingID INT;
EXEC Minion.DBMaintDBSettingsGet 
	@Module = 'CHECKDB', 
	@DBName = 'Demo', 
	@OpName = 'CHECKDB',
	@SettingID = @SettingID OUTPUT, 
	@TestDateTime = '2016-10-22 16:00:00';
SELECT  @SettingID AS SettingID;