Tivoli Workload Automation, Version 9.2

Procedure for changing the maximum DB2 log capacity

Do this as follows:
  1. Log on to the computer where the Tivoli Workload Scheduler DB2® server is installed, as the DB2 instance owner (UNIX) or DB2 Administrator (Windows).
  2. Open a DB2 command line window or shell, as follows:
    UNIX
    Follow these steps:
    1. Issue the command su - db2inst1, or change to the subdirectory sqllib of the home directory of the owner of the DB2 instance (by default db2inst1)
    2. Launch the command . ./db2profile
    Windows
    Select from the Start menu, ProgramsIBM DB2Command Line ToolsCommand Window
  3. Run the following commands:
    db2 update db cfg for <database_name> using LOGFILSIZ <log_file_size>
    db2 update db cfg for <database_name> using LOGPRIMARY <primary_log_files>
    db2 update db cfg for <database_name> using LOGSECOND <secondary_log_files>
    where:
    <database_name>
    The name of the database:
    • If you are running this from the computer where the DB2 server is installed, the installed default name is TWS. Supply this value unless you have changed it.
    • You are not recommended to run this procedure from the computer where the DB2 client is installed, but if you do so, the installed default name is TWS_DB. Supply this value unless you have changed it.
    <log_file_size>
    The log file size in 4 KB pages. The default is 1000 (hence the default log file size of 4MB). Look in the DB2 documentation for details of the implications of choosing a larger or a smaller log file size. The maximum value is 262 144 (making the maximum log file size about 1 GB).
    <primary_log_files>
    The number of primary log files. The default is 40. The total maximum number of log files that DB2 can handle (primary and secondary) is 256. Thus, there is a maximum limit of 256 GB for the log, or approximately 256 million Job Scheduler instances! (maximum 256 files x 1 GB maximum file size)
    <secondary_log_files>
    The number of secondary log files. The default is 20. If there is enough free space on the file system, these additional log files are dynamically allocated by DB2 as needed (with a small impact on the performance of JnextPlan). Because these are only created if required, it is preferable to increase the number of secondary files, rather than the primary files. Typically, you allocate 50% of the primary log file value.
    In making the calculation to allocate the log files, allow at least 25% more space than you think you require, to avoid that any slight miscalculation causes JnextPlan to fail.
    Example: if you have determined from the procedure described in Determining actual DB2 log file usage that JnextPlan has a current use of 320 MB, you could calculate as follows:
    1. Increase 320 MB by 25%, giving 400 MB
    2. Determine if you want more log files, or bigger log files, or both, by reference to the DB2 documentation. For example, you could choose to allocate 40 files with a size of 10 MB, 80 files with a size of 5 MB, or 100 files with a size of 4 MB. For the sake of this example, assume you have chosen 80 files with a size of 5 MB, so your LOGPRIMARY value will be 80.
    3. Determine the log file size in 4 KB pages to give a log file size of 5 MB - your LOGFILSIZ value will thus be 1250.
    4. Determine how many secondary log files are required. If you follow the 50% guideline you will need a LOGSECOND value of 40.
  4. Log on to the computer where Tivoli Workload Scheduler is installed as the following user:
    UNIX
    root
    Windows
    Any user in the Administrators group.
  5. Access the directory: <TWA_home>/wastools
  6. Stop the WebSphere Application Server using the conman stopappserver command (see Starting and stopping the application server and appservman)
  7. On the computer where the DB2 server is installed, stop and start DB2, as follows:
    1. Ensure that no other applications are using this instance of DB2, or if they are that they can be stopped.
    2. Issue the following command:
      db2stop
    3. Issue the following command:
      db2start
    Note: It is strongly recommended that you stop and start DB2. If this is a problem for you, you must at least disconnect all applications from the DB2 instance and reconnect them. DB2 will apply the new parameters when you reconnect. If necessary, use the following command to force the disconnection of all open connections:
    db2 "force application all"
  8. Start the WebSphere Application Server using the conman startappserver command (see Starting and stopping the application server and appservman)