Determining actual DB2 log file usage
The following is the procedure to verify how much space was used
by a successful instance of the JnextPlan command:
- After JnextPlan has run, log on to the computer where the Tivoli Workload Scheduler 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 command:
where "TWS" must be changed to the actual database name if differentdb2 "get snapshot for database on TWS" > snapdb.txt
- Open the snapdb.txt file and look for a section
like this:
Log space available to the database (Bytes)= 244315359 Log space used by the database (Bytes) = 484641 Maximum secondary log space used (Bytes) = 0 Maximum total log space used (Bytes) = 581636 Secondary logs allocated currently = 0
The value shown in "Maximum total log space used" is the actual space used for the DB2 logs. This space should be allocated to DB2 using primary log files only: therefore, you should change the number of primary log files and their size as necessary to meet this requirement as a minimum.
In addition, you are recommended to allocate a secondary log space to DB2. A good choice for the secondary log files is half the number allocated for the primary files.