Enforcer

The enforcer is a process that runs in each broker in the domain. The enforcer compares the state of the domain against the requirements for the database(s) or against the template(s) used to create the database(s). On only the leader broker, the enforcer starts additional processes as needed.

Before shutting down a redundant SM in a minimally redundant database, you want to ensure that the enforcerThe enforcer is a process that runs in each broker in the domain. The enforcer compares the state of the domain against the requirements for the database(s) or against the template(s) used to create the database(s). On only the leader broker, the enforcer starts additional processes as needed. does not start a new SM in its place. Therefore, you need to temporaritly change the database requirements such that the min value for storage mangers does not require the SM being shut down to start again.

In a minimally redundant database, both the max and min settings for storage managers is 2.

In NuoDB Manager, to ensure that the enforcer does not start a storage manager to replace the one you shut down, update variables SM_MAX and SM_MIN:

nuodb [domain] > update database
Database Name: 
Database Options (optional): 
Database Options for SMs (optional): 
Tag Constraints for SMs (optional): 
Database Options for TEs (optional): 
Tag Constraints for TEs (optional): 

For a multi host database that is running on at least three hosts, you want to guard against a situation in which the enforcer tries to start a storage manager on the host on which you shut down the storage manager to perform the backup. For example, suppose your database is running on hosts A, B, and C. You want to shut down the storage manager on host C so you can make a back-up copy. While you are making the copy, if the storage manager on host A or host B terminates then the enforcer tries to start a storage manager. You want to ensure that the enforcer does not try to start a storage manager on host C. To do this, you disable enforcement on host C. For example, invoke the NuoDB Manager disable enforcer command:

disable enforcer host C

For more information on using the Enforcer, see: