DB2 - Problem description
Problem IT21795 | Status: Closed |
SOME EXTRA LOG FILES REMAIN IN MIRRORLOGPATH AFTER CHANING LOGPRIMARY AND/OR LOGSECOND IN CIRCULAR LOGGING MODE | |
product: | |
DB2 FOR LUW / DB2FORLUW / B10 - DB2 | |
Problem description: | |
The log files in the Active log path are reset to the newly configured number of log files, but the log files in the Mirror log path are not reset, after LOGPRIMARY and/or LOGSECOND are changed in the Circular logging mode. At the result, the extra and useless log files remain in the Mirror log path if there are larger number of log files in the Mirror log path than sum of the configured LOGPRIMARY and LOGSECOND. A workaround is to remove the extra log files in the Mirror log path after db2stop properly ends when the database is in a consistent state. The following is a sample case. $ db2 get db cfg for D105Q07A | grep -i log Log retain for recovery status = NO User exit for logging status = NO Catalog cache size (4KB) (CATALOGCACHE_SZ) = 300 Log buffer size (4KB) (LOGBUFSZ) = 2149 Log file size (4KB) (LOGFILSIZ) = 1024 Number of primary log files (LOGPRIMARY) = 10 Number of secondary log files (LOGSECOND) = 4 Changed path to log files (NEWLOGPATH) = Path to log files = /db1/db2inst1/DB/db2inst1/NODE0000/SQL00003/LOGSTREAM0000/ Overflow log path (OVERFLOWLOGPATH) = Mirror log path (MIRRORLOGPATH) = /db1/db2inst1/DB/LOG/D105Q07A/MIRROR/NODE0000/LOGSTREAM0000/ $ db2 update db cfg for D105Q07A using LOGBUFSZ 4 LOGFILSIZ 4 LOGPRIMARY 6 LOGSECOND 2 $ db2 get db cfg for D105Q07A | grep -i log Log retain for recovery status = NO User exit for logging status = NO Catalog cache size (4KB) (CATALOGCACHE_SZ) = 300 Log buffer size (4KB) (LOGBUFSZ) = 4 Log file size (4KB) (LOGFILSIZ) = 4 Number of primary log files (LOGPRIMARY) = 6 Number of secondary log files (LOGSECOND) = 2 Changed path to log files (NEWLOGPATH) = Path to log files = /db1/db2inst1/DB/db2inst1/NODE0000/SQL00003/LOGSTREAM0000/ Overflow log path (OVERFLOWLOGPATH) = Mirror log path (MIRRORLOGPATH) = /db1/db2inst1/DB/LOG/D105Q07A/MIRROR/NODE0000/LOGSTREAM0000/ ... run some SQL activities ... $ db2pd -db D105Q07A -logs Database Member 0 -- Database D105Q07A -- Active -- Up 0 days 00:03:35 -- Date 2016-03-01-22.12.49.909829 Logs: Current Log Number 6 Pages Written 2 Cur Commit Disk Log Reads 0 Cur Commit Total Log Reads 0 Method 1 Archive Status n/a Method 1 Next Log to Archive n/a Method 1 First Failure n/a Method 2 Archive Status n/a Method 2 Next Log to Archive n/a Method 2 First Failure n/a Log Chain ID 0 Current LSO 45039885 Current LSN 0x000000000003E481 Address StartLSN StartLSO State Size Pages Filename 0x0A00020011063658 000000000003E0FF 44966433 0x00000000 4 4 S0000002.LOG 0x0A00020011063FB8 000000000003E1C6 44982737 0x00000000 4 4 S0000003.LOG 0x0A00020011064918 000000000003E28E 44999041 0x00000000 4 4 S0000004.LOG 0x0A00020011065278 000000000003E355 45015345 0x00000000 4 4 S0000005.LOG 0x0A000200202ECED8 000000000003E41C 45031649 0x00000000 4 4 S0000006.LOG 0x0A00020020302F98 0000000000000000 45047953 0x00000000 4 4 S0000007.LOG 0x0A00020011062398 0000000000000000 45064257 0x00000000 4 4 S0000000.LOG 0x0A00020011062CF8 0000000000000000 45080561 0x00000000 4 4 S0000001.LOG $ ls -l /db1/db2inst1/DB/db2inst1/NODE0000/SQL00003/LOGSTREAM0000/ total 384 -rw------- 1 db2inst1 build 24576 Mar 01 22:10 S0000000.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:10 S0000001.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000002.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000003.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000004.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000005.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000006.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000007.LOG $ ls -l /db1/db2inst1/DB/LOG/D105Q07A/MIRROR/NODE0000/LOGSTREAM0000/ total 16808 -rw------- 1 db2inst1 build 24576 Mar 01 22:10 S0000000.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:10 S0000001.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000002.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000003.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000004.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000005.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000006.LOG -rw------- 1 db2inst1 build 24576 Mar 01 22:12 S0000007.LOG -rw------- 1 db2inst1 build 4202496 Mar 01 22:07 S0000008.LOG -rw------- 1 db2inst1 build 4202496 Mar 01 22:07 S0000009.LOG -rw------- 1 db2inst1 build 512 Mar 01 22:07 SQLLPATH.TAG | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 11.1 Modification 2 FixPack 2 or * * later * **************************************************************** | |
Local Fix: | |
To remove the extra log files in the Mirror log path after db2stop properly ends when the database is in a consistent state | |
Solution | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : IT14236 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 04.08.2017 12.10.2017 12.10.2017 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |