Db2 Tools for z/OS

 View Only

Db2 Administration Tool 13.1: Managing Db2 profile tables

By Kate Wheat posted Tue May 31, 2022 01:52 PM

  

Profile tables are an existing Db2 feature that you can use to monitor threads and connections, customize certain subsystem parameters in particular contexts, set special registers, set global variables, and stabilize dynamic SQL statements. In Db2 Admin Tool 13.1, you can manage these profiles with a simple panel interface.

Db2 13 introduced several enhancements to profile tables, including support for local threads and support for the new CURRENT LOCK TIMEOUT special register and the new SYSIBMADM.DEADLOCK_RESOLUTION_PRIORITY built-in global variable. All of the profile table enhancements that were introduced in Db2 13 function levels 500 and 501 are supported by Db2 Admin Tool 13.1.

The following example shows you how to create and use a profile to set the global variable DEADLOCK_RESOLUTION_PRIORITY in a particular context:

Create a profile

A profile is a set of criteria that defines a particular context on a Db2 subsystem.

  1. From the main menu, select options Z (DB2 system administration) -> 2P (Display/manage profile tables) -> 1 (Display profiles).

  2. On the Display Profiles panel (ADBZ2P1), specify the I line command next to any row to insert a new row in the profile table (DSN_PROFILE_TABLE):

  3. On the Insert/Update Profile panel (ADB2Z2PP), specify the profile criteria, and press Enter.

    In this example, assume that you want the profile to apply to Auth ID TS6462.
    Also, set Enabled to YES to activate the profile.

    If the statement execution prompt is displayed, specify 1 to execute the INSERT statement.

    Tip: To control whether you are prompted before executing SQL statements or commands, specify your preferences on the Prompt Options panel (option P.PR from the main menu).

    You should see your profile displayed on panel ADB2Z2P1:

Create profile attributes

After you define a profile, you need to define one or more attributes for the profile. An attribute defines the action that Db2 is to take for a particular profile.

  1. On the Display Profiles panel (ADBZ2P1), specify the IA line command next to your profile to insert an attribute:

    On the resulting Insert/Update Profile Attributes Values panel (ADB2Z2PA), the profile ID, (in this case 41) is listed. This value identifies the profile to which your new attribute is to apply:


    The possible values for the Keywords, Attribute 1, Attribute 2, and Attribute 3 fields are predefined by Db2. The Db2 documentation for the DSN_PROFILE_ATTRIBUTES profile table lists the possible values.

  2. To look up the possible values for Keywords, specify a question mark (?) in that field, and press Enter:


  3. On the Display Attributes panel (ADB2LIST), select the keyword that you want by specifying a plus sign (+) next to it and pressing Enter.

    This example specifies that Db2 is to assign a value to a global variable:


  4. On the ADB2Z2PA panel, complete the attribute fields according to the values that are required by Db2 for the DSN_PROFILE_ATTRIBUTES table for the selected keyword GLOBAL_VARIABLE, and press Enter.

    This example specifies that the DEADLOCK_RESOLUTION_PRIORITY variable is to be set to a certain value for local and remote threads.

    Tip:
    The Attribute 1 field is scrollable, as indicated by the greater than symbol (>) at the end of the field. To view the entire field and specify a long value, specify EXPAND on the command line, put your cursor in the Attribute 1 field, and press Enter. Make sure that you do not press Enter until your cursor is in the field. Then, you can see the complete field value.

    If the statement execution prompt is displayed, specify 1 to execute the INSERT statement.

Start your profile

Profiles must be enabled and started for Db2 to begin using them.

  1. Exit (PF3) back to panel ADB2Z2P.

  2. Specify option 5 (for START PROFILE), and press Enter.

    If the statement execution prompt is displayed, specify 1 and press Enter to start the profile:

All profiles that are currently enabled are started:


Update your profile

When you apply changes to an existing started profile, you must restart it again before the changes are applied.

In this example, assume that you want to update the attribute for DEADLOCK_RESOLUTION_PRIORITY.

    1. Exit (PF3) back to panel ADB2Z2P.

    2. Specify option 2 (for profile attributes), and press Enter.

    3. On the ADB2Z2P2 panel, specify U next to the attribute you created, and press Enter:

    4. On panel ADB2Z2PA specify your changes, and press Enter.
      This example changes the global variable to apply to only local threads, as indicated by the value 1 in the Attribute 2 field:

      If prompted, specify 1 and press Enter to update the attribute.

    5. Exit (PF3) back to panel ADB2Z2P.

    6. Specify option 5 (START PROFILE) and press Enter.

      The START PROFILE command loads or reloads the profile table into a data structure in memory.

      If prompted, specify 1 and press Enter to start the profiles with your new attribute definition.

#Db2Toolsforz/OS
0 comments
14 views

Permalink