By default Klaros-Testmanagement uses the Apache Derby Database which requires no further installation or configuration but is severely lacking performance in comparison to other databases. For productive use, it is therefore strongly recommended to use a more powerful database system, such as the open source database servers PostgreSQL or MariaDB/MySQL or the commercial Microsoft SQLServer database product.
To switch to another database system, Klaros-Testmanagement must be stopped, and the file
hibernate.properties
located in
<user.home>/.klaros/hibernate.properties
must be edited as shown below.
The hibernate.connection.url
property must match the location of the database in your network.
Please consult your database administrator for the
hibernate.connection.username
and hibernate.connection.password
credentials to use.
Warning | |
---|---|
Blank spaces at the end of lines in the hibernate.properties file might get misinterpreted by hibernate! For example, 'hibernate.connection.password=root ' is not the same as 'hibernate.connection.password=root' (ignoring quotes). |
For MariaDB change the content of the file to:
MariaDB 10.3 or later:
hibernate.connection.driver_class=org.mariadb.jdbc.Driver hibernate.connection.url=jdbc:mariadb://localhost:3306/klaros hibernate.connection.username=root hibernate.connection.password=root
To use a Microsoft SQL-Server change the content of the file to:
Microsoft SQL-Server 2008 or later Versions:
hibernate.connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=KLAROS hibernate.connection.username=root hibernate.connection.password=root
For MySQL change the content of the file to:
MySQL 5.5 or later versions:
hibernate.connection.driver_class=com.mysql.jdbc.Driver hibernate.connection.url=jdbc:mysql://localhost:3306/klaros hibernate.connection.username=root hibernate.connection.password=root
Important | |
---|---|
When using a MySQL database, it is important to set the following option in the my.ini file. # The maximum size of a query packet the server can handle as well as # maximum query size server can process (Important when working with # large BLOBs). enlarged dynamically, for each connection. max_allowed_packet = 64M |
To use PostgreSQL change the content of the file to:
PostgreSQL 9.4 or later versions:
hibernate.connection.driver_class = org.postgresql.Driver hibernate.connection.url = jdbc:postgresql://localhost/klaros hibernate.connection.username=root hibernate.connection.password=root
An exhaustive list of all parameters can be found in the Hibernate Core Manual.
Creating a Database Instance | |
---|---|
Klaros-Testmanagement will not automatically create either the database instance ( Creating a database instance and adding a user is described in the corresponding database manual and will not be covered here. The database user needs permissions to create, drop and alter tables to properly bootstrap the Klaros-Testmanagement database instance. |
To switch back to the integrated Derby database:
hibernate.connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver hibernate.connection.url=jdbc\:derby\:${user.home}/.klaros/klarosDerby;create\=true hibernate.connection.username=root hibernate.connection.password=root