Step 1: Set Up the Example Environment

In this procedure, you set up the example Vmart database environment.

  1. Stop all databases running on the same host on which you plan to install your example database.

    Tip: If you are unsure, run the Administration Tools and select View Database Cluster State. The State column should show DOWN values on pre-existing databases.

  2. Log in to a terminal using the database administrator account that was created during product installation.

    The default account name is .

  3. Create a directory for the example files on the Administration Host, such as under /tmp. This tutorial uses a /tmp/examples folder structure:

    $ cd /tmp
    $ mkdir examples

    Note: Do not use the default data directory /home/.

  4. Copy the the Vmart example database files to the examples directory.

    If you installed the product rpm on a database server, the example databases are located in /opt/vertica/examples on the host.

    $ cp -r /opt/vertica/examples/VMart_Schema/* /tmp/examples
  5. Set your current directory to the example database directory you created:

    $ cd examples

    Note: Do not change directories while following this tutorial. Some of the steps depend on being set to a specific directory.

  6. Run the sample data generator program:

    $ ./vmart_gen

    Let the program run with the default parameters, which you can review in the README file.

    Tip: If you are using VMware, the fact table load could fail. Specify a smaller fact table size, such as 1000000 (1M) rows, as described in Step 8: (Optional) Generate Custom Data Files. The maximum size of a bulk load depends on the system resources and cannot be determined accurately.

    vmart sample data generator

    If the vmart_gen executable does not work correctly, recompile it, as follows, and run the sample data generator script again. For example:

    1. $ g++ vmart_gen.cpp -o vmart_gen
    2. $ chmod +x vmart_gen
    3. $ ./vmart_gen

    (This example uses the GNU C++ compiler, which is a free download. You can use any other C++ compiler.)

  7. Next, create the sample database.