DB2

  1. The following scripts for DB2® are part of the FTM installation. These scripts must be installed on the DB2 server:
    File Description
    MakeCoreDB.cmd Main Windows script to create the database. Optional - contained in FXH_Core_Database_DB2_LUW.zip
    MakeCoreDB.sh Main UNIX script to create the database.
    00-CreateDB-Unix.sh UNIX script to create the database.
    00-CreateDB-Win.cmd Windows script to create the database. Optional - contained in FXH_Core_Database_DB2_LUW.zip
    01-FTMDB.ddl DDL for tables
    02-NewID.sql DDL for sequences, procedures, and functions
    Note: This script can be configured with regards to ID management settings - Generation and Caching, Instance, and Partition support. For more information, see ID Management.
    02a-TimestampFunctions.sql Time stamp and time zone functions
    03-ObjTrig.sql DDL for triggers
    04-Views.sql DDL for views
    05-Indices.sql DDL for indices
    06-UpViewPt.ddl Updatable view definition for Transmission objects
    07-UpViewTxn.ddl Updatable view definition for Transaction objects
    08-UpViewPay.ddl Updatable view definition for Payment objects
    09-UpViewSec.ddl Updatable view definition for Securities objects
    10-UpViewBat.ddl Updatable view definition for Batch objects
    11-UpViewFrag.ddl Updatable view definition for Fragment objects
    12-UpViewActivity.ddl Updatable view definition for Activity objects
    13-ViewSvcPart.ddl DDL for service participant views
    14-ViewsSchedTask.ddl DDL for scheduler task views
    15-ConfigSPs.sql DDL for stored procedures
    16-HistTrigs.sql DDL for triggers
    17-ConfigIDGen.sql ID generation value table entries
    Note: This script can be configured with regards to ID management settings - Generation and Caching, Instance, and Partition support. For more information, see ID Management.
    18-ViewDefns.sql View definition value table entries
    19-Config.sql VALUE table entries for configuration
    Edit one of the following files to include the correct table space definitions, security settings, buffer pool locations, hostname settings, and so on:
    On UNIX:
    00-CreateDB-Unix.sh
    On Windows:
    00-CreateDB-Win.cmd
    Among the parameters set by these files are:
    Parameter type Parameter Default Value Description
    General DB_LOCATION "/db2space/FTM/$1" The path to the disk area where the database is created. The $1 refers to the database name (as passed as a parameter to the database creation file). The base path (without the value of $1) must exist for the database to be created successfully. A warning is given if the full path (including the value of $1) already exists.
    TERRITORY IE The ISO code for the country used as the TERRITORY parameter when the DB2 instance is being created. Ensure this is set correctly for your environment.
    DB_USER wbiserv Change this to the DB2 user who is creating the DB2 instance
    DBHOST localhost Server that DB2 instance is running on
    TCPIP_SVC db2c_db29ins1 To determine TCPIP_SVC use 'db2 get dbm cfg' and look for 'TCP/IP Service name' (SVCENAME)
    BASE_CONTAINER_PATH "/db2space/FTM/db29ins1/$1/" The path to the disk area where the database container files are created.
    Lock LOCKLIST 20000 This value avoids lock escalation from row to table which can lead to deadlocks.
    MAXLOCKS 50  
    Cursor CUR_COMMIT DISABLED This value maintains compatibility with previous versions of DB2.
    Memory Parameters APPLHEAPSZ 2048  
    APP_CTL_HEAP_SZ 1024  
    SORTHEAP 512  
    Log File Parameters LOGBUFSZ 3200  
    LOGFILSIZ 10000  
    LOGPRIMARY 20 As the primary log files are pre-allocated, you require 800 MB of disk space to accommodate them at installation time. Each log file requires 40 MB.
    LOGSECOND 20  
    Note: Many of these settings are different from the standard DB2 defaults. Modify them as required. In 00-CreateDB-Unix.sh, several table space containers are defined. If you use this file, modify the paths to these containers as required. When modifying paths, ensure that these paths exist. The default parameters also include minimum table space sizes to limit the size of the database. These should be revised to ensure that the table space configuration meets the requirements of your system. If this is a production or test system with large volumes, you might also need to change the table space definitions to auto extend as required.
  2. Ensure all the SQL files (that is, files with the extension .sql) that are required to run the following script files are available:
    On UNIX:
    MakeCoreDB.sh
    On Windows:
    MakeCoreDB.cmd
  3. Before running any of the UNIX shell scripts (.sh) for setup, it might be necessary to grant execute privileges to these files with the chmod command.
  4. The scripts must be run by a user that has DB2 administrator rights and has read and write access to the directories that are to be used by the DB2 scripts to create the database.
  5. Run the script MakeCoreDB.sh (on UNIX) or MakeCoreDB.cmd (on Windows). Direct the output to a log file, for example, FTMDB.log. This log file is used for installation verification. The parameters to the scripts are the database name and the schema. For example, enter:
    MakeCoreDB.sh FTMDB FTM > FTMDB.log
    This creates the database FTMDB, the schema FTM, and directs the output of the database creation process to the file FTMDB.log.