Portal, V6.1
Configure JCR collation support
This section provides information on setting up JCR collation to work with your DB2 database.
- Prerequisites
- Installing DB2
- Create users
- Creating remote databases
JCR collation is not supported on IBM DB2 Universal Database for z/OS®, IBM DB2 for i5/OS™, and Apache Derby. This means that if the JCR collation function sortkey() is invoked on one of these database platforms, the collation specified in the second argument to the function has no effect. The result of the function is the same as its first argument. The behavior is governed by the underlying database.
- Stop the WebSphere Portal server:
- stopServer.bat WebSphere_Portal -username adminid -password passwd
- Set up collation on the database where the JCR domain is located.
- Change to the directory db2home\function.
- Execute the command jar xvf portal_server_root\jcr\prereq.jcr\config\collation.jar.
- Change to the directory portal_server_root\jcr\prereq.jcr\config\.
- 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. If running in a clustered environment, modify the following settings:
- Change "VALUE VARCHAR(32672)," to "VALUE VARCHAR(100),"
- Change "RETURNS VARCHAR(32672) FOR BIT DATA" to "RETURNS VARCHAR(100) FOR BIT DATA".
.
- Connect to the JCR database.
- Execute the script by running the command db2 -tvf registerCollationUDFTemplate.sql.
- Disconnect from the JCR database.
- Restart the DB2 instance.
- Verify that the UDF is registered properly.
- From the command line, type the command db2 connect to JCRDB userid using password.
- Execute the command db2 values schema.sortkeyj('abc','en'), where schema is the schema under which sortkeyj was registered. If the commands complete successfully, the UDF is registered correctly
- Edit the icm.properties 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- Start the WebSphere Portal server: startServer.bat WebSphere_Portal
Parent topic
Configure WebSphere Portal to use DB2
Previous topic:
Creating remote databasesNext topic:
Assigning custom table spaces