DB2 10.5 for Linux, UNIX, and Windows

db2pdcfg - Configure DB2 database for problem determination behavior command

Sets flags in the DB2® database memory sets to influence the database system behavior for problem determination purposes.

Authorization

One of the following authority levels is required:
  • The SYSADM authority level.
  • The SYSCTRL authority level.
  • The SYSMAINT authority level.
  • The SYSMON authority level.
When only the SYSMON authorization level is granted, the following parameters do not work unless the status suboption is specified:
  • catch
  • cos
  • dbcfg
  • dbmcfg
  • fodc
  • trapresilience
Note: On Windows, you must have administrator authority to use the db2pdcfg command.

Required connection

There is no minimum connection requirement. However, if a database scope option is specified, that database must be active before the command can return the requested information.

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-db2pdcfg----------------------------------------------------->

>--+-------------------------------------------------------------+-->
   '- -catch--+-----------+--| Action options |--+-------------+-'   
              +-clear-----+                      '-count=count-'     
              +-status----+                                          
              '-errorCode-'                                          

>--+---------------------------+-------------------------------->
   '- -cos--+----------------+-'   
            +-status---------+     
            +-on-------------+     
            +-off------------+     
            +-sleep=numsec---+     
            +-timeout=numsec-+     
            +-count=count----+     
            '-SQLO_SIG_DUMP--'     

>--+---------------------------+-------------------------------->
   '- -dbmcfg--+-------------+-'   
               |       .-0-. |     
               '-xml=--+---+-'     
                       '-1-'       

>--+--------------------------------------------------+--------->
   '- -dbcfg--+-------------+--+--------------------+-'   
              |       .-0-. |  +-database--database-+     
              '-xml=--+---+-'  '-alldatabases-------'     
                      '-1-'                               

>--+------------------------------------------+----------------->
   |         .-status-----------------------. |   
   '- -fodc--+------------------------------+-'   
             +-FODCPATH=fodc_path_name------+     
             +-reset------------------------+     
             +-DUMPCORE=--+-AUTO-+----------+     
             |            +-ON---+          |     
             |            '-OFF--'          |     
             +-DUMPDIR=--dirpath------------+     
             +-CORELIMIT=--size-------------+     
             '-SERVICELEVEL=--+-AUTOMATIC-+-'     
                              +-BASIC-----+       
                              '-FULL------'       

>--+-------------------------------------+---------------------->
   '- -fixstack--existing_stack_filename-'   

>--+----------------------------------------------------+------->
   |  (1)                                               |   
   +------- -global--+--------------------------------+-+   
   |                 '--dbp database_partition_number-' |   
   |         .-,--------.                               |   
   |         V          |                               |   
   +- -host----hostname-+-------------------------------+   
   |             .-,------------------------------.     |   
   |             V                                |     |   
   '- -member--+---member_number--|--member_range-+-+---'   
               '-all--------------------------------'       

>--+----------------------------------------+------------------><
   '- -trapresilience--+------------------+-'   
                       '-threshold=number-'     

Action options

   .-stack-.  .-db2cos-.                   
|--+-------+--+--------+--+------------+------------------------>
                          '-stopdb2trc-'   

>--+-------------------+--+-------------------+-----------------|
   '-lockname=lockname-'  '-locktype=locktype-'   

Notes:
  1. The -global parameter has been deprecated. You can use the -member all parameter options to obtain information globally.

Command parameters

-catch
Instructs the database manager to catch an error or warning.
clear
Clear any catch flags that are set.
status
Display any catch flags that are set.
errorCode
Catch specific flags that are set.
Possible errorCode options are:
  • sqlCode[,reasonCode] / sqlCode=sqlCode[,reasonCode]
  • ZRC (hex or integer)
  • ZRC #define (such as SQLP_LTIMEOUT)
  • ADM (such as ADM1611)
  • String (such as diagstr="Hello World")
  • ECF (hex or integer)
  • "deadlock" or "locktimeout"
