Overview of troubleshooting commands
The Db2® software provides multiple commands that you can use for troubleshooting your database.
The following command table provides various commands that you can aid you in troubleshooting your Db2database.
|Command||What the command does||When to use it||Administrative authority that is required to run the command|
|db2cklog||This command is used for checking archive log files to ensure that they are valid for rollforward recovery.||You can use the command periodically to ensure that archive log files are valid for use in a rollforward recovery if there ever were a situation where a rollforward is required.||Users with read permissions on the archive log files can run this command.|
|db2dart||This command is used to verify the architectural correctness of databases and report any errors.||You can be use this command to inspect the entire database, a table space, or a table for correctness.||Users with SYSADM authority can run this command.|
|db2diag||This command filters and formats the diagnostic information available in the db2diag.log files. It can be used to filter and format both single and rotating log files.||You can be use this command to filter db2diag.log files. This reduces the time that is required to locate the records that are needed when used by IBM® Software Support for troubleshooting.||Any user can run this command.|
|db2fodc||This command is used for manual first occurrence data capture (FODC) on problems that cannot trigger automatic FODC.||You can be use this command collect information about potential hangs, severe performance issues, and various types of errors.||Instance owners with SYSADM authority (on UNIX and Linux operating systems) can run this command. On Windows operating systems, users with SYSADM authority can run this command.|
|db2greg||This command is used to view the global registry and is only available on UNIX and Linux operating systems.||You can use this command to locate where data is being indexed.||Any user can run this command.|
|db2level||This command is used to show the version of Db2 software that is running and the service level of that instance.||You can use this command for troubleshooting your Db2 instance if the IBM Software Support requires knowledge of your version and instance.||Any user can run this command.|
|db2look||This command is used to create a mirror of the current database image.||You can use this command for testing out new software and compatibilities so there is no harming or corrupting the data within the real database.||Any user with SYSADM, SYSCTRL, SYSMAINT, SYSMON, DBADM, or EXECUTE privilege on the ADMIN_GET_STORAGE_PATHS table function can run this command.|
|db2ls||This command is used to list the products and features that are installed on your system and is only available on UNIX and Linux operating systems.||You can use this command to list the products and features that are installed on your system to review possible items which might require troubleshooting.||Any user can run this command.|
|db2pd||This command is used to monitor and troubleshoot a Db2 instance from memory.||You can use this command to review processes and information while it is changing. Since this tool is not dependent on the Db2 engine to be up, it can be used on an engine that is hung and collect information without acquiring any latches or using any engine resources.||Any user with SYSADM, SYSCTRL, SYSMAINT, or SYSMON can run this command.|
|db2support||This command is used to automatically collect all Db2 and system diagnostic information available.||You can use this command to collect diagnostic data that is uploaded for IBM Support Staff to analyze the diagnostic data locally.||For most thorough results, run this command as SYSADM. Any user can run this command, but results might vary based on privileges.|
|db2trc||This command is used to record information about operations and formats the information into a readable form.||You can run this command to record information about the system for troubleshooting. Run this command under the guidance of support personnel.||Any user with SYSADM, SYSCTRL, SYSMAINT, or DASADM (on UNIX and Linux operating systems) can run this command.|
|db2val||This command is used to ensure that your copy of the Db2 software is functioning properly.||You can run this command to validate installation files, instances, database creation, connections to the database, and the state of partitioned database environments.||Any user with root authority (on UNIX and Linux operating systems), or SYSADM plus either instance owner or root/local administrator access.|