6.3. Setting up the Database

Dashbuilder application requires an existing database, previously created before running the application. To create a database you can use any database client tool and run the following commands:
Postgres
The following sql sentence is used to create a Postgres database:
CREATE DATABASE dashbuilder
  WITH ENCODING='UTF8'
         OWNER=dashbuilder
         CONNECTION LIMIT=-1

Note

The database encoding must be UTF8
DB2
DB2 database can be created using the following sql sentence:
CREATE DATABASE dashb PAGESIZE 16384

Note

The default pagesize for DB2 systems is 4k which is not enough for the dashbuilder table columns size. The pagesize should be forced to 16384 as shown in the above sentence.
Once the database is created, the application server datasource must be configured. You must edit the JBoss EAP configuration file and configure the datasource subsystem as the following examples:
<datasource jndi-name="java:jboss/datasources/jbpmDS" enabled="true" use-java-context="true" pool-name="postgresqlDS">
    <connection-url>jdbc:postgresql://localhost/test</connection-url>
    <driver>postgresql</driver>
    <pool></pool>
    <security>
       <user-name>sa</user-name>
       <password>sa</password>
    </security>
</datasource>
<drivers>
    <driver name="postgresql" module="org.postgresql">
        <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
    </driver>
</drivers>