Page tree
Skip to end of metadata
Go to start of metadata

This article describes how to change report database for Nexus Hybrid Access Gateway - Internal.

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.

Expand/Collapse All

Prerequisites

 Prerequisites
  • Installed Hybrid Access Gateway
  • Before upgrading to Hybrid Access Gateway 5.13:
    When an external database is used for reporting, the dialect part specific to the database must be configured in customize.conf (under administration service). If you do not configure the dialect entry before the upgrade, the connection to the reporting database will fail, until you add the dialect entry and restart the administration service.
    See also sections Edit configuration file and Required Java parameters for reporting database below.

Create and configure database

 Stop Administration service

Stop the Hybrid Access Gateway Administration service:

  1. At the command prompt, enter the following command:
    /etc/init.d/administration-service stop
 Create database
  1. Create the reporting database on a supported database system and give it a name, for example hag_reporting.
 Edit configuration file

Edit the configuration file and add the required Java parameters:

  1. Check if file customize.conf exists. If so, continue to step 4.
  2. If customize.conf does not exists, copy the template file to create it. Type at the prompt:
    cp customize-template.conf customize.conf
  3. Change permissions of the file so it can be read by the Authentication service:
    chown pwuser:pwuser customize.conf
  4. Open the configuration file:
    /opt/nexus/administration-service/config/customize.conf
  5. In the section wrapper.java.additional, add the required parameters listed below.
 Start Administration service

Start the Hybrid Access Gateway Administration service:

  1. At the command prompt, enter the following command:
    /etc/init.d/administration-service start

Required Java parameters for reporting database

 Required parameters for Oracle
Required 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:ORCLCDB
-Dcom.portwise.core.database.user=user4
-Dcom.portwise.core.database.password=password
-Dcom.portwise.core.database.dialect=org.hibernate.dialect.Oracle10gDialect
 Required parameters for Microsoft SQL Server
Required 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
 Required parameters for MySQL
Required parameters for MySQL
-Dcom.portwise.core.database.driver=com.mysql.jdbc.Driver 
-Dcom.portwise.core.database.url=jdbc:mysql://10.0.0.1/reporting 
-Dcom.portwise.core.database.user=hag 
-Dcom.portwise.core.database.password=nexus@123
-Dcom.portwise.core.database.dialect=org.hibernate.dialect.MySQLDialect
 Required parameters for Postgres
Required 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