Catching specific flags that you specify, such as an administration notification message (ADM1611) or any string ("Hello World") observed in the db2diag log, causes the db2cos script to dump out this information.
Note: If you intend to specify a string for diagstr option with quotation marks on a remote member, use "\" with the quotation marks. For example, on remote member 5 the command would be:
db2pdcfg -catch diagstr=\"Hello World\" -member 5
stack
Produce stack trace in db2diag log file. Default.
db2cos
Run the db2cos callout script found in the bin directory. Default.
stopdb2trc
Stop db2trc command.
lockname=lockname
Lockname for catching specific lock (lockname=000200030000001F0000000052).
locktype=locktype
Locktype for catching specific lock (locktype=R or locktype=52).
count=count
The number of times the database manager executes db2cos during a database manager trap. The default is 255.
-cos
Instructs the database manager how to invoke the db2cos callout script upon a database manager trap.
status
Print the status.
off
Turn off the database manager call to db2cos during a database manager trap.
on
Turn on the database manager call to db2cos during a database manager trap.
sleep=numsec
Amount of time to sleep between checking the size of the output file generated by db2cos. The default is 3 seconds.
timeout=numsec
Amount of time to wait before assuming db2cos script has completed. The default is 30 seconds.
count=count
The number of times to execute db2cos during a database manager trap. The default is 255.
SQLO_SIG_DUMP
Enable db2cos execution when SQLO_SIG_DUMP signal is received.
-dbmcfg
Sets DBM Config Reserved Bitmap. This option is password protected which can be obtained from IBM DB2 Service.
xml=0 | 1
Values 0 (default) or 1 (instance has xml data).
-dbcfg
Sets Database Config Reserved Bitmap. This option is password protected which can be obtained from IBM DB2 Service.
xml=0 | 1
Values 0 (default) or 1 (database has xml data).
-fodc
Sets flags in the DB2 database memory sets. This influences the database system behavior during problem determination situations involving first occurrence data collection (FODC).

The supported -fodc options with their potential values and defaults are:

reset
Restore all the FODC options to their defaults.
status
Display status of all FODC options. This is a default option, that is, FODC status will be displayed when db2pdcfg is invoked without parameters.
FODCPATH=fodc_path_name
Specifies the full path name of an existing directory where the FODC data package is created. The path you specify must be writable by the members on the machine and by the fmp processes running on the member or partition.
DUMPCORE=
Enables or disables core file generation on only UNIX and Linux operating systems.
AUTO
Core file is generated if trap cannot be sustained and instance is shut down.
ON
Enables core file generation and overrides DB2RESILIENCE registry variable setting.
OFF
Disables core file generation.
DUMPDIR=dirpath
Specifies absolute path name of the directory where core file is created.
CORELIMIT=size
The maximum size of core files created. This value will override the current core file size limit setting. A default value of unlimited is enforced. Consideration should be given to the available file system space because core files can be quite large. The actual size is dependent on the DB2 configuration and the state of the process at the time the problem occurs.

If CORELIMIT is to be changed using db2pdcfg, it is subject to the usual UNIX access permissions and in some cases CORELIMIT will not be able to exceed your ulimit setting. Use DB2FODC registry variable to change that value on db2start or use large ulimit setting before starting DB2 product.

