Collecting environment information with the db2support command
When it comes to collecting information for a Db2® problem, the most important Db2 utility you need to run is db2support. The db2support command automatically collects all Db2 and system diagnostic information available. It also has an optional interactive "Question and Answer" session, which poses questions about the circumstances of your problem.
About this task
Procedure
Results
The type of information that db2support captures depends on the way the command is invoked, whether the database manager is started, and whether it is possible to connect to the database.
- db2diag log files
- All trap files
- Locklist files
- Dump files
- Various system-related files
- Output from various system commands
- db2cli.ini
- db2dsdriver.cfg
- Active log files
- Buffer pool and table space (SQLSPCS.1 and SQLSPCS.2) control files (with -d option)
- Contents of the db2dump directory
- Extended system information (with -s option)
- Database configuration settings (with -d option)
- Database manager configuration settings files
- First occurrence data capture (FODC) information (with the -fodc and -fodcpath options)
- Log file header file (with -d option)
- Recovery history file (with -d option)
- Formatted data for SYSIBM.SYSTABLES, SYSIBM.SYSINDEXES, and SYSIBM.SYSDATAPARTITIONS system catalog tables (with -d option, the database not activated and the db2support command not in optimizer mode)
- Workload manager (WLM) related information for optimizer mode (with -wlm option)
- Specified system user information (with -su option)
- Specified system group information (with -sg option)
- Text search server (db2tss) configuration and logging information as well as catalog views contents (under SYSIBMTS schema)
- Diagnostic information related to uncompleted online table moves (SYSPROC.ADMIN_MOVE_TABLE).
- Diagnostic data for Db2 pureScale components, such as cluster manager, cluster file system, and RDMA
- Additional diagnostic data for cluster manager (with -cm option)
- Additional diagnostic data for cluster file system (with -cfs option)
- Additional diagnostic data for uDAPL (with -udapl option)Note: The -udapl parameter is deprecated.
- Additional Db2 diagnostic data (with -purescale option)
- Problem record (PMR) number (if -n was specified)
- Operating system and level (for example, AIX® 5.1)
- Db2 release information
- An indication of whether it is a 32- or 64-bit environment
- Db2 installation path information
- Contents of db2nodes.cfg
- Number of processors and disks and how much memory
- List of databases in the instance
- Registry information and environment, including PATH and LIBPATH
- Disk free space for current file system and inodes for UNIX
- Java™ SDK level
- Java JCC version
- Java JCC configuration
- Database manager configuration
- ls -lR output (or Windows equivalent) of the sqllib directory
- The result of the LIST NODE DIRECTORY command
- The result of the LIST ADMIN NODE DIRECTORY command
- The result of the LIST DCS DIRECTORY command
- The result of the LIST DCS APPLICATIONS EXTENDED command
- The result of the db2prereqcheck command
- List of all installed software
- Db2 license information
- Db2 compliance report
- Audit configuration information
- CLI configuration information
- Problem determination settings
- Status of the db2trc command
- Listing of log directory
- Client connection state
- Database and database manager configuration (Database configuration requires the -d option)
- Application snapshot
- Memory pool info (size and consumed). Complete data is collected if the -d option is used
- The result of the LIST ACTIVE DATABASES command
- The result of the LIST DCS APPLICATIONS command
- Number of user tables
- Approximate size of database data
- Database snapshot
- Application snapshot
- Buffer pool information
- The result of the LIST APPLICATIONS command
- The result of the LIST COMMAND OPTIONS command
- The result of the LIST DATABASE DIRECTORY command
- The result of the LIST INDOUBT TRANSACTIONS command
- The result of the LIST DATABASE PARTITION GROUPS command
- The result of the LIST DBPARTITIONNUMS command
- The result of the LIST ODBC DATA SOURCES command
- The result of the LIST PACKAGES/TABLES command
- The result of the LIST TABLESPACE CONTAINERS command
- The result of the LIST TABLESPACES command
- The result of the LIST DRDA IN DOUBT TRANSACTIONS command
- Db2 workload manager information
- Listing of the database recovery history file
- Optimizer database configuration
- Database configuration
- Nodegroup information
- Storage group information
- Number of string IDs
- List of tables
- Diagnostic information related to uncompleted online table moves (SYSPROC.ADMIN_MOVE_TABLE).
A db2support.html file is included at the top level of the db2support package to help you to quickly search for any diagnostic data that is collected by the db2support command. This HTML file includes links of the data collected in the db2support.html file that point to its corresponding flat files in the subdirectory of the db2support package. A plain text version of the map file called db2support.map file is also included in the db2support package.
Example contents of db2support.zip file
You can use the db2support command with the -unzip parameter to extract the contents of the db2support.zip file locally, optionally specifying the directory path where you want the contents extracted to. You can also use the -unzip option to extract the contents of archived diagnostic data without the need for additional software. If you want to know only what files are included in a db2support.zip file, without extracting the actual content, you can instead use the -unzip list parameters with the db2support command.
db2support . -d sample -c -f -st "select * from staff"
- DB2CONFIG/ - Configuration information (for example, database, database manager, BP, CLI, and Java developer kit, among others)
- DB2DUMP/ - db2diag log file contents for the past three days
- DB2MISC/ - List of the sqllib directory
- DB2SNAP/ - Output of Db2 commands (for example,db2set, LIST TABLES, LIST INDOUBT TRANSACTIONS, and LIST APPLICATIONS)
- PURESCALE/- Diagnostic information for Db2 pureScale components, such as cluster manager, cluster file system and RDMA
- db2supp_opt.zip - Diagnostic information for optimizer problems
- db2supp_system.zip - Operating system information
- db2support.html - Map to flat files collected in each subdirectory of the db2support.zip file listed in HTML format and diagnostic information formatted into HTML sections
- db2support.log - Diagnostic log information for db2support collection
- db2support_options.in - Command-line options used to start the db2support collection
- db2support.map - Map to flat files collected in each subdirectory of the db2support.zip file listed in plain text format
- DB2TSS/ - Text Search Server Configuration and Logging information and SYSIBMTS catalog views contents
- OPTIMIZER/ - Diagnostic information for optimizer problems
- OPTIMIZER/optimizer.log - File contains a log of all activities. If db2support prompts messages, for example, DBT7116E, you might find more information within this log file.
- OPTIMIZER/CATALOGS - All the catalogs
with LOBs in the following subdirectories (generated only if the LOB
column in the catalog table is not empty):
- FUNCTIONS
- INDEXES
- NODEGROUPS
- ROUTINES
- SEQUENCES
- TABLES
- VIEWS
- OPTIMIZER/DB2DUMP - db2serv output (serv.* and serv2.* output files)
- DB2CONFIG/ - db2cli.ini (files from ~/sqllib/cfg)
- DB2MISC/ - DB2SYSTM file (binary), among others
- OSCONFIG/ - Different operating system information files (for example, netstat, services, vfs, ulimit, and hosts)
- OSSNAP/ - Operating system snapshots (for example, iostat, netstat, uptime, vmstat, and ps_elf)
- SQLDBDIR/ - Important buffer pool meta files (~/sqllib/sqldbdir)
- SQLGWDIR/ - DCS directory (files from ~/sqllib/sqlgwdir)
- SQLNODIR/ - Node directory (files from ~/sqllib/sqlnodir)
- SPMLOG/ - Files from ~/sqllib/spmlog
- report.log - Log of all collection activities