28.2. Installation

The TAUdb utilities and applications are installed as part of the standard TAU release. Shell scripts are installed in the TAU bin directory to configure and run the utilities. It is assumed that the user has installed TAU and run TAU's configure and 'make install'.

  1. (Optionally) Create a database. This step will depend on the user's chosen DBMS.

    • H2: Because it is an embedded, file-based DBMS, H2 does not require creating the database before configuring TAUdb. TAUdb takes advantage of the "auto-server" capabilities in H2, so multiple clients can connect to the same database at the same time. Users should use the H2 DBMS if they expect to maintain a small to moderate local repository of performance data, and want the convenience of connecting to the database from multiple clients.

    • Derby: Because it is an embedded, file-based DBMS, Derby does not require creating the database before configuring TAUdb. Be advised that the Derby DBMS does not allow multiple clients to connect to the same database. For that reason, we suggest users use the H2 DBMS if a file-based database is desired. Derby support is maintained for backwards compatability.

    • PostgreSQL:

      $ createdb -O taudb taudb

      Or, from psql

      psql=# create database taudb with owner = taudb;

    • MySQL: From the MySQL prompt

      mysql> create database taudb;

    • Oracle: It is recommended that you create a tablespace for taudb:

      create tablespace taudb 
      datafile '/path/to/somewhere' size 500m reuse;

      Then, create a user that has this tablespace as default:

      create user amorris identified by db;
      grant create session to amorris;
      grant create table to amorris;
      grant create sequence to amorris;
      grant create trigger to amorris;
      alter user amorris quota unlimited on taudb;
      alter user amorris default tablespace taudb;

      TAUdb is set up to use the Oracle Thin Java driver. You will have to obtain this jar file for your DBMS. In our case, it was ojdbc14.jar.

  2. Configure a TAUdb connection. To configure TAUdb, run the taudb_configure program from the TAU bin directory.

    The configuration program will prompt the user for several values. The default values will work for most users. When configuration is complete, it will connect to the database and test the configuration. If the configuration is valid and the schema is not already found in the database (as will be the case on initial configuration), the schema will be uploaded. Be sure to specify the correct version of the schema for your DBMS.

    An example session for configuring a database is below. The user is creating an H2 database, with default settings including no username and no password (recommended for file-based databases when security is not an issue).

    $ taudb_configure
    Configuration file NOT found...
    a new configuration file will be created.
    Welcome to the configuration program for PerfDMF.
    This program will prompt you for some information necessary to 
    ensure the desired behavior for the PerfDMF tools.
    You will now be prompted for new values, if desired.  The current 
    or default values for each prompt are shown in parenthesis.
    To accept the current/default value, just press Enter/Return.
    Please enter the name of this configuration.
    Please enter the database vendor (oracle, postgresql, mysql, db2, 
    derby or h2).
    Please enter the JDBC jar file.
    Please enter the JDBC Driver name.
    Please enter the path to the database directory.
    Please enter the database username.
    Store the database password in CLEAR TEXT in your configuration 
    file? (y/n):y
    Please enter the database password: 
    Please enter the PerfDMF schema file.
    Writing configuration file: 
    Now testing your database connection.
    Database created, command: 
    Uploading Schema: /Users/khuck/src/tau2/etc/taudb.sql
    Found /Users/khuck/src/tau2/etc/taudb.sql  ... Loading
    Successfully uploaded schema
    Database connection successful.
    Configuration complete.