Complete these instructions if you will be using the PostgreSQL database. If you will be using the Oracle database, instead use the Oracle setup instructions.

  1. Select Start > Programs > PostgreSQL 8.4 > pgAdminIII.
  2. The pgAdminIII window opens. Right-click the PostgreSQL 8.4 (localhost:5432) icon, and select Connect, as shown here:

    Postgres Setup - pgAdminIII

  3. Log in to the database server using the password you set up during the PostgreSQL installation.
  4. Create the database openclinica and the database user clinica, which OpenClinica uses to connect to the database:
    1. Expand the databases, and select postgreSQL.
    2. Select Tools > Query tool.
      The Query window opens.
    3. In the SQL Editor box, delete all the text.
    4. In the SQL Editor box, type the following:
      CREATE ROLE clinica LOGIN ENCRYPTED PASSWORD ‘clinica’ SUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
    5. Select Query > Execute, which runs the SQL query.
      When the query completes, a message displays in the History window.
    6. In the SQL Editor box, delete all the text.
    7. In the SQL Editor box, type the following:
      CREATE DATABASE openclinica WITH ENCODING=’UTF8′ OWNER=clinica;
    8. Select Query > Execute.
      When the query completes, a message displays in the History window.
    9. Close the Query window, and click No when prompted to save changes.
  5. The database password is set to clinica by default, which is not a secure password. Change the password as follows:
    1. In the pgAdminIII window, expand and select Login Roles.
    2. Select View > Refresh.
      The clinica database user is listed.
    3. Right-click the clinica user account and select Properties.
    4. In the Login Role for clinica box that displays, enter the new password and re-enter it, then click OK. Record the password for future use.