System Databases

The Axon.ivy Engine system database is used to store configuration, security, content and workflow information. See Configuration to find out how you can create and configure Axon.ivy Engine system databases. Axon.ivy Engine supports the following database systems to host the system database:

You have the choice to create the database without the tables on your own. Or let the Engine Cockpit make you that. In the second case, good default creation parameters will be applied.

Password Encryption

Passwords are stored encrypted in the system database using state of the art encryption algorithms. More information can be found in the chapter System Database Encryption.

Character set and collation

All characters in databases are encoded with a specific charset (e.g. utf8, latin1, cp1257). Lastly it defines which kind of characters can be stored at all.

The collation is a set of rules that defines how the database management system compares and orders the data (e.g. utf8_unicode_ci, latin2_general_ci). Common abbreviations in the name of the collations are the following:

  • ci = case insensitive

  • cs = case sensitive

  • ai = accent insensitive

  • as = accent sensitive

As well as the character set the collation can be defined mostly on several levels: server, database, table or column. Everything about this subject is very dependent on the actual database management system.

Support case insensitive searches

If a case insensitive search is required, it must be guaranteed that the affected column has a case insensitive collation.

  1. Check character set & collation of the column

  2. Change character set & collation if necessary

MySQL

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# MySql as System Database
# [engineDir]/configuration/ivy.yaml
SystemDb:
  # Format: jdbc:mysql://<host>[:<port>]/<database name>
  Url: jdbc:mysql://localhost:3306/AxonIvySystemDatabase
  UserName: root
  Password: 1234
  DriverProperties:
    # Very likely to set if not ssl connection is used, to prevent warn logs
    useSSL: false

We only support InnoDB as storage engine. If database will be created by the Axon.ivy Engine the charset is set to utf8 and collation is set to utf8_unicode_ci.

Warning

The newer charset utf8mb4 is not supported. The creation of the system database tables will fail if you use utf8mb4 charset.

Tip

If you experience bad query performance in Portal, then try to increase the setting innodb-buffer-pool-size in the my.cnf configuration file of the database.

MariaDB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# MariaDb as System Database
# [engineDir]/configuration/ivy.yaml
SystemDb:
  # Format: jdbc:mariadb://<host>[:<port>]/<database name>
  Url: jdbc:mariadb://localhost:3306/AxonIvySystemDatabase
  UserName: root
  Password: 1234
  DriverProperties:
    # Very likely to set if not ssl connection is used, to prevent warn logs
    useSSL: false

We only support InnoDB as storage engine. If database will be created by the Axon.ivy Engine the charset is set to utf8 and collation is set to utf8_unicode_ci.

Warning

The newer charset utf8mb4 is not supported. The creation of the system database tables will fail if you use utf8mb4 charset.

Tip

If you experience bad query performance in Portal, then try to increase the setting innodb-buffer-pool-size in the my.cnf configuration file of the database.

PostgreSQL

1
2
3
4
5
6
7
# Postgres as System Database
# [engineDir]/configuration/ivy.yaml
SystemDb:
  # Format: jdbc:postgresql://<host>[:<port>]/<database system>
  Url: jdbc:postgresql://localhost:5432/AxonIvySystemDatabase
  UserName: root
  Password: 1234

If database will be created by the Axon.ivy Engine the encoding is set to UTF8.

Tip

If you experience bad query performance in Portal, then try to increase the setting work_mem in the postgresql.conf configuration file of the database.

Microsoft SQL Server

There are two basic authentication schemes used to connect to a Microsoft SQL Server, SQL Server Authentication and Windows Authentication.

SQL Server Authentication

With SQL Server Authentication you are connecting to the database with a database user.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Microsoft SQL Server as System Database
# [engineDir]/configuration/ivy.yaml
SystemDb:
  # Format: jdbc:sqlserver://[<host>[:<port>]][;databaseName=<database name>]
  Url: jdbc:sqlserver://localhost:1433;databaseName=AxonIvySystemDatabase
  UserName: root
  Password: 1234

  # Microsoft recommends not to use the instanceName and prefers specifying
  # the port in the connection url. If you need to work with the instanceName
  # you must remove the port in the connection url.
  #DriverProperties:
  #  instanceName: SqlServer

Note

On an SQL Server installation, only Windows Authentication is enabled by default. If you face problems connecting to the database, check if SQL Server Authentication is activated.

Windows Authentication

Microsoft SQL Server can be configured so it uses Windows credentials to log into the database.

