Specifying and changing resource limits

You can specify resource limits to be enforced by the resource limit facility by populating the resource limit tables with rows of data that describe the limits.

Before you begin

Create one or more resource limit tables.

About this task

You can specify resource limits for dynamic SQL statements and static SQL statements. The resource limits are specified in supplied user tables that are named DSNRLSTxx or DSNRLMTxx, where xx is a unique identifier.

If both DSNRLMTxx and DSNRLSTxx tables exist, rows in the DSNRLMTxx table that match a statement take priority over any matching rows in the DSNRLSTxx table.

Procedure

  1. Issue SQL statements, such as INSERT, UPDATE, MERGE, and DELETE statements, to populate the resource limit table.
    You can modify data in resource limit facility tables with only the usual table privileges. Higher authorities are not required.
  2. Start of changeStart or restart the resource limit facility by issuing a START RLIMIT command. If you select the SCOPE(GROUP) option, the command takes effect on all active members of the data sharing group.
    You can omit this action if the resource limit facility is already started and you are updating the current active set of resource limit tables. Db2 detects changes to the active resource limit tables and automatically refreshes the in-memory resource limit tables with these changes. This refresh is done for all or individual members of the data sharing group, depending on the SCOPE option value that was specified in the last START RLIMIT command.
    End of change

Results

Start of change

The new limits that are specified in the set of tables that you specify in the command apply to any subsequent new threads. Existing threads continue to use their original limits until they pass certain internal checkpoints, or Db2 detects changes to the filtering criteria.

End of change

Start of changeDb2 detects changes to filtering criteria in the following situations:End of change

  • When the application uses a different primary authorization ID.
  • Start of changeWhen the client information changes.End of change
  • When a package is loaded for execution.