IBM Worklight v5.0.5 > WL server administration > TroubleshootingSet up the DB2 database manually
IBM Worklight V5.0.5. automatically configures the databases. However, if you are using an older version of IBM Worklight, or if you are experiencing problems with the automatic configuration process, manually set up and configure your DB2 database.
- Create the database schema:
- Create a system user worklight in a DB2 admin group such as DB2USERS. Give it the password worklight.
DB2 has a user name and password length limit of 8 characters for Unix and Linux systems, and 30 characters for Windows.
- Open a DB2 command line processor, with a user that has SYSADM or SYSCTRL permissions:
On Windows systems, click...
Start | IBM DB2 | Command Line Processor
On Linux or UNIX systems
cd db2_install/sqllib/bin
./db2
- Create a database called WRKLGHT:
CREATE DATABASE WRKLGHT COLLATE USING SYSTEM PAGESIZE 32768
CONNECT TO WRKLGHT
GRANT CONNECT ON DATABASE TO USER worklight
QUIT- Create the WRKLGHT tables:
db2 CONNECT TO WRKLGHT USER worklight USING worklight
db2 -vf worklight_home/path_to_script/ createworklight-db2.sql –t
- Create a database called WLREPORT:
CREATE DATABASE WLREPORT COLLATE USING SYSTEM PAGESIZE 32768
CONNECT TO WLREPORT
GRANT CONNECT ON DATABASE TO USER worklight
QUIT- Create the WLREPORT tables:
db2 CONNECT TO WLREPORT
db2 -vf WKLT_HOME/WorklightServer/databases/create-worklight-reports-db2.sql -t
- Create a worklight.properties file.
Give the file the following contents, depending on whether you are using JDBC or JNDI.
- JDBC version:
wl.db.jndi.name=
wl.db.type=DB2
wl.db.url=jdbc:db2://server:50000/WRKLGHT
wl.reports.db.type=DB2
wl.reports.db.url=jdbc:db2://server:50000/WLREPORT
wl.db.username=worklight
wl.db.password=worklight
reports.exportRawData=true- JNDI version
wl.db.jndi.name=jdbc/WorklightDS wl.reports.db.jndi.name=jdbc/WorklightReportsDS wl.db.type=DB2 wl.db.username=worklight wl.db.password=worklight
- Replace...
WEB-INF/classes/conf.worklight.properties
...in worklight.war with the file you created in the previous step.
Parent Troubleshooting