Installing > Installing a Development Environment > Planning the installation

DB2 database encoding options

If you plan to install DB2, read this important background information about issues with DB2 database encoding and related sizing information. During a DB2 installation, you must identify your requirement for SBCS or MBCS data. Depending on your choice, you might have to complete some extra post-configuration steps before you build the Curam database.


What is the issue?

For a multi-byte character set (MBCS) or encoding, DB2 processes columns by their byte size, not their character length. Therefore, for multi-byte characters, a CHAR, VARCHAR, or CLOB column might store fewer characters than the column length specification indicates, depending on the actual character length.

Consider the following example:

For the single-byte data, the string fits and processing is successful. For the multi-byte data, the string does not fit, resulting in overflow errors at run time. An IBM Curam Social Program Management web client usually captures and reports field size errors in a user-friendly manner. In this case, the user receives an "un-handled server exception" error, which is an underlying SQL Code -302 error. This is because the client does not capture this size mismatch as it checks the number of characters, and not the byte length.


How Curam addresses the issue

Curam provides modeling and build-time capabilities to resize its database columns to address this issue. These capabilities are described further in the Curam Modeling Reference Guide and Curam Server Developer's Guide.

As Curam provides support for multiple languages, support for MBCS data is enabled by default with the maximum expansion set. These expansion settings are appropriate to ensure that new users, testing environments, and so on, do not encounter any errors because of their language, encoding, and database sizing. Also, users can find they require MBCS data when they import or paste data from other applications into their Curam system. However, these defaults might not be appropriate for all environments. The following section describes some considerations for changing these expansion settings.


What you must consider

It is important to carefully consider your data encoding requirements regarding DB2 and Curam to avoid unexpected behavior with how the database stores characters.

The preceding example represents a boundary case in that the data length matches the maximum column width. In many cases it is unlikely that, even with MBCS characters, an overflow situation will occur. Most data does not reach the maximum defined size. However, you must be prepared for the possibility of these error situations.

Use the database character set encoding appropriate to your application and environment. If possible, consider using an SBCS and encoding that supports your requirements. For example, CP1252 supports most Western European characters. However, CP1252 (or other SBCS encodings) might not support characters from different or "broader" character sets or encodings (for example, UTF-8) that users might be used to copying and pasting into their browser for Curam.

When installing your DB2 database, you must only identify your requirement for SBCS or MBCS data and be prepared to take appropriate action before you build your Curam database:


Related

IBM DB2 database



Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.