This article documents steps on how to start Liferay DXP on IBM DB2 10.5.
Resolution
Creating a Database
- Start DB2 Command Line Process Plus.
- Enter the following:
create database dxp pagesize 32768 USING CODESET UTF-8 TERRITORY US
- Note 1: Specify the
Territory
with the subscriber's specific country. - Note 2: The property
temporary tablespace managed by automatic storage
is optional. (By default IBM DB2 uses automatic storage and works in most cases, unless there is a storage group.)
- Note 1: Specify the
- Because of the errors described in the IBM documentation (see below in the Additional Info section), enter the following:
update database configuration for dxp using LOGFILSIZ 10000
update database configuration for dxp using LOGPRIMARY 80
update database configuration for dxp using LOGSECOND 40
restart database dxp
Note: Substitute the value of dxp for the name of database.
Note: DB2 does not require semi-colons at the end of each command.
Connecting the Database
- Obtain the necessary jars. The jars are available in the
\..\IBM\SQLLIB\java
folder.- Copy the
db2jcc.jar
anddb2jcc_license_cu.jar
into the folder with the other dependencies. - If using Apache Tomcat, place them in the
lib\ext
folder.
- Copy the
- Place the
db2jcc4.jar
in the globallib
folder (not in thelib\ext
folder or else there will be errors). - Enter the following in the
portal-ext.properties
file:jdbc.default.driverClassName=com.ibm.db2.jcc.DB2Driver jdbc.default.url=jdbc:db2://{IP address}:50000/{database name}:deferPrepares=false;fullyMaterializeInputStreams=true;fullyMaterializeLobData=true;progresssiveLocators=2;progressiveStreaming=2; jdbc.default.username=db2admin jdbc.default.password={password} custom.sql.function.isnull=CAST(? AS VARCHAR(32672)) IS NULL custom.sql.function.isnotnull=CAST(? AS VARCHAR(32672)) IS NOT NULL
- Save the
portal-ext.properties
file. - Start the application server. At this point, Liferay DXP is deployed on IBM DB2 version 10.5
Note: Substitute the value of database's IP address or use localhost.
Note: Substitute the values for the database name, username and password.
Additional Information
- See LPS-53451 for the rationale about the
pagesize
increase from 8k to 32768. - See this IBM article on Tuning transaction log characteristics
- See this IBM article on this error: ADM1541W ADM1823E messages and Server crashes
Contenido exclusivo para suscriptores.
Una Suscripción Enterprise de Liferay proporciona acceso a más de 1.500 artículos que incluyen las mejores practicas, diagnóstico de problemas y otras soluciones útiles. Inicia sesión para tener un acceso completo.
Inicia sesión