Configuring the repository to use an external database for HA

Where you are in the installation process

StepTask
1.Complete the planning activities
2.Prepare for TrueSight Orchestration in containers installation
3.

Install Remedy SSO (if using external)

4.

Install TrueSight Orchestration in containers – Phase A (You are here)

5.Install Development Studio
6.Install Lightweight Activity Peer (Optional)
7.Complete the post-installation tasks

By default, the repository contains an embedded database. You can enable high availability for the repository by configuring the repository to use an external database and leveraging the clustering features of the external database to provide failover.

Important

For the MySQL, Oracle, and MS SQL Server Databases, update the class names in the repository.xml files and place the database's connector/driver jar file in the repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/lib directory before starting the repository server.

Use the procedures in this topic to configure the following databases as external databases for the repository:

Before you begin

  • You must have installed the repository and stopped the repository service. 
  • You must have installed an external database. 

    Note

    For advanced database configuration information, refer to the documentation for your database type.

  • Do not start the repository server before configuring the repository to use an external server. If you are upgrading to the latest version of the repository, configure the external database first and then start the repository server. 

To configure the repository to use a MySQL database

  1. Create an external database:
    1. In the external database, set the max_allowed_packet variable to a value between 512 MB and 1 GB. 
      For information about how to set this variable, see the product documentation for your database.
    2. Set up the database user:
      • Create the user and user password.
      • Set up read and write permissions for the user.
    3. In the external database, create a new database (for example, repository), using the credentials created in step 1b.
  2. Extract the contents of the repository .war file into a new baorepo directory:
    1. Under the repoInstallationDirectory/tomcat/webapps/ directory, create the baorepo subdirectory.
    2. In the baorepo subdirectory, unzip the repoInstallationDirectory/tomcat/webapps/baorepo.war file.
  3. Place the database's connector/driver jar file in the repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/lib directory.
    Example: 
    You could place the mysql-connector-<compatibleVersion>-bin.jar file in the repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/lib directory.

    Note

    In this release, the compatible version for the database's connector/driver jar is 5.1.44. Do not use any other version of the jar file so that the database is not corrupted.

  4. Open the repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/classes/META-INF/repository.xmlfile in a text editor and replace the existing PersistenceManagersection with the connection information for the external database.

    Note

    The repository.xml file typically contains two PersistenceManager sections. Modify the first section, located under workspace. Do not change the section under Versioning.

    MySQL database connection properties for PersistenceManager

    Parameter

    Description

    MySQL values

    class

    org.apache.jackrabbit.core.
    persistence.pool.MySqlPersistenceManager

    driver

    <MySQLDriver>

    URL

    URL and port number for the external database

    You can omit the port number if you use the default port for the database.

    jdbc:mysql://host:port/database

    user

    Database user name that you created in step 1

    userName

    password

    Password that you assigned to the database user

    password

    schema

    The string value that indicates the database type. Use the exact string value.

    This is not the name of the database schema.

    mysql

    schemaObjectPrefix

    ${wsp.name}

    externalBLOBs

    false


    Persistence Manager for MySQL
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager">
    <param name="driver" value="<MySQLDriver string>"/>
    <param name="url" value="jdbc:mysql://<host name>:<port number>/<database name>" />
    <param name="user" value="<database user>"/>
    <param name="password" value="<database password>"/>
    <param name="schema" value="<schema name>"/>
    <param name="schemaObjectPrefix" value="${wsp.name}"/>
    <param name="externalBLOBs" value="false"/>
    </PersistenceManager>
  5. Start the repository server.

    Notes

    If you want to update any configuration values after the repository server is started, you must update the repository.xml file located at the repoInstallationDirectory/repository/config directory and restart the repository server. Also, you must update the workspace.xml file located at the repoInstallationDirectory/workspaces/default and the repoInstallationDirectory/workspaces/security directories, and then restart the repository server.

    If you want to point to a different database, you must delete the repository's workspace (delete the repoInstallationDirectory/repository folder) and restart the repository. Cluster the external database to provide high-availability for the repository.

