Skip to main content

Setting up the database

This section describes how to prepare the databases which are needed for ConSol CM and the CMRF. This must be done before installing the applications.

The required steps are the same for both applications. You just need to adjust the names of the database and user.

Examples:

  • ConSol CM database name: cmdatabase
  • ConSol CM database user: cmuser
  • CMRF database name: cmrfdatabase
  • CMRF database user: cmrfuser

We recommend to install a database management tool for your database server:

  • pgAdmin
  • MySQL Workbench
  • Microsoft SQL Server Management Studio
  • Oracle SQL Developer

Global settings

Make the following settings in the postgresql.conf file in the data directory of the PostgreSQL installation:

max_connections=200
max_prepared_transactions = 200
jit=off

The setting jit=off disables JIT for all PostgreSQL databases. If this is not desired, you can make this setting for the ConSol CM and the CMRF databases individually by executing:

> alter database cmdatabase set jit=off;

Creation of the databases and users

  1. Create the database and database user:

    CREATE DATABASE cmdatabase;
    CREATE USER cmuser WITH PASSWORD 'password';
    GRANT ALL PRIVILEGES ON DATABASE cmdatabase TO cmuser;
  2. Connect to the database and grant access to the public schema to the database user:

    GRANT ALL ON SCHEMA PUBLIC TO cmuser;
    ```

Alternatively, you can create use an own schema for the ConSol CM database:

CREATE SCHEMA cmschema;
GRANT ALL ON SCHEMA cmschema TO cmuser;
ALTER DATABASE cmdatabase SET search_path TO cmschema;