Configuring WebSphere Portal to use multiple databases

Before few days i tried database transfer task to transfer data from default Apache Derby database to DB2 database. At that time i did create a single database on the DB2 WPSDB and data for all 6 different database domains was transferred to WPSDB with different schema names. I did document it under Database transfer manually.

This time i wanted to use following 6 different databases for each of the database domains.


  1. RELDB61: Release domain

  2. COMDB61: Community domain

  3. CUSDB61:Customization domain

  4. JCRDB61: JCR database.

  5. FDBKDB61: Feed back domain

  6. LMDB61: Learning management


I followed these steps to do the database transfer


  • Crate 6 databases on your target server by using the following script


    db2 "CREATE DB RELDB61 using codeset UTF-8 territory us PAGESIZE 8192"
    db2 "UPDATE DB CFG FOR RELDB61 USING applheapsz 4096"
    db2 "UPDATE DB CFG FOR RELDB61 USING app_ctl_heap_sz 1024"
    db2 "UPDATE DB CFG FOR RELDB61 USING stmtheap 32768"
    db2 "UPDATE DB CFG FOR RELDB61 USING dbheap 2400"
    db2 "UPDATE DB CFG FOR RELDB61 USING locklist 1000"
    db2 "UPDATE DB CFG FOR RELDB61 USING logfilsiz 4000"
    db2 "UPDATE DB CFG FOR RELDB61 USING logprimary 12"
    db2 "UPDATE DB CFG FOR RELDB61 USING logsecond 20"
    db2 "UPDATE DB CFG FOR RELDB61 USING logbufsz 32"
    db2 "UPDATE DB CFG FOR RELDB61 USING avg_appls 5"
    db2 "UPDATE DB CFG FOR RELDB61 USING locktimeout 30"
    db2 "UPDATE DB CFG FOR RELDB61 using AUTO_MAINT off"


    This sample is for creating RELDB61 database. Similarly create 5 other databases.


  • In case of JCR database execute these additional script to tune the database as well as create table spaces that are required for JCR database.


    db2 "CONNECT TO JCRDB61 USER jcr"
    db2 "CREATE BUFFERPOOL ICMLSFREQBP4 SIZE 1000 PAGESIZE 4 K"
    db2 "CREATE BUFFERPOOL ICMLSVOLATILEBP4 SIZE 8000 PAGESIZE 4 K"
    db2 "CREATE BUFFERPOOL ICMLSMAINBP32 SIZE 8000 PAGESIZE 32 K"
    db2 "CREATE BUFFERPOOL CMBMAIN4 SIZE 1000 PAGESIZE 4 K"
    db2 "CREATE REGULAR TABLESPACE ICMLFQ32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLFQ32') BUFFERPOOL ICMLSMAINBP32"
    db2 "CREATE REGULAR TABLESPACE ICMLNF32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLNF32') BUFFERPOOL ICMLSMAINBP32"
    db2 "CREATE REGULAR TABLESPACE ICMVFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMVFQ04') BUFFERPOOL ICMLSVOLATILEBP4"
    db2 "CREATE REGULAR TABLESPACE ICMSFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMSFQ04') BUFFERPOOL ICMLSFREQBP4"
    db2 "CREATE REGULAR TABLESPACE CMBINV04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('CMBINV04') BUFFERPOOL CMBMAIN4"
    db2 "CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('icmlssystspace32') BUFFERPOOL ICMLSMAINBP32"
    db2 "CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE4 PAGESIZE 4 K MANAGED BY SYSTEM USING ('icmlssystspace4') BUFFERPOOL ICMLSVOLATILEBP4"

    db2 "DISCONNECT jcrdb"
    db2 "TERMINATE"

    Make sure that each of the SQL statement is executed successfully


  • Next create a JDBC provider for connecting to DB2 database using the type 4 driver named wpdbJDBC_db2

  • Next create one following 6 data sources using the wpdbJDBC_db2 JDBC provider. Each of the data sources should connect to each of the 6 databases.

    • wpdbDS_reldb: for connecting to RELDB61 database

    • wpdbDS_cusdb: for connecting to CUSDB61 database

    • wpdbDS_comdb: for connecting to COMDB61 database

    • wpdbDS_jcrdb: for connecting to JCRDB61 database

    • wpdbDS_fdbk: for connecting to FDBKDB61 database

    • wpdbDS_lmdb: for connecting to LMDB61 database


    While creating a datasource in WAS if you created a new security alias then you will have to restart the server

  • Next set your database preferences in wkplc_dbtype.properties file like this. The wkplc_dbtype.properties file is used to configure your database driver related information such as what is the DBDriver class that you want to use, the .jar files that have the DBDriver related code and name of the JDBC Provider that you created in the WAS

    # DbDriver: The name of class SqlProcessor will use to import SQL files
    # For DB2 Type 2 driver use COM.ibm.db2.jdbc.app.DB2Driver
    # For DB2 Type 4 driver use com.ibm.db2.jcc.DB2Driver
    db2.DbDriver=com.ibm.db2.jcc.DB2Driver

    # DbLibrary: The directory and name of the zip/jar file containing JDBC driver class
    # For DB2 Type 2 driver use /java/db2java.zip
    # For DB2 Type 4 driver use /java/db2jcc.jar;/java/db2jcc_license_cu.jar
    # Please use the system specific file separator names, e.g. for windows semicolon and for unix colon.
    db2.DbLibrary=/software/IBM/db2jcc.jar;/software/IBM/db2jcc_license_cu.jar

    # JdbcProviderName: The name of jdbc provider to be used
    db2.JdbcProviderName=wpdbJDBC_db2


  • The wkplc_comp.properties is the main file for database configuration. It defines what datasource and database name should be used for each of the portal database domains. These are the values that i set for RELEASE domain. Similarly change values for other 6 domains



  • Once your done setting the wkplc_dbtype.properties you should validate your configuration by executing these two configuration commands

    ConfigEngine.bat validate-database-driver
    ConfigEngine.bat validate-database-connection


  • If the validation is successful then first stop the WebSphere Portal server and then execute ./ConfigEngine.sh database-transfer command to transfer data. In my case it took close to 40 minutes to finish the database transfer

  • Once the database transfer is completed successfully start the WebSphere Portal server and try login in into to see if it works

No comments:

Post a Comment