CREATE USERGROUP statement 

The CREATE USERGROUP statement defines a user group.

Syntax

<create_usergroup_statement> ::= CREATE USERGROUP <usergroup_name>
[<usergroup_mode>] [PERMLIMIT <unsigned_integer>] [TEMPLIMIT <unsigned_integer>]
[TIMEOUT <unsigned_integer>] [COSTWARNING <unsigned_integer>] [COSTLIMIT <unsigned_integer>] [[NOT] EXCLUSIVE]

usergroup_name, usergroup_mode, unsigned_integer

Explanation

The current user must be a DBA user.

The specified usergroup name must not be identical to the name of an existing user, usergroup, or role.

Several users who are members of this usergroup can be defined using CREATE USER statement. All private objects created by members of the usergroup are identified by the usergroup name. The owner of a private object is the group, not the user who created the object. Each user can work with any private object of the group, as if this user were the owner of the object. Privileges can only be granted or revoked from the group. A privilege cannot be granted or revoked from a single member of the group.

Unsigned integers must always be greater than 0.

User class of the usergroups ( usergroup_mode)

If no user class is specified for the usergroup or if STANDARD is specified, PERMLIMIT must not be used.

PERMLIMIT

If PERMILIMIT is specified, the disk space available for private tables of users in this usergroup is limited. This value is specified in units of 8 KB.

If PERMLIMIT is not specified, the user has unlimited space (within the limits of the sizes of the data devspaces specified during the installation) for storing private tables.

TEMPLIMIT

If PERMILIMIT is specified, the disk space available to users in this usergroup for building temporary result tables, temporary base tables, and for execution plans is limited. This value is specified in units of 8 KB.

If TEMPLIMIT is not specified, the user has unlimited space (within the limits of the sizes of the data devspaces specified during the installation).

TIMEOUT

The TIMEOUT value defines the maximum time that may elapse between the completion of an SQL statement and the issuing of the next SQL statement. This value is the maximum value which can be specified as a TIMEOUT value in the CONNECT statement.

The TIMEOUT value is specified in seconds and must be between 0 and 32400.

COSTWARNING/COSTLIMIT

COSTWARNING and COSTLIMIT limit costs by preventing users in this usergroup from executing query statements or insert statements in the form of INSERT...SELECT... beyond a specified degree of complexity.

Before these SQL statements are executed, the costs expected to result from this statement are estimated. This SELECT costs estimate can be output with the EXPLAIN statement. In interactive mode, the estimated SELECT cost value is compared with the COSTWARNING and COSTLIMIT values specified for the user.

The COSTWARNING and COSTLIMIT values are ignored with query statements or insert statements in the form INSERT...SELECT... which are embedded in a programming language.

COSTWARNING: specifies the estimated SELECT cost value beyond which the user receives a warning. In this case, the user is asked whether the SQL statement is to be executed.

COSTLIMIT: specifies the estimated SELECT cost value beyond which the SQL statement is not executed.

The COSTLIMIT value must be greater than the COSTWARNING value.

EXCLUSIVE

EXCLUSIVE: prevents users in this usergroup from opening two different database sessions simultaneously.

NOT EXCLUSIVE: allows the user to open several database sessions simultaneously.

If the EXCLUSIVE condition is not specified, EXCLUSIVE is assumed implicitly (without NOT).