User and group limits
You can place limits on the resources that users and groups can use. You can limit the number of rows that a query can return (rowset limit), the amount of time a session can remain idle before it is terminated (session timeout), the amount of time a query can run before the system notifies you, the session priority, and the number of days before the account password expires.
- If the attribute is set for the user account, use that value.
- If the attribute is not set for the USER, use the MOST RESTRICTIVE value set for any of the groups of which that user is a member.
- If the attribute is not set for the user or any of the user’s groups, use the system default value.
Setting | Scope | Valid range | Default value | Description |
---|---|---|---|---|
Rowset limit | User, group, and system | 1 - 2,147,483,647 or unlimited (zero) | Unlimited (zero) | Maximum rowset limit per query. For more information, see User rowset limits. |
Query timeout | User, group, and system | 1 - 2,147,483,647 minutes or unlimited (zero) | Unlimited (zero) | Maximum time that is allocated to a query. For more information, see Query timeout limits. |
Session limit | User, group, and system | 1 - 2,147,483,647 minutes or unlimited (zero) | Unlimited (zero) | When a SQL session is idle for longer than the specified period, the system terminates the session. For more information, see Session timeout. |
Session priority | User, group, and system | Critical, high, normal, or low | None | Defines the default and maximum priority for the user or group. |
Password expiration | User, group, and system | 0 or any positive int value | 0 (password does not expire) | Defines how many days that the password for the account is valid. Used only for local authentication accounts. For more information, see Password expiration. |
When you change these values, the system sets them at session startup and they remain in effect for the duration of the session.
- To set a system default, use a command similar to the following,
which sets the default session timeout to 300 minutes:
SYSTEM.ADMIN(ADMIN)=> SET SYSTEM DEFAULT SESSIONTIMEOUT TO 300; SET VARIABLE
- To show the system default for the session timeout, use the following
syntax:
SYSTEM.ADMIN(ADMIN)=> SHOW SYSTEM DEFAULT sessiontimeout; NOTICE: 'session timeout' = '300' SHOW VARIABLE