We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


How to Create a Database with Desired Node Names — Vertica Forum

How to Create a Database with Desired Node Names

AmakshAmaksh Vertica Employee Employee

Tip by Mohit Saxena

To be able to copy a cluster in Vertica, you must provide the same node name on the target. However, you might have nonsequential node names in the source database as in the following:

$ admintools -t list_allnodes
Node              | Host           | State | Version          | DB
-------------------+----------------+-------+------------------+--------
v_prodee_node0004 | 192.168.51.201 | UP    | vertica-9.3.1.10 | prodee
v_prodee_node0005 | 192.168.51.202 | UP    | vertica-9.3.1.10 | prodee
v_prodee_node0006 | 192.168.51.203 | UP    | vertica-9.3.1.10 | prodee

In this case, you would need to create a database with the desired node names to copy a cluster.

To do this,

  1. Modify the following [nodes] section in admintools.conf with the desired node names:
[nodes]
node0004 = 192.168.51.204,/home/dbadmin,/home/dbadmin
node0005 = 192.168.51.205,/home/dbadmin,/home/dbadmin
node0006 = 192.168.51.206,/home/dbadmin,/home/dbadmin
v_prodee_node0004 = 192.168.51.204,/home/dbadmin,/home/dbadmin
v_prodee_node0005 = 192.168.51.205,/home/dbadmin,/home/dbadmin
v_prodee_node0006 = 192.168.51.206,/home/dbadmin,/home/dbadmin

  1. Run the following create db command by providing node names in the hosts list:
$ admintools -t create_db -d prodee --compat21 -s v_prodee_node0004,v_prodee_node0005,v_prodee_node0006

Info: no password specified, using none
WARNING: --compat21 is deprecated as of Vertica. Support may be removed in future versions.
        Creating database prodee
  1. Check the database status.
$ admintools -t list_allnodes
Node              | Host           | State | Version          | DB
-------------------+----------------+-------+------------------+--------
v_prodee_node0004 | 192.168.51.204 | UP    | vertica-9.3.1.10 | prodee
v_prodee_node0005 | 192.168.51.205 | UP    | vertica-9.3.1.10 | prodee
v_prodee_node0006 | 192.168.51.206 | UP    | vertica-9.3.1.10 | prodee

Sign In or Register to comment.