Disabling Enforcement of Template Requirements

There are times when it is necessary to disable the enforcer so that database processes can gracefully shut down without being automatically restarted. You can disable and re-enable enforcement for:

The following cases are examples of when this is helpful:

NuoDB disables enforcement for a database if the enforcer reaches the maximum number of times to try restarting one of the database's processes. This is specified by the backoff.maxRetry database option. See Setting Up Automatic Restart of Processes.

Learning If and Where Enforcement is Disabled

To determine where in your domain enforcement is disabled, invoke the show domain disabledEnforcer command:

nuodb [domain] > show domain disabledEnforcer
Domain enforcer: enabled
Disabled hosts:
    Host: ip-172-31-14-56/52.24.98.113:48004 untilRestart=false
    Host: ip-172-31-14-171/52.24.143.83:48004 untilRestart=true
Disabled databases:
    Database: test4 (Minimally Redundant)

Disabling/Enabling Enforcement for the Domain

To use NuoDB Manager to disable enforcement for all database processes running in the domain, invoke the following command. Disabling enforcement for the domain prevents new databases from being created.

disable enforcer domain

To use NuoDB Manager to enable enforcement for all database processes running in the domain, invoke the following command:

enable enforcer domain

Disabling/Enabling Enforcement for a Host

To use NuoDB Manager to disable enforcement for a particular host, invoke the following command:

disable enforcer host host_name [ untilRestart { true | false } ]

Replace host_name with the name of the host on which you want to disable the enforcer. Disabling enforcement for a host prevents new databases from being created if they require that processes run on that host.

If untilRestart is false (default), enforcement on the host remains disabled until it is explicitly enabled again. If untilRestart is true, enforcement on the host is enabled as soon as it restarts or reconnects to the domain. Best practice is leave untilRestart as false.

To use NuoDB Manager to enable enforcement for a particular host, invoke the following command:

enable enforcer host host_name

Replace host_name with the name of the host on which you want to enable the enforcer.

Disabling/Enabling Enforcement for a Database

You can use only NuoDB Manager to disable/re-enable enforcement for a particular database.

To disable the enforcer for a given database, invoke the NuoDB Manager disable enforcer command, as in the following example:

nuodb [domain] > disable enforcer database test

After doing whatever activity requires enforcement to be disabled, be sure to re-enable the enforcer by doing the reverse:

nuodb [domain] > enable enforcer database test