Procedure for changing the maximum DB2® log capacity
Do
this as follows:
- Log on to the computer where the HCL Workload Automation DB2® server is installed, as the DB2® instance owner (UNIX™) or DB2® Administrator (Windows™).
- Open a DB2® command line window or shell, as follows:
- UNIX™
- Follow these steps:
- 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)
- Launch the command . ./db2profile
- Windows™
- Select from the Start menu, Programs → IBM DB2 → Command Line Tools → Command Window
- Run the
following commands:
where: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>
- <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.
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:- Increase 320 MB by 25%, giving 400 MB
- 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.
- 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.
- Determine how many secondary log files are required. If you follow the 50% guideline you will need a LOGSECOND value of 40.
- Log on to the computer where HCL Workload Automation is
installed as the following user:
- UNIX™
- root
- Windows™
- Any user in the Administrators group.
- Access the directory: <TWS_INSTALLATION_PATH>\server_<wauser>\appservertools
- Stop the WebSphere Application Server Liberty Base using the conman stopappserver command (see Starting and stopping the application server and appservman)
- On
the computer where the DB2® server
is installed, stop and start DB2®,
as follows:
- Ensure that no other applications are using this instance of DB2®, or if they are that they can be stopped.
- Issue the following command:
db2stop
- 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"
- Start the WebSphere Application Server Liberty Base using the conman startappserver command (see Starting and stopping the application server and appservman)