Step 1: setting up the example environment

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

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

    If databases are running, click Stop Database in the Main Menu of the Administration Tools interface and click OK.

  2. In a terminal window, log in as the database administrator:

    $ su dbadmin
    Password: 
    
  3. Change to the /VMart_Schema directory.

    $ cd /opt/vertica/examples/VMart_Schema
    

    Do not change directories while following this tutorial. Some steps depend on being in a specific directory.

  4. Run the sample data generator.

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

    Using default parameters
    datadirectory = ./
    numfiles = 1
    seed = 2
    null = ' '
    timefile = Time.txt
    numfactsalesrows = 5000000
    numfactorderrows = 300000
    numprodkeys = 60000
    numstorekeys = 250
    numpromokeys = 1000
    numvendkeys = 50
    numcustkeys = 50000
    numempkeys = 10000
    numwarehousekeys = 100
    numshippingkeys = 100
    numonlinepagekeys = 1000
    numcallcenterkeys = 200
    numfactonlinesalesrows = 5000000
    numinventoryfactrows = 300000
    gen_load_script = false
    Data Generated successfully !
    Using default parameters
    datadirectory = ./
    numfiles = 1
    seed = 2
    null = ' '
    timefile = Time.txt
    numfactsalesrows = 5000000
    numfactorderrows = 300000
    numprodkeys = 60000
    numstorekeys = 250
    numpromokeys = 1000
    numvendkeys = 50
    numcustkeys = 50000
    numempkeys = 10000
    numwarehousekeys = 100
    numshippingkeys = 100
    numonlinepagekeys = 1000
    numcallcenterkeys = 200
    numfactonlinesalesrows = 5000000
    numinventoryfactrows = 300000
    gen_load_script = false
    Data Generated successfully !
    
  6. If the vmart_gen executable does not work correctly, recompile it as follows, and run the sample data generator script again.

    $ g++ vmart_gen.cpp -o vmart_gen
    $ chmod +x vmart_gen
    $ ./vmart_gen