Creating profiles

You can create profiles to define filtering scopes for processes within Db2®. The filtering for each profile is controlled by the column values in the DSN_PROFILE_TABLE. You can also specify actions for Db2 to take when a process, such as a SQL statement, thread, or connection meets the criteria of the profile. The actions are specified by the column values in the DSN_PROFILE_ATTRIBUTES table.

Before you begin

Before you can create profiles, you must create a set of profile tables on the Db2 subsystem.

About this task

A profile is a set of criteria that identifies a particular context on a Db2 subsystem. Examples include threads, connections, or SQL statements that have particular attributes.

Procedure

To create a profile:

  1. Insert rows into SYSIBM.DSN_PROFILE_TABLE with appropriate set of values for the type of profile that you want to create.
  2. Insert rows into the SYSIBM.DSN_PROFILE_ATTRIBUTES table to indicate the action that Db2 takes when the criteria that are specified in the profile table are met. Db2 uses the PROFILEID columns to associate rows in the SYSIBM.DSN_PROFILE_TABLE and SYSIBM.DSN_PROFILE_ATTRIBUTES profile tables.

What to do next

After you create a profile, you can enable and disable profiles and issue START PROFILE and STOP PROFILE commands to control which profiles are active.