Creating Database in HP Vertica 7.1

In previous post I downloaded and installed HP Vertica 7.1 database software in Ubuntu 14.4. In this follow-up I’ll create a test database.

Vertica was installed using a userid that had sudo – root privilege. During install process Vertica created dbadmin user that is the owner of databases in Vertica.

Super user dbadmin must be OS owner of catalog and data directory where database files will be stored.

drwxr-xr-x 10 root root 4096 Oct 16 2013 usr/ 
drwxr-xr-x 13 root root 4096 Oct 16 2013 var/
drwxr-xr-x 4 dbadmin root 4096 Nov 16 10:04 vertica/
lrwxrwxrwx 1 root root 30 Nov 5 18:24 vmlinuz -> boot/vmlinuz-3.13.0-39-generic
lrwxrwxrwx 1 root root 30 Oct 13 09:00 vmlinuz.old -> boot/vmlinuz-3.13.0-37-generic 
sudhakar@sudhakar-Latitude-E6420:/$ cd vertica 
sudhakar@sudhakar-Latitude-E6420:/vertica$ ll 
total 16 
drwxr-xr-x 4 dbadmin root 4096 Nov 16 10:04 ./ 
drwxr-xr-x 24 root root 4096 Nov 16 10:04 ../ 
drwxr-xr-x 2 root root 4096 Nov 16 10:04 catalog/ 
drwxr-xr-x 2 root root 4096 Nov 16 10:04 data/ 
sudhakar@sudhakar-Latitude-E6420:/vertica$ chown dbadmin catalog/ 
chown: changing ownership of ‘catalog/’: Operation not permitted 
sudhakar@sudhakar-Latitude-E6420:/vertica$ sudo chown dbadmin catalog/ 
sudhakar@sudhakar-Latitude-E6420:/vertica$ sudo chown dbadmin data/ 
sudhakar@sudhakar-Latitude-E6420:/vertica$ ll 
total 16 
drwxr-xr-x 4 dbadmin root 4096 Nov 16 10:04 ./ 
drwxr-xr-x 24 root root 4096 Nov 16 10:04 ../ 
drwxr-xr-x 2 dbadmin root 4096 Nov 16 10:04 catalog/ 
drwxr-xr-x 2 dbadmin root 4096 Nov 16 10:04 data/ 
sudhakar@sudhakar-Latitude-E6420:/vertica$ 
sudhakar@sudhakar-Latitude-E6420:/vertica$

Now I’ll login as dbadmin and create database using admintools

sudhakar@sudhakar-Latitude-E6420:~$ ssh dbadmin@localhost 
dbadmin@localhost's password: 
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-39-generic x86_64) 
* Documentation: https://help.ubuntu.com/ 
Last login: Sun Nov 16 19:41:08 2014 from localhost 
dbadmin@sudhakar-Latitude-E6420:~$

Invoke admintools → Configuration Menu → Create Database

  • Provide database name
  • Specify Password (with confirmation)
  • Select the Host
  • Specify the paths for catalog and database

After confirmation in next screen the DB will be created with following response.

*** Creating database: tspdb ***
127.0.0.1 OK [vertica][(7, 1, 1)][000][all]
Creating database tspdb
Starting bootstrap node v_tspdb_node0001 (127.0.0.1)
Starting nodes:
v_tspdb_node0001 (127.0.0.1)
Starting Vertica on all nodes. Please wait, databases with large catalogs may take a while to initialize.
Node Status: v_tspdb_node0001: (INITIALIZING)
Node Status: v_tspdb_node0001: (INITIALIZING)
Node Status: v_tspdb_node0001: (INITIALIZING)
Node Status: v_tspdb_node0001: (UP)

I’ll access TSPDB database using VSQL successfully.

dbadmin@sudhakar-Latitude-E6420:~$ vsql
Password:
Welcome to vsql, the Vertica Analytic Database interactive terminal.
Type: \h or \? for help with vsql commands
\g or terminate with semicolon to execute query
\q to quit
dbadmin=>

That’s it… I’ll explore Vertica capabilities in next posts.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s