db_diagpath_archive

Use this command to archive or delete first-occurrence data collection (FODC) information.

FODC information comprises:
Administration notification logs
When an event occurs, the database engine writes information to the administration server log file, db2dasdiag.log.
Dump files
For some error conditions, extra information is logged in external binary dump files named after the failing process ID. These files are intended for use by customer support personnel. These files are stored in the directory $DASHOME/das/dump, where $DASHOME represents the home directory of the DAS user.
Trap files
If the database engine cannot continue processing due to a trap, segmentation violation, or exception, it generates a trap file. A trap file contains the function flow of the last steps that were run before the problem occurred.

FODC information typically requires a large amount of storage space. Use the db_diagpath_archive command to create an archive file that contains FODC information and then delete the FODC information from the system, thereby freeing up the storage space that the information previously occupied. The command output indicates where the FODC archive file is stored. You can also use the db_diagpath_archive command to delete FODC information without archiving it, or to delete FODC archive files.

As a user with host operating system root authority, issue one of the following commands on the head node:

  • To archive FODC information that is older than the specified number of days:
    docker exec -it Db2wh db_diagpath_archive -f days
    podman exec -it Db2wh db_diagpath_archive -f days
  • To delete FODC information that is older than the specified number of days without archiving it:
    docker exec -it Db2wh db_diagpath_archive -d days
    podman exec -it Db2wh db_diagpath_archive -d days
  • To delete FODC archive files that are older than the specified number of days:
    docker exec -it Db2wh db_diagpath_archive -x days
    podman exec -it Db2wh db_diagpath_archive -x days
Note:

The -t parameter, formerly used to archive FODC information, is obsolete and no longer available.

Examples

  • Archive all FODC information that is more than 5 days old:
    docker exec -it Db2wh db_diagpath_archive -f 5
    podman exec -it Db2wh db_diagpath_archive -f 5
  • Delete all FODC information that is more than 15 days old:
    docker exec -it Db2wh db_diagpath_archive -d 15
    podman exec -it Db2wh db_diagpath_archive -d 15