To configure the repository to use an Oracle database

  1. Create an external database:
    1. Set up the database user:
      • Create the user and user password.
      • Set up read and write permissions for the user. Permissions must include:
        • CREATE SESSION
        • CREATE TABLE
        • CREATE SEQUENCE
    2. In the external database, create a new database (for example, repository), using the credentials created in Step 1a.
  2. Extract the contents of the repository .war file into a new baorepo directory:
    1. Under the repoInstallationDirectory/tomcat/webapps/ directory, create the baorepo subdirectory.
    2. In the baorepo subdirectory, unzip the repoInstallationDirectory/tomcat/webapps/baorepo.war file.
  3. Place the database's connector/driver jar file in the repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/lib directory. 
    Example: 
    You would place the ojdbc<compatibleVersion>.jar file in repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/lib directory.

    Note

    In this release, the compatible database's connector/driver jar version is ojdbc6-11.2.0.2.0. The Oracle driver jar file is bundled with  Platform and is available at the following location:

    (Repository) AO_HOME/repo/lib/shared

    (CDP) AO_HOME/CDP/lib/shared

  4. Open the repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/classes/META-INF/repository.xmlfile in a text editor and replace the existing PersistenceManagersection with the connection information for the external database.

    Note

    The repository.xml file typically contains two PersistenceManager sections. Modify the first section, located under workspace. Do not change the section under Versioning.

    Oracle database connection properties for PersistenceManager

    Parameter

    Description

    Values

    class

    org.apache.jackrabbit.core.persistence.
    pool.OraclePersistenceManager

    driverJDBC driver class name<oracle.jdbc.driver.OracleDriver>

    URL

    URL and port number for the external database 
    You can omit the port number if you use the default port for the database.

    jdbc:oracle:thin:@host:port/sid

    or

    jdbc:oracle:thin:@host:port/servicename

    user

    Database user name that you created in step 1

    userName

    password

    Password that you assigned to the database user

    password

    schema

    The string value that indicates the database type. Use the exact string value.

    This is not the name of the database schema.

    oracle

    schemaObjectPrefix

    ${wsp.name}

    externalBLOBs

    false

    Persistence Manager for Oracle
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager">
    <param name="url" value="jdbc:oracle:thin:@<hostname>:<port number>:<servicename>"/>
    <param name="driver" value="oracle.jdbc.driver.OracleDriver"/>
    <param name="user" value="<database username>"/>
    <param name="password" value="<database password>"/>
    <param name="schema" value="<schema name>"/>
    <param name="schemaObjectPrefix" value="${wsp.name}"/>
    <param name="externalBLOBs" value="false"/>
    </PersistenceManager>
    
  5. Start the repository server.

    Notes

    If you want to update any configuration values after the repository server is started, you must update the repository.xml file located at the repoInstallationDirectory/repository/config directory and restart the repository server. Also, you must update the workspace.xml file located at the repoInstallationDirectory/workspaces/default and the repoInstallationDirectory/workspaces/securitydirectories, and then restart the repository server.

    If you want to point to a different database, you must delete the repository's workspace (delete the repoInstallationDirectory/repository folder) and restart the repository. Cluster the external database to provide high-availability for the repository.

To configure the repository to use a DB2 Express-C 10.1 edition database

  1. Create an external database:
    1. Set up the database user:
      • Create the user and user password.
      • Set up read and write permissions for the user. Permissions must include:
        • CREATE SESSION
        • CREATE TABLE
        • CREATE SEQUENCE
    2. In the external database, create a new database (for example, repository), using the credentials created in Step 1a.
  2. Extract the contents of the repository .war file into a new baorepo directory:
    1. Under the repoInstallationDirectory/tomcat/webapps/ directory, create the baorepo subdirectory.
    2. In the baorepo subdirectory, unzip the repoInstallationDirectory/tomcat/webapps/baorepo.war file.
  3. Place the database's connector/driver jar file in the directory repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/lib directory. 
    Example: 
    You could place the DB2Driver.jar file in the repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/lib directory.
  4. Open the repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/classes/META-INF/repository.xmlfile in a text editor and replace the existing PersistenceManagersection with the connection information for the external database.

    Note

    The repository.xml file typically contains two PersistenceManager sections. Modify the first section, located under workspace. Do not change the section under Versioning.

    DB2 database connection properties for PersistenceManager

    Parameter

    Description

    DB2 values

    class

    org.apache.jackrabbit.core.state.db
    .SimpleDbPersistenceManager

    driver

    <DB2Driver>

    URL

    URL and port number for the external database
    You can omit the port number if you use the default port for the database.

    jdbc:db2://host:port/database

    user

    Database user name that you created in step 1

    userName

    password

    Password that you assigned to the database user

    password

    schema

    The string value that indicates the database type. Use the exact string value.

    This is not the name of the database schema.

    db2

    schemaObjectPrefix

    ${wsp.name}

    externalBLOBs

    false

    Persistence Manager for DB2
    <PersistenceManager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
    <param name="driver" value="DB2Driver"/>
    <param name="url" value="jdbc:oracle:thin:@bao.bmc.com:1521:repository" />
    <param name="user" value="baouser"/>
    <param name="password" value="baopass"/>
    <param name="schema" value="db2"/>
    <param name="schemaObjectPrefix" value="${wsp.name}"/>
    <param name="externalBLOBs" value="false"/>
    </PersistenceManager>
    
  5. Start the repository server.

    Notes

    If you want to update any configuration values after the repository server is started, you must update the repository.xml file located at the repoInstallationDirectory/repository/config directory and restart the repository server. Also, you must update the workspace.xml file located at the repoInstallationDirectory/workspaces/default and the repoInstallationDirectory/workspaces/securitydirectories, and then restart the repository server.

    If you want to point to a different database, you must delete the repository's workspace (delete the repoInstallationDirectory/repository folder) and restart the repository. Cluster the external database to provide high-availability for the repository.

