Changing a Database's Template

You can change the specified template for a database while the database is still running.

Automation Console

To do this in the Automation Console, from the Edit Database panel, just click the Template pull-down menu and choose another template. The requirements for the template will be enforced, so you may have some domain administration (provisioning hosts) to do before changing the template. See Provisioning Hosts for more information.

NuoDB Manager

Caution: When you change the template from one to another in NuoDB Manager, you must also re-enter your database options, template variables, and tag constraints.

nuodb [domain] > show domain summary
 
Hosts:
[broker] * ec2-54-200-117-181.us-west-2.compute.amazonaws.com/54.200.117.181:48004 (us-west-2)
[broker] ip-172-31-2-230/54.148.240.227:48004 (us-west-2)
 
Database: test, template [Single Host] MET, processes [2 TE, 2 SM], ACTIVE
[SM] ip-172-31-5-193/54.200.117.181:48005 (us-west-2) [ pid = 27918 ] [ nodeId = 2 ] RUNNING
[TE] ip-172-31-5-193/54.200.117.181:48006 (us-west-2) [ pid = 27943 ] [ nodeId = 4 ] RUNNING
[SM] ip-172-31-2-230/54.148.240.227:48005 (us-west-2) [ pid = 32183 ] [ nodeId = 1 ] RUNNING
[TE] ip-172-31-2-230/54.148.240.227:48006 (us-west-2) [ pid = 32205 ] [ nodeId = 3 ] RUNNING
 
nuodb [domain] > show database config
Database: test
Database: test, ACTIVE, Status=RUNNING, template [Single Host]
  Variables: {HOST=72cffbbd-0ab9-444d-9301-34975411e3c7}
  Options: {}
  Default Options: { "commit": "${COMMIT:remote:1}","backoff.reqMinUptime":"30000","hostLimit":"${HOST_LIMIT:false}"}
  Process group options:
  Process group tag constraints:
  Archive Locations:
    ip-172-31-2-230/54.148.240.227:48004, requirements: SMs, region: us-west-2:
      archive: /var/opt/nuodb/production-archives/test
      journal-dir: /var/opt/nuodb/production-archives/test
    ec2-54-200-117-181.us-west-2.compute.amazonaws.com/54.200.117.181:48004, requirements: SMs, region: us-west-2:
      archive: /var/opt/nuodb/production-archives/test
      journal-dir: /var/opt/nuodb/production-archives/test
  Single Host MET

# Update the database and set the template to Minimally Redundant
nuodb [domain] > update database
Database Name: test
Template Name (Single Host, Minimally Redundant, Multi Host, Region distributed):
 Minimally Redundant
Template Variables (optional): 
Database Options (optional): 
Template Variable REGION (default: DEFAULT_REGION): us-west-2
Database Options for SMs (optional): 
Tag Constraints for SMs (optional): 
Database Options for TEs (optional): 
Tag Constraints for TEs (optional): 
nuodb [domain] > show domain summary
 
Hosts:
[broker] * ec2-54-200-117-181.us-west-2.compute.amazonaws.com/54.200.117.181:48004 (us-west-2)
[broker] ip-172-31-2-230/54.148.240.227:48004 (us-west-2)
 
Database: test, template [Minimally Redundant] MET, processes [2 TE, 2 SM], ACTIVE
[SM] ip-172-31-5-193/54.200.117.181:48005 (us-west-2) [ pid = 27918 ] [ nodeId = 2 ] RUNNING
[TE] ip-172-31-5-193/54.200.117.181:48006 (us-west-2) [ pid = 27943 ] [ nodeId = 4 ] RUNNING
[SM] ip-172-31-2-230/54.148.240.227:48005 (us-west-2) [ pid = 32183 ] [ nodeId = 1 ] RUNNING
[TE] ip-172-31-2-230/54.148.240.227:48006 (us-west-2) [ pid = 32205 ] [ nodeId = 3 ] RUNNING