Splitting a diagnostic data directory path by database partition server, database partition, or both

You can specify a diagnostic data directory path so that separate directories are created and named according to the database partition server, database partition, or both.

Before you begin

Db2® version 9.7 Fix Pack 1 or a later fix pack is required.

About this task

You can specify a diagnostic data directory path to separately store diagnostic information according to the database partition server or database partition from which the diagnostic data dump originated.

Procedure

  • Splitting diagnostic data directory path per physical database partition server
    • To specify a default diagnostic data directory path, execute the following step:
      • Set the diagpath database manager configuration parameter to split the default diagnostic data directory path per physical database partition server by issuing the following command:
        db2 update dbm cfg using diagpath '"$h"'
      This command creates a subdirectory under the default diagnostic data directory with the computer name, as shown in the following example:
      Default_diagpath/HOST_db-partition-server-name
    • To split a user specified diagnostic data directory path (for example, /home/usr1/db2dump/), execute the following step:
      • Set the diagpath database manager configuration parameter to split the /home/usr1/db2dump/ diagnostic data directory path per database partition server by issuing the following command:
        db2 update dbm cfg using diagpath '"/home/usr1/db2dump/ $h"'
        Note: A blank space must separate /home/usr1/db2dump/ and $h.
      This command creates a subdirectory under the /home/usr1/db2dump/ diagnostic data directory with the database partition server name, as shown in the following example:
      /home/usr1/db2dump/HOST_db-partition-server-name
  • Splitting diagnostic data directory path per database partition
    • To specify a default diagnostic data directory path, execute the following step:
      • Set the diagpath database manager configuration parameter to split the default diagnostic data directory path per database partition by issuing the following command:
        db2 update dbm cfg using diagpath '"$n"'
      This command creates a subdirectory for each partition under the default diagnostic data directory with the partition number, as shown in the following example:
      Default_diagpath/NODEnumber
    • To split a user specified diagnostic data directory path (for example, /home/usr1/db2dump/), execute the following step:
      • Set the diagpath database manager configuration parameter to split the /home/usr1/db2dump/ diagnostic data directory path per database partition by issuing the following command:
        db2 update dbm cfg using diagpath '"/home/usr1/db2dump/ $n"'
        Note: A blank space must separate /home/usr1/db2dump/ and $n.
      This command creates a subdirectory for each partition under the /home/usr1/db2dump/ diagnostic data directory with the partition number, as shown in the following example:
      /home/usr1/db2dump/NODEnumber
  • Splitting diagnostic data directory path per physical database partition server and per database partition
    • To specify a default diagnostic data directory path, execute the following step:
      • Set the diagpath database manager configuration parameter to split the default diagnostic data directory path per physical database partition server and per database partition by issuing the following command:
        db2 update dbm cfg using diagpath '"$h$n"'
      This command creates a subdirectory for each logical partition on the database partition server under the default diagnostic data directory with the database partition server name and partition number, as shown in the following example:
      Default_diagpath/HOST_db-partition-server-name/NODEnumber
    • To specify a user specified diagnostic data directory path (for example, /home/usr1/db2dump/), execute the following step:
      • Set the diagpath database manager configuration parameter to split the /home/usr1/db2dump/ diagnostic data directory path per database partition server and per database partition by issuing the following command:
        db2 update dbm cfg using diagpath '"/home/usr1/db2dump/ $h$n"'
        Note: A blank space must separate /home/usr1/db2dump/ and $h$n.
      This command creates a subdirectory for each logical partition on the database partition server under the /home/usr1/db2dump/ diagnostic data directory with the database partition server name and partition number, as shown in the following example:
      /home/usr1/db2dump/HOST_db-partition-server-name/NODEnumber
      For example, an AIX® database partition server, named boson, has 3 database partitions with node numbers 0, 1, and 2. The following example shows a sample list output for the directory:
      usr1@boson /home/user1/db2dump->ls -R *
      HOST_boson:
      
      HOST_boson:
      NODE0000 NODE0001 NODE0002
      
      HOST_boson/NODE0000:
      db2diag.log db2eventlog.000 db2resync.log db2sampl_Import.msg events usr1.nfy
      
      HOST_boson/NODE0000/events:
      db2optstats.0.log
      
      HOST_boson/NODE0001:
      db2diag.log db2eventlog.001 db2resync.log usr1.nfy stmmlog
      
      HOST_boson/NODE0001/stmmlog:
      stmm.0.log
      
      HOST_boson/NODE0002:
      db2diag.log db2eventlog.002 db2resync.log usr1.nfy

What to do next

Note:
  • If a diagnostic data directory path split per database partition is specified ($n or $h$n), the NODE0000 directory will always be created for each database partition server. The NODE0000 directory can be ignored if database partition 0 does not exist on the database partition server where the NODE0000 directory was created.
  • To check that the setting of the diagnostic data directory path was successfully split, execute the following command:
    db2 get dbm cfg | grep DIAGPATH
    A successfully split diagnostic data directory path returns the values $h, $n, or $h$n with a preceding blank space. The following example shows a sample output that is returned:
    Diagnostic data directory path            (DIAGPATH) = /home/usr1/db2dump/ $h$n 

To merge separate db2diag log files to make analysis and troubleshooting easier, use the db2diag -merge command. For additional information, see: db2diag - db2diag logs analysis tool command and Analyzing db2diag log files using db2diag tool.