Troubleshooting
Problem
Automatic logging with DB2 archiving the logs to the Tivoli Storage Manager Server, gets an RC=186 error and there are errors in the db2diag.log.
Cause
An invalid include statement was causing the archive to fail during the initial bind query which checks the mgmtclass.
Diagnosing The Problem
When attempting to perform automatic logging with DB2 to archive the logs to the Tivoli Storage Manager Server, an RC=186 error is being witnessed and the following errors are in the db2diag.log.
MESSAGE : Failed to archive log file S0000000.LOG to TSM chain 0 from
/opt/db/db2/log/NODE0000/ with rc = 11.
...
FUNCTION: DB2 UDB, data protection, sqlpgRetryFailedArchive, probe:4780
MESSAGE : Still unable to archive log file 0 due to rc 11 for LOGARCHMETH1
using method 2 and target DB2LOGS.
However, when looking at the DB2LOGS mgmtclass on the Tivoli Storage Manager server, there is a DB2LOGS archive copy group defined and activated.
Resolving The Problem
The LOGARCHMETHx within the DB2 cfg has the capability to explicitly specify which management class the log archive will be bound to. For example:
(LOGARCHMETH1) = TSM:DB2LOGS
Where the "DB2LOGS" value is the management class that the DB2 archive log will be bound to and needs to have an archive copy group. This "DB2LOGS " value is an override for the management class which is applied to the log when it is sent to the Tivoli Storage Manager Server for storing. However, this override value is not utilized during the initialization of the session to save the logs to the Tivoli Storage Manager server and attempts to use the default or the include list from the options file.
If the default mgmtclsss or an include statement does not specify a management class that has an archive copy group, then a Return Code 186 - No Archive Copy Group will be witnessed. DB2 will subsequently output this as an error 11 (SQLUV_INIT_FAILED 11 /* Initialization failed */).
The DB2 log manager uses the following naming convention when storing DB2 log files as archives on the Tivoli Storage Manager server:
NODE_NAME: <TSM node name>
FILESPACE_NAME: /DBNAME (replace DBNAME with the database name)
HL_NAME: /NODE0000 (replace with the actual node #)
LL_NAME: /Cyyyyyyyy_S0000000.LOG
- Cyyyyyyy is the log chain
- Snnnnnnn is the log number
The include statement needs to accommodate the log chain prefix for the name, for example:
include /.../C*_S*.LOG DB2LOGS
A more generic include statement could also be used:
include /.../* DB2LOGS
Product Synonym
TSM
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21255485