New in Sugar 6.4 – DB2 LUW support

sugarcrmdevelopers —  February 29, 2012 — 1 Comment

With the advent of release 6.4, SugarCRM will start supporting DB2 LUW for on-premise Enterprise and Ultimate edition customers. Even though upgrades or migrations between different database technologies are not supported as part of the core SugarCRM product line, a manual data migration after the product upgrade is technically possible. Existing customers interested in migrating their current SugarCRM instance to DB2 are encouraged to get in touch with their SugarCRM sales representative or certified partner/specialist.

System Requirements

  • SugarCRM 6.4 or higher, Enterprise or Ultimate on-premise edition
  • DB2 LUW 9.7.4 or higher (Linux, Unix or Windows)
  • PHP 5.2 or 5.3 (latest stable version) with IBM DB2 extension 1.9.1 or higher.

Installation & Setup

Before we go any further, a short word of warning: even though SugarCRM will create its own database schema and is able to keep it up-to-date, having a professional DB2 administrator involved in the deployment and operations of SugarCRM is not a luxury.  Similar to Oracle, having a DBA optimize the database for your company’s dataset and having her/him maintain the database can make a significant performance difference.

The DB2 Database

    1. Though SugarCRM generates its own schema, it still needs a pre-created DB2 database for the installation because of the way DB2 is designed.
    2. The pre-created database needs to have at least 1 table space and buffer with a page size of 8k or bigger for at least 2 tables in the core product.
    3. SugarCRM requires that the DB2 full-text search service is running and that the database is enabled for full-text search.
    4. The OS user which SugarCRMs uses to connect to the database needs:
      1. To be non-expiring
      2. To have admin privileges when installing SugarCRM and when updating the instance using Studio.
      3. To have CRUD permissions + execution permissions on the full-text search stored procedures.
      4. To be the same for installation and operations due to fact that SugarCRM uses the default schema.
      5. Make sure to enable MySQL compatibility mode
        $ db2stop
        $ db2start

The Application Server

From a SugarCRM requirements perspective, he only difference between an application server connecting to DB2 and any other database is that it requires the correct IBM DB2 extension to be installed and configured.

Installing the IBM DB2 PHP extension

Unfortunately installing the required IBM DB2 PHP extension is a bit more complicated than most non-technical people would be willing to endure.


Even though pre-compiled binaries are available for 32-bit Windows, getting and installing the correct drivers is a bit more technical than most Windows users are used to. If you want to use 64-bit PHP you will need to compile the PECL libraries yourself.

You can find a number of pre-compiled drivers here:

Besides having to know the correct PHP version you will also need to know with which version of Visual C++ your PHP distribution was compiled (VC6 or VC9). Note that not all PHP extensions that SugarCRM needs are available in thread-safe (ts) mode, so you want a PHP distribution which is compiled in non-thread-safe (nts) mode (like Zend) and you want to make sure you pick the nts IBM DB2 driver.


At the time of this writing there are no pre-build Linux/Unix packages available with the minimum required version of the IBM DB2 PHP extension. Using PECL is the easiest way to install the latest version of the IBM DB2 extension. Run the following command:

sudo pecl install ibm_db2

Note that additionally to the normal SugarCRM requirements you will also need libaio and php-pear to be installed on the application server.

Activating the IBM DB2 extension

To activate the DB2 extension add the following settings to the php.ini file or to a ibmdb2.ini file:
ibm_db2.instance_name=<instance name>

The ‘ibm_db2.instance_name’ is only required for Linux or Unix and may be omitted for a Windows installation.

For more information see: version 6.4 or higher.

One response to New in Sugar 6.4 – DB2 LUW support


    Amazing ! Thank you for sharing. Great information !

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s