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

Resource limits apply only to dynamic SQL statements. The resource limits are specified in supplied user tables that are named DSNRLSTxx or DSNRLMTxx, where xx is a unique identifier.

Start of changeIf 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.End of change

Procedure

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.

Results

When the resource limit facility is started, changes to the resource limit specification table are immediately effective for all new threads. The changes also become effective for any existing threads that have not yet issued their first SQL statements of the following types:
  • SELECT
  • INSERT
  • UPDATE
  • MERGE
  • TRUNCATE
  • DELETE

However, if you change the resource limit specification table while a thread is executing, the limit that existed when the thread issued its first SQL statement applies throughout the life of the thread, until DB2® reads in the new limit.

DB2 reads in a new limit in the following situations:

  • When the application uses a different primary authorization ID.
  • When the resource limit facility is stopped and started again.
  • When a predictively governed package is loaded for execution.