Upgrade Guide > Preparing an IBM DB2 Database for a Siebel Upgrade >

Identifying IBM DB2 Long Columns for Truncation in a Siebel Upgrade

Upgrades from: Siebel 6.x, 7.0.x, & 7.5.x.

Environments: Development, production test, production.

Databases: IBM DB2 only.

This topic is part of an upgrade process. See How to Perform a Siebel Database Upgrade.

In Siebel 7.7, the maximum length for IBM DB2 long columns with a type of varchar was reduced to 16350 from 16383. The upgrade truncates long columns of type varchar that exceed 16,350.

To prevent a data truncation error that may cause transaction processing (txnproc) or transaction routing (txnroute) to fail, perform the following steps to identify these columns and reduce the data in these columns.

CAUTION:  If you do not truncate the data in long varchar columns that exceed the maximum length specified below, a "data truncated" error will occur, and transaction processing and transaction routing may fail.

To identify and reduce the length of long varchar columns

  1. From any shell, open the script chk16350.bat (Windows) or chk16350.ksh (UNIX), and edit the following parameters as appropriate for your deployment:

    SRC_USR = username of the source database

    SRC_PSWD = password for the source database

    SRC_TBLO = tableowner of the source database

    SRC_TBLO_PSWD = tableowner password for the source database

    SRC_ODBC = ODBC data source name of the source database (edit the value "CHANGE_ME")

    SRC_REPOSITORY_NAME = repository name of the source database

    DBSRVR_ROOT = The directory where you installed the Siebel Database Server files on the Siebel Server. For example, C:\sea7xx\dbsrvr (Windows). Edit the value "CHANGE_ME".

    SIEBEL_ROOT = The directory where you installed the Siebel Server. For example, C:\sea7xx\siebsrvr (Windows). Edit the value "CHANGE_ME".

    VALID_RESULTS_DIR = directory where you want the output files to be generated (edit the value "CHANGE_ME"); this must be an existing directory

    This script produces two files:

    • long_trunc_cols.rpt. This report identifies all long varchar columns that are longer than 16,350 characters.
    • update_trunc.sql. This SQL file generates update statements that truncate identified columns to 16,350 characters.
  2. Reduce the data in these columns using either of the following methods:
    • Manually review the columns in the long_trunc_cols.rpt report and manually reduce the size of each column identified.
    • Run update_trunc.sql using the DB2 command line processor.

Upgrade Guide Copyright © 2006, Oracle. All rights reserved.