AIX clustered server: Configure JCR collation support

View the steps to set up JCR collation to work with DB2database. JCR collation is recommended when the language locales of users do not natively collate correctly in the DB2 database and when language locale correct ordering is important.


Prerequisites


AIX clustered server: Install DB2
AIX clustered server: Modify DB2 database properties
AIX clustered server: Create groups and assigning users
AIX clustered server: Create DB2 databases
AIX clustered server: Set up DB2 automatically or manually

  1. Stop the WebSphere Portal server.

      See Start and stopping servers, dmgrs, and node agents for instructions.

  2. Copy the following files from the WebSphere Portal server to a temporary directory on the DB2 server:

      PortalServer/jcr/wp.content.repository.install/lib/wp.content.repository.install.jar

      wp_profile/PortalServer/jcr/config/registerCollationUDFTemplate.sql

  3. Set up collation on the database where the JCR domain is located.

    1. Change to the directory db2_instance_owner_home/sqllib/function.

    2. Run the command:

        db2home/sqllib/java/jdk/bin/jar -xvf temporary location/wp.content.repository.install.jar icm/CollationUDF.class

    3. Change to the temporary directory where you copied the files in a previous step.

    4. Open the file registerCollationUDFTemplate.sql and change all SCHEMA references to the JCR schema; for example, JCR.

        The value set for SCHEMA should match the value set for the jcr.DbSchema property. You specify jcr.DbSchema in the configuration file wkplc_dbdomain.properties when you modify database properties. See Modify database properties for more information.

    5. Run the following command to connect to the JCR database: db2 connect to jcrdb user user_ID using password.

    6. Run the script with the following command:

        db2 -tvf temporary location/registerCollationUDFTemplate.sql

    7. Disconnect from the JCR database.

    8. Restart the DB2 instance.

  4. Verify that the UDF is registered properly.

    1. Log in as the db2instanceID.

      1. Open a DB2 terminal window.

      2. Run the following command: db2 connect to JCRDB user user_ID using password. You must connect to the JCR database as a database runtime user with the user ID and password for the WebSphere Portal JCR data source.

        If the command completes successfully, the UDF is registered correctly as follows: values schema.sortkeyj('abc','en').

  5. Edit the icm.properties file, located in WP_PROFILE/PortalServer/jcr/lib/com/ibm/icm directory. Add the following section to the end of the file:

      		# Enable/Disable collation support for all DB2 platforms
      		# Disabled by default
      		jcr.query.collation.db2.enabled = true
       
      		# Database specific collation mappings
      		# These mappings apply map a Java locale name into a collation name
      		# supported by the underlying database.
      		# Example mappings for DB2 platform
       
      		# English
      		jcr.query.collation.en = en
      	
      		# Swedish
      		jcr.query.collation.sv = sv
       
      		jcr.query.collation.zh = zh
      		jcr.query.collation.de = de
      		jcr.query.collation.da = da
      		jcr.query.collation.hu = hu
      		jcr.query.collation.jp = jp

  6. Start the WebSphere Portal server.

      See Start and stopping servers, dmgrs, and node agents for instructions.


Parent

AIX clustered server: Set up a DB2 database


Previous

AIX clustered server: Set up DB2 automatically or manually


Next topic

AIX clustered server: Configure WebSphere Portal to use DB2

 


+

Search Tips   |   Advanced Search