Manual:IBM DB2

The purpose of this page is to collect information and experiences about running MediaWiki on IBM DB2.

MediaWiki might support IBM DB2 starting with 1.15 (scheduled for May 2009). Code for this is currently in the trunk.

There may be issues with maintenance scripts and some of the special pages, which tend to use hard-coded SQL instead of the MW database API.

Prerequisites

 * IBM DB2 9.7 (required for implicit casting support)
 * MediaWiki 1.15.? (1.15.1 has some issues. Fix in progress)
 * ibm_db2 1.8.0 or better

Database Creation
Before you can run the MediaWiki web installer, you have to create a database for MediaWiki to hold its data. In the commands below, wikidb is the name of the database. If you are using the command line, you will have to issue the commands in a single line each.

db2 CREATE DATABASE wikidb AUTOMATIC STORAGE YES USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM PAGESIZE 32768

Enable the statement concetrator, which should get you the performance benefits of prepared statements without changing the MediaWiki codebase to use prepared statements everywhere

db2 CONNECT TO wikidb db2 UPDATE DATABASE CONFIGURATION USING STMT_CONC 1 IMMEDIATE

Assuming DB2 Text Search is installed, enable the database for Full Text Search indexing. The following is a command line command.

db2text ENABLE DATABASE FOR TEXT CONNECT TO wikidb

SQL data types
If you see something that doesn't match the above table, please submit a bug.:-)