Manual:IBM DB2

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

MediaWiki 1.15 was released with partial DB2 support. Improved DB2 support is in the development trunk and is slated for the 1.16 release. Current builds are linked below.

Prerequisites

 * IBM DB2 9.7 (required for implicit casting support)
 * MediaWiki 1.16alpha (1.15.x has major bugs)
 * ibm_db2 1.8.0 or better (Windows build)

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 LITERALS IMMEDIATE db2stop force db2start

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 email User:Leonsp or post on the WikiTech-l mailing list.