The CREATE USERGROUP statement (create_usergroup_statement) defines a user group.
<create_usergroup_statement>
::= CREATE USERGROUP <usergroup_name>
[<usergroup_mode>]
[TIMEOUT <unsigned_integer>] [COSTWARNING <unsigned_integer>]
[COSTLIMIT <unsigned_integer>] [[NOT] EXCLUSIVE] [DEFAULTCODE <ASCII
| UNICODE>]
usergroup_name, usergroup_mode, unsigned_integer
The current user must be a database administrator (DBA user).
The specified user group name must not be identical to the name of an existing user, user group, or role.
You can use the CREATE USER statement to define multiple users who belong to this user group. All private objects created by members of the user group are identified by the user group 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 (unsigned_integer) must always be greater than 0.
Unlimited disk space is available to the user for the storage of his or her private and temporary tables (in the context of the sizes specified for the data volumes during the installation).
The timeout value is specified in seconds and must be between 30 and 32400.
Only the database system administrator (SYSDBA user) can define users with the timeout value 0.
COSTWARNING and COSTLIMIT limit costs by preventing users in this user group from executing query statements or insert statements in the form of INSERT...SELECT... beyond a specified degree of complexity and that are therefore cost-intensive.
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 he or she really wants to execute the SQL statement.
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: prevents users in this user group 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).
The value of the special database parameter DEFAULT_CODE is overridden with the code attribute specified in DEFAULTCODE for the objects of the specified user.