There are two ways to do that, one where you configure a specific Windows user (and password), and one where the user credentials of the user running the Axon.ivy Engine are used.

Using specific Windows user:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Microsoft SQL Server as System Database, specifying a Windows user to log
# into the database
# [engineDir]/configuration/ivy.yaml
SystemDb:
  # Format: jdbc:sqlserver://[<host>[:<port>]][;databaseName=<database name>]
  Url: jdbc:sqlserver://localhost:1433;databaseName=AxonIvySystemDatabase
  UserName: myWindowsUser
  Password: myWindowsPassword
  DriverProperties:
    integratedSecurity: true
    authenticationScheme: NTLM
    domain: myWindowsDomain

Using user credentials of the process owner:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Microsoft SQL Server as System Database, using credentials of user running the
# Ivy Engine process
# [engineDir]/configuration/ivy.yaml
# NOTE: In order to use this feature, you need to copy the mssql-jdbc_auth DLL
#       file matching the JDBC driver version used by the Axon.ivy Engine into
#       the [engineDir]/jre/bin directory before starting the Axon.ivy Engine.
#       The easiest way to obtain this DLL is by downloading it from a Maven
#       repository, e.g.
#       https://docs.microsoft.com/en-us/sql/connect/jdbc/release-notes-for-the-jdbc-driver.
SystemDb:
  # Format: jdbc:sqlserver://[<host>[:<port>]][;databaseName=<database name>]
  Url: jdbc:sqlserver://localhost:1433;databaseName=AxonIvySystemDatabase
  DriverProperties:
    integratedSecurity: true

Instance Name

Microsoft recommends not to use the instanceName and prefers specifying the port in the connection url, as for each connection there is a round trip to determine the port. Therefore you will need to configure a static TCP port (e.g. 1433) in the SQL Server Configuration Manager.

If you still need to work with the instanceName you must define it as an additional connection property and remove the port in the connection url.

Tip

If you cannot connect to a Microsoft SQL Server, check first if the TCP/IP protocol for SQL Server is activated (by default it’s deactivated). If you still face problems then you may check if SQL Server Authentication is activated. By default only Windows Authentication is enabled.

If the database is created by the Axon.ivy Engine the collate is set to Latin1_General_CI_AI.

Tip

If you want to join tables of the system database with tables of another business database, then ensure that all involved databases use the same collate. Otherwise, you will get bad performance when comparing character columns from different databases because the data must be converted from one collate to another.

Oracle

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Oracle as System Database
# [engineDir]/configuration/ivy.yaml
SystemDb:

  # using oracle service name
  Url: jdbc:oracle:thin:@//localhost:1521/ServiceName

  # using oracle service id
  Url: jdbc:oracle:thin:@localhost:1521:ServiceId

  # using oracle tns
  Url: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ServiceName)(SERVER=DEDICATED)))

  UserName: root
  Password: 1234

If database will be created by the Axon.ivy Engine the collate is set to Latin1_General_CI_AI.

Tip

On all (reused) oracle database connections the maximum number of open cursors is set to 1000, independently from the default setting that may be set on the database itself. Those cursors are needed to cache all prepared statements and also for PL/SQL blocks.

It may turn out that the number of open cursors is exceeded, which is indicated by an error message similar to the following:

ch.ivyteam.ivy.persistence.PersistencyException: java.sql.SQLException:
ORA-00604: error occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded

If this should happen, then you may customize (and increase) the number of open cursors per connection with the Java system property ch.ivyteam.ivy.persistence.db.oracle.MaxOpenCursors. It can be set in the jvm.options.

Note

Schema Creation

Before you can create the system database tables on a Oracle Database you have to do the following steps:

  1. You may want to create a new Oracle database where the Axon.ivy Engine System Database is located. This is optional you can use an already existing Oracle database.

  2. Create a new user (e.g. AxonIvy) or let the Axon.ivy Engine create one for you with the Setup Wizard. You can use the following script to create a new user with sufficient permissions:

    CREATE USER <username> IDENTIFIED BY <password>;
    GRANT CREATE SESSION, CREATE TABLE, CREATE VIEW,
          CREATE TRIGGER, CREATE PROCEDURE, CREATE SEQUENCE,
          UNLIMITED TABLESPACE TO <username>;
    
  3. You may want to create a new tablespace (e.g. AxonIvy) where the Axon.ivy Engine System Database can store the table data. This is optional you can use an already existing tablespace.

Warning

Be sure that the configuration of the database connection uses the new database and the Oracle Service ID reflecting the database you want to create the system database tables in.