SERVICELEVEL=
Specifies how data is collected during panics, traps, or errors that might indicate data corruption. The default behavior setting is AUTOMATIC. Note that dynamically setting either BASIC or FULL overrides any previous DUMPCORE settings, so if you want to keep it as it is, you have to specify it as a part of your db2pdcfg setting. Setting this dynamically does not affect the CF unless the CF is restarted through a failure or if it was stopped and restarted intentionally. The following options are supported for this parameter:
AUTOMATIC
This setting specifies that the effective SERVICELEVEL setting (that is, BASIC or FULL) is to be chosen at runtime, for the members, and at start time, for the CF process. At present, the only times that BASIC is chosen are for DB2 pureScale® environments that have multiple members and for trap resilience.
BASIC
This SERVICELEVEL setting specifies that a minimal amount of FODC data is to be dumped. Core dump processing is disabled by default (but can be overridden by the COREDUMP setting), diagnostics are restricted to the affected thread only, and callout scripts are disabled.
FULL
This SERVICELEVEL setting specifies that the maximum amount of FODC data is to be dumped. This includes core dumps, any associated components dumps, and the invocation of the callout scripts. In addition, there is no attempt to sustain traps.
-fixstack existing_stack_filename
Reads an existing stack file and generates a new file in the same location, with the same file name, but with an additional .fmt file extension. The new .fmt file generated will have improved symbol details on some of the frames in the stack trace if the library where the symbol is defined is available when running this command.
Note: Only applicable on Linux operating systems.
-global
Specifies that db2pdcfg will also be run on remote hosts. If the -file parameter is specified, a single file consisting of all the individual files from remote host will be created on the computer from where you issued the db2pdcfg command.
Note: This command parameter is available in DB2 Version 9.8 Fix Pack 3 and later fix packs. This command parameter is deprecated in DB2 Version 9.7 Fix Pack 4 and later fix packs.
-dbp database partition number
Specifies that db2pdcfg will be run on the remote host of the specified database partition. If no database partition is specified with the -global option, db2pdcfg will run on all remote hosts.
-host hostname
Specifies the host or hosts on which the command is issued. The command is issued for all members that reside on the host. If this option is not specified, the command is issued on the local host. If multiple hosts are specified, all host names must be valid for the command to complete. This option cannot be specified together with the -member option.
-member member_number | member_range
Specifies the member or members on which the command is issued. If this option is not specified, the command is issued on the current member. Multiple members can be specified as a comma separated list of member_number (member1, member2), or using member_range, where member_range is a range of members (member1-member3), or using any combination of the first two methods. This option cannot be specified together with the -host option.
all
Specifies that the command is issued on all members, including members on remote hosts.
-trapresilience
This option displays or modifies trap resilience parameters for problem determination purposes.
The following is a sample output when this option is specified:
DB2 trap resilience is enabled. 
   Current threshold setting :  0 (threshold disabled) 
   Number of traps sustained :  0
threshold=number
Default value: 0 (threshold disabled)
Minimum value: 0
Maximum value: 4294967295

Specifying a number after the threshold= option sets the upper limit of traps which will be sustained for the life of the instance. When this threshold is surpassed, the instance will be stopped regardless if the next trap could have been sustained.

The following is a sample output when this option is specified:
db2pdcfg -trapresilience threshold=1

DB2 trap resilience threshold is set to 1

Examples

To display the current FODC package settings on members 11, 12, 13, and 15:
db2pdcfg -fodc status -member 11-13,15
To direct the FODC package to a directory on the local host:
db2pdcfg -fodc FODCPATH=/home/hotel49/user/FODC/FODClocal

Usage notes

db2pdcfg is a method for dynamically changing (online) the FODC options.

Since db2pdcfg sets flags in the DB2 database memory, changes done with the db2pdcfg tool will be active only while the instance is up. In order to make the changes permanent, use the DB2FODC registry variable.

In the -fodc option, some of the settings are specified with the format variable=value. Multiple options can be specified in a single command line:
db2pdcfg -fodc DUMPCORE=ON -fodc CORELIMIT=8GB
Alternatively, several settings can be concatenated in a single command line string using spaces:
db2pdcfg -fodc DUMPCORE=ON CORELIMIT=8GB
Executing the db2pdcfg command, without any options, provides the following informative summary output with respect to trap resilience (highlighted in bold):
$ db2pdcfg
Current PD Control Block Settings:

All error catch flag settings cleared.


db2cos is enabled for engine traps.
PD Bitmap: 0x1000
Sleep Time: 3
Timeout: 300
Current Count: 0
Max Count: 255

Current bitmap value: 0x0



Instance is not in a sleep state

DB2 trap resilience is enabled.
Current threshold setting : 0 ( disabled )
Number of traps sustained : 0


Database Member 0

FODC (First Occurrence Data Capture) options:
Dump directory for large objects (DUMPDIR)= /home/hotel85/vivmak/sqllib/db2dump/
Dump Core files (DUMPCORE)= AUTO
Current hard core file size limit = Unlimited
Current soft core file size limit = 0 Bytes