To configure the repository to use a Microsoft SQL Server 2012 database

  1. Create an external database:
    1. Set up the database user:
      • Create the user and user password.
      • Set up read and write permissions for the user. Permissions must include:
        • CREATE SESSION
        • CREATE TABLE
        • CREATE SEQUENCE
    2. In the external database, create a new database (for example, repository), using the credentials created in Step 1a.
  2. Extract the contents of the repository .war file into a new baorepo directory:
    1. Under the repoInstallationDirectory/tomcat/webapps/ directory, create the baorepo subdirectory.
    2. In the baorepo subdirectory, unzip the repoInstallationDirectory/tomcat/webapps/baorepo.war file.
  3. Place the database's connector/driver jar file in the directory repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/lib directory. 
    Example: 
    You could place the sqljdbc.jar file in the repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/lib directory.

    Note

    In this release, the compatible jar file version is sqljdbc42.

  4. Open the repoInstallationDirectory/tomcat/webapps/baorepo/WEB-INF/classes/META-INF/repository.xmlfile in a text editor and replace the existing PersistenceManager section with the connection information for the external database.

    Note

    The repository.xml file typically contains two PersistenceManager sections. Modify the first section, located under workspace. Do not change the section under Versioning.

    Microsoft SQL Server 2012 database connection properties for PersistenceManager

    Parameter

    Description

    Values

    class

    org.apache.jackrabbit.core.
    persistence.pool.MSSqlPersistenceManager

    driver

    com.microsoft.sqlserver.jdbc.SQLServerDriver

    URL

    URL and port number for the external database 
    You can omit the port number if you use the default port for the database.

    jdbc:sqlserver://host:port;databaseName=

    user

    Database user name that you created in step 1

    userName

    password

    Password that you assigned to the database user

    password

    schema

    The string value that indicates the database type. Use the exact string value.

    This is not the name of the database schema.

    mssql

    schemaObjectPrefix

    ${wsp.name}

    externalBLOBs

    false

    Persistence Manager for Microsoft SQL Server 2012
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.MSSqlPersistenceManager">
    <param name="driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
    <param name="url" value="jdbc:sqlserver://<database hostname>:<port>;databaseName=<database name>"/>
    <param name="user" value="<database username>"/>
    <param name="password" value="<database password>"/>
    <param name="schema" value="<schema name>"/>
    <param name="schemaObjectPrefix" value="${wsp.name}"/>
    <param name="externalBLOBs" value="false"/>
    </PersistenceManager>
  5. Start the repository server.

    Notes

    If you want to update any configuration values after the repository server is started, you must update the repository.xml file located at the repoInstallationDirectory/repository/config directory and restart the repository server. Also, you must update the workspace.xml file located at the repoInstallationDirectory/workspaces/default and the repoInstallationDirectory/workspaces/securitydirectories, and then restart the repository server.

    If you want to point to a different database, you must delete the repository's workspace (delete the repoInstallationDirectory/repository folder) and restart the repository. Cluster the external database to provide high-availability for the repository.

Next step in the installation process

Now that you have successfully configured the repository to use an external database, install other TrueSight Orchestration components. For instructions, see Installing – In containers.  

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Alejandro Cortes

    Hi

    Is supported Microsoft SQL Server 2014 database?

    Regards

    Jun 18, 2020 10:46
    1. Shweta Hardikar

      Hi Alejandro,

      We've listed the certified databases here: https://docs.bmc.com/docs/TrueSightOrchestration/82/system-requirements-821041257.html

      Microsoft SQL Server 2014 is not certified. 

      Jun 18, 2020 10:58