Migrating your database

In some cases, for example when your installations are local, you can reuse your existing database. However, in most production cases, for performance reasons, you need to change the database altogether.

About this task

The most flexible way to migrate your database is described in Configuring a custom external database.

Here is an example with a Db2 database.

Procedure

  1. Create the file datasource-dc.xml to configure the Decision Center data source.
    
    <server>
        <library id="DB2Lib">
             <fileset dir="${server.config.dir}/resources"/>
        </library>
        <!-- DC data source -->
        <dataSource id="dcdatasource"
                isolationLevel="TRANSACTION-READ-COMMITTED"
                jndiName="jdbc/ilogDataSource"
                statementCacheSize="150">
                <jdbcDriver LibraryRef="DB2Lib"/>
           <connectionManager
                maxPoolSize="25"
                minPoolSize="10"
                connectionTimeout="10s"
                agedTimeout="30m" />
           <properties.db2.jcc
                databaseName="ODMDB" currentSchema="DCREPO"
                serverName="9......." portNumber="50000"
                user="name" password="XXXXXX" />
        </dataSource>
    </server>
  2. Create the file datasource-ds.xml to configure the Decision Server data source.
    
    <server>
        <library id="DB2Lib">
             <fileset dir="${server.config.dir}/resources"/>
        </library>
        <!-- RES data source -->
        <dataSource id="resdatasource"
                isolationLevel="TRANSACTION_READ_COMMITTED"
                jndiName="jdbc/resdatasource"
                statementCacheSize="150">
                <jdbcDriver LibraryRef="DB2Lib"/>
           <connectionManager
                maxPoolSize="25"
                minPoolSize="10"
                connectionTimeout="10s"
                agedTimeout="30m"/>
           <properties.db2.jcc
                databaseName="ODMDB" currentSchema="RESREPO"
                serverName="9..........." portNumber="50000"
                user="name" password="XXXXXXX" />
        </dataSource>    
    </server>
    
  3. Create a secret from the two XML files.
    kubectl create secret generic customdatasource-secret --from-file datasource-ds.xml --from-file datasource-dc.xml
  4. When you install the Helm chart, add the following parameters.
    --set externalCustomDatabase.datasourceRef=customdatasource-secret

What to do next

Complete the procedure in Installing containerized ODM.