Restart Database

This is a NuoDB Manager command. See NuoDB Manager.

Description

The restart database command starts all database processes based on a captured database configuration file (See Capture Database).

When the restart database command is issued, database processes details are taken from the capture file. If none of the database processes - Transaction Engines (TEs) or Storage Managers (SMs) - described in the capture file are running, NuoDB Manager attempts to start all of them. If any of the database processes described in the capture file are already running and the incremental option is set to false (the default value), a "Database is already active" error is returned and no other action is taken.

If restart database is run with the incremental option set to true, then running processes are kept as-is and any non-running processes are started.

Note: Even when a TE process host is unreachable, it is skipped and the Restart command still restarts the database as long as all SM processes specified in the capture file are reachable.

See the following:

Syntax

restart database dbFile file_name [timeout timeout_value] [incremental false]

Parameters

Useful Properties

restartTimeout

See NuoDB Manager Properties.

Interactive Example

Restart database test based on a capture file called test.desc. This database has 2 TEs and 2 SMs but one of the TEs in the host2 server was down (IP addresses were masked):

nuodb [domain] > restart database
Database Description File: test.desc
Timeout (ms/s/m/h/d/w) (optional): 
Perform an incremental restart (default: false): true
Restarting missing engines for database: test
A storage manager using /var/opt/nuodb/production-archives/test is already running on host1/192.168.x.x.
A storage manager using /var/opt/nuodb/production-archives/test is already running on host2/192.168.x.x.
A transaction engine with the requested options is already running on host1/192.168.x.x.
No leader candidates, could be an old database
Started: [TE] host2/192.168.x.x:48006 (DEFAULT_REGION) [ pid = 12550 ] [ db = test ] [ nodeId = 5 ] RUNNING nuodb [domain/test] >

Scripting Example

The same restart database command can be executed from the command line or from within a script using the --command switch as follows:

nuodbmgr --broker host --password password --command "restart database dbFile test.desc incremental true"

Restarting missing engines for database: test
A storage manager using /var/opt/nuodb/production-archives/test is already running on host1/192.168.x.x.
A storage manager using /var/opt/nuodb/production-archives/test is already running on host2/192.168.x.x.
A transaction engine with the requested options is already running on host1/192.168.x.x.
No leader candidates, could be an old database
Started: [TE] host2/192.168.x.x:48006 (DEFAULT_REGION) [ pid = 12550 ] [ db = test ] [ nodeId = 5 ] RUNNING