Overview

Skill Level: Any Skill Level

Sometimes there is a requirement to point to a different database of the same type in MDM. This article explains how to update the database used by MDM by using post configuration targets.

Ingredients

1. Deployed IBM InfoSphere Master Data Management

2. Database instance where MDM must point to.

Note

Targets mentioned in this article need to be run with madconfig.bat instead of madconfig.sh if operating system is Windows.

Step-by-step

  1. Targets Overview

    Database to which MDM is pointing to can be updated by running below targets,

        modify_server_configuration

        a.    This target will ask for below details –

            i.    WAS password

            ii.    New DB type, host, port, user, password, name, schema, SSL Authentication use

        b.    This target will perform below actions –

            i.    Upgrade JDBC Data Sources and JAAS entries

            ii.    Stop Server

            iii.    Update APPSOFTWARE table

            iv.    Start Server

            v.    Update the mdm_install.properties file to point to new database configuration

        update_instance_datasource

        a.    This target will ask for below details –

            i.    New DB type, host, port, name, user, password, schema

        b.    This target will perform below actions –

            i.    Encypt the password

            ii.    Updates configuration files, com.ibm.mdm.mds.jdbc.cfg, com.ibm.mdm.mds.jni.cfg, odbc.ini

            Note – For Windows operating system odbc.ini file is not available because the data sources are managed by inbuilt ODBC Data Sources Utility. Hence need to be updated manually.

  2. Directory Overview

    Above second target, update_instance_datasource, need to be executed from scripts located in configuration directory and runtime directory.

        Configuration Directory is <MDM_INSTALL_HOME>/mds/

        This is the directory from where MDM is being configured by executing commands like Configure_MasterDataManagement. For Virtual MDM, configurations are taken from the <MDM_INSTALL_HOME>/mds/conf folder.

        Runtime Directory is <WAS_PROFILE_HOME>/installedApps/<CELL>/MDM-native-<INSTANCE_IDENTIFIER>.ear/native.war/

        This is the directory from where WebSphere takes the configuration mentioned in the <WAS_PROFILE_HOME>/installedApps/<CELL>/MDM-native-<INSTANCE_IDENTIFIER>.ear/native.war/conf folder during server startup.

  3. Execution of modify_server_configuration target from configuration directory

    Go to scripts folder in Configuration directory i.e. <MDM_INSTALL_HOME>/mds/scripts and run first target using below command,

    ./madconfig.sh modify_server_configuration

    modify_server_configuration_1

    modify_server_configuration_2

  4. Execution of update_instance_datasource target from configuration directory

    Now run the second target from <MDM_INSTALL_HOME>/mds/scripts directory by using below command,

    ./madconfig.sh update_instance_datasource

    update_instance_datasource_1

    update_instance_datasource_2

  5. Verify changes in mds/conf and MDM_INSTALL_HOME/properties directory

    Check the configuration and properties file to confirm the changes,

    configs_after

  6. Test updated datasource from mds/scripts directory

    Run the below command to test the datasource from <MDM_INSTALL_HOME>/mds/scripts directory,

    ./madconfig.sh test_datasource

    test_datasource

  7. Execution of update_instance_datasource target from virtual MDM runtime directory

    Go to scripts folder in Runtime directory i.e. <WAS_PROFILE_HOME>/installedApps/<CELL>/MDM-native-<INSTANCE_IDENTIFIER>.ear/native.war/scripts and run second target by using below command,

    ./madconfig.sh update_instance_datasource

    native_war_update_instance_datasource_1

    native_war_update_instance_datasource_2

  8. Verify changes in native.war/conf directory

    Check the configuration files at runtime directory i.e. <WAS_PROFILE_HOME>/installedApps/<CELL>/MDM-native-<INSTANCE_IDENTIFIER>.ear/native.war/conf to confirm the changes,

    native_war_configs_after

  9. Test updated datasource from native.war/scripts directory

    Run the below command to test the datasource from <WAS_PROFILE_HOME>/installedApps/<CELL>/MDM-native-<INSTANCE_IDENTIFIER>.ear/native.war/scripts directory,

    ./madconfig.sh test_datasource

    native_war_test_datasource

  10. Test DB Connection from mds/scripts directory

    Go to configuration directory i.e <MDM_INSTALL_HOME>/mds/scripts and test connection by using below command. Also check the test connection log file for errors. Log file should be present under <MDM_INSTALL_HOME>/logs/madconfig/java/TestDB*.

    ./madconfig.sh test_db_connection -Duser.db.password=<DB_PASSWORD>

    test_db_connection

  11. Verify updated data sources in IBM WebSphere Admin Console

    After all the targets ran successfully and changes are confirmed, check the data source in IBM WebSphere Admin Console,

    data_source_after

  12. Test updated data sources from IBM WebSphere Admin Console

    Test the data source connection from IBM WebSphere Admin console,

    test_connection_ibm_console_datasource

  13. Restart Application to take effect

    If test connections are successful then data sources are modified successfully. Restart the application servers to take effect.

     

    Additional Information – 

    MDM database pointing can also be updated to different type of database. For example, MDM currently pointing to DB2 database can be updated to point to Oracle database.

Join The Discussion