Creating the Database
Before you embed the Vertica database with your customer application, you must create it. To do so, add the following command to the packaging script:
$ /opt/vertica/bin/admintools --tool create_db [ options ]
Command-Line Options:
Option | Function |
---|---|
-h --help |
Show this help message and exit. |
-s NODES --hosts=NODES |
Comma-separated list of hosts to participate in database. |
-d DB --database=DB |
Name of database to be created. |
-c CATALOG --catalog_path=CATALOG |
[Optional] Path of catalog directory. |
-D DATA --data_path=DATA |
[Optional] Path of data directory. |
-p DBPASSWORD --password=DBPASSWORD |
[Optional] Database password in single quotes. |
-l LICENSEFILE --license=LICENSEFILE |
[Optional] Database license. |
-P POLICY --policy=POLICY |
[Optional] Database restart policy. |
The following example shows how to create a database named mydb
:
$ admintools -t create_db -s 10.20.100.66,10.20.100.67,10.20.100.68 -d mydb -c /home/dbadmin/mydb/catalog -D /home/dbadmin/mydb/data -l /home/dbadmin/vlicense.dat
Info: no password specified, using none Distributing changes to cluster. 10.20.100.66 OK [vertica][(6, 1, 2)][20130430][x86_64] 10.20.100.67 OK [vertica][(6, 1, 2)][20130430][x86_64] 10.20.100.68 OK [vertica][(6, 1, 2)][20130430][x86_64] Checking full connectivity Creating database mydb Node Status: v_mydb_node0001: (DOWN) Node Status: v_mydb_node0001: (INITIALIZING) Node Status: v_mydb_node0001: (VALIDATING LICENSE) Node Status: v_mydb_node0001: (UP) Creating database nodes Creating node v_mydb_node0002 (host 10.20.100.67) Creating node v_mydb_node0003 (host 10.20.100.68) Node Status: v_mydb_node0001: (UP) v_mydb_node0002: (UP) v_mydb_node0003: (DOWN) Node Status: v_mydb_node0001: (UP) v_mydb_node0002: (UP) v_mydb_node0003: (UP) Database mydb created successfully.