Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fixed faulty start and stop commands

This article describes how to change report database for Smart ID Digital Access component (Hybrid Access Gateway).

In systems with high load it can be advised to use an external database for statistics and reports. If the logs show numerous database errors or if instructed by Nexus support it is possible to change the database to another database that supports Java Database Connectivity (JDBC) and Structured Query Language (SQL).

This both serves the purpose of offloading the system CPU, by having the database on another machine, as well as changing to an enterprise database system.

Expandall

Prerequisites

Expand
titlePrerequisites

Step-by-step instruction

Create and configure database

Expand
titleStop Administration service

Stop the Digital Access component Administration service:

  1. At the command prompt, enter the following command:

    Code Block
    titleStop Administration service
    	docker exec orchestrator hagcli -os administration-service -so stop



Expand
titleCreate database
  1. Create the reporting database on a supported database system and give it a name, for example reporting


Expand
titleEdit configuration file

Edit the configuration file and add the required Java parameters:

  1. Check if the file customize.conf exists in /opt/nexus/primary/administration-service/config/. If so, continue to step 4.
  2. If customize.conf does not exist, copy the template file to create it. Type at the prompt:

    Code Block
    titleCopy template file
    cp customize-template.conf customize.conf


  3. Change permissions of the file so it can be read by the Authentication service:

    Code Block
    titleChange permission
    chown pwuser:pwuser customize.conf


  4. Open the configuration file customize.conf.
  5. In the section wrapper.java.additional, add the required parameters as listed below, select values from section "Required Java parameters for reporting database" below.

    Code Block
    titleAdd parameters
    wrapper.java.additional.30=-Dcom.portwise.core.database.driver=org.mariadb.jdbc.Driver
    wrapper.java.additional.31=-Dcom.portwise.core.database.url=jdbc:mysql://127.0.0.1/hag_reporting
    wrapper.java.additional.32=-Dcom.portwise.core.database.user=root
    wrapper.java.additional.33=-Dcom.portwise.core.database.password=nexus@123
    wrapper.java.additional.34=-Dcom.portwise.core.database.dialect=org.hibernate.dialect.MariaDBDialect



Expand
titleStart Administration service

Start the Digital Access component Administration service:

  1. At the command prompt, enter the following command:

    Code Block
    titleStart Administration service
    docker exec orchestrator hagcli -os administration-service -so start


Required Java parameters for reporting database

Expand
titleRequired parameters for Oracle


Code Block
titleRequired parameters for Oracle
-Dcom.portwise.core.database.driver=oracle.jdbc.driver.OracleDriver
-Dcom.portwise.core.database.url=jdbc:oracle:thin:@10.0.0.1:1521:reporting
-Dcom.portwise.core.database.user=user4
-Dcom.portwise.core.database.password=password
-Dcom.portwise.core.database.dialect=org.hibernate.dialect.Oracle10gDialect



Expand
titleRequired parameters for Microsoft SQL Server


Code Block
titleRequired parameters for Microsoft SQL Server
-Dcom.portwise.core.database.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
-Dcom.portwise.core.database.url=jdbc:sqlserver://10.0.0.1:1433;databaseName=reporting
-Dcom.portwise.core.database.user=sa
-Dcom.portwise.core.database.password=nexus@123
-Dcom.portwise.core.database.dialect=org.hibernate.dialect.SQLServer2008Dialect



Expand
titleRequired parameters for MariaDB


Code Block
titleRequired parameters for MariaDB
-Dcom.portwise.core.database.driver=org.mariadb.jdbc.Driver
-Dcom.portwise.core.database.url=jdbc:mysql://127.0.0.1/reporting
-Dcom.portwise.core.database.user=root
-Dcom.portwise.core.database.password=nexus@123
-Dcom.portwise.core.database.dialect=org.hibernate.dialect.MariaDBDialect



Expand
titleRequired parameters for Postgres


Code Block
titleRequired parameters for Postgres
-Dcom.portwise.core.database.driver=org.postgresql.Driver
-Dcom.portwise.core.database.url=jdbc:postgresql://127.0.0.1/reporting
-Dcom.portwise.core.database.user=postgres
-Dcom.portwise.core.database.password=nexus@123
-Dcom.portwise.core.database.dialect=org.hibernate.dialect.PostgreSQL9Dialect