CHANGE_TNT_GROUP¶
Changes a tenant group definition.
The tenant group must already exist and the tenant group name must be supplied when executing this procedure. All other parameters are optional and remain unchanged if they are not provided in the procedure call.
This procedure updates a row in table REP_TENANT_GROUPS.
Parameter Name |
Required |
DefaultValue |
Values |
Description |
|---|---|---|---|---|
p_tnt_group |
yes |
The name of the tenant group. The name is case sensitive. |
||
p_tnt_group_desc |
no |
A description of the tenant group. The existing value in table REP_TENANT_GROUPS remains unchanged if the parameter is omitted in the procedure call. |
||
p_all_tnt_code |
no |
Users holding this tenant code have access to all tenant codes within the tenant group. The value may be of data type ‘TEXT’, ‘NUMERIC’ or ‘DATE’. DATEs use the format ‘yyyy-mm-dd’. The value has to be unique across all tenant codes within this tenant. The existing value in table REP_TENANT_GROUPS remains unchanged this parameter is omitted. |
||
p_def_tnt_code |
no |
The default tenant code. All users are able to see data within the default tenant code. Note: this tenant code is always added to every user’s tenant access privileges. It is not possible to restrict a user to not see this tenant code. The existing value in table REP_TENANT_GROUPS remains unchanged if this parameter is omitted. |
||
p_check_pattern |
no |
A regular expression matching the input format of the tenant code during the process of granting or revoking tenant access or setting the user context. The default tenant code (p_def_tnt_code) is also checked using this expression. The all tenant code (p_all_tnt_code) does not need to match this expression. The existing value in table REP_TENANT_GROUPS remains unchanged this parameter is omitted. |
||
p_sec_ctx |
yes |
|
Fine-grained security for the tenant group is in effect only if the security context is activated for the tenant group. Otherwise, the tenant group may be used with a user context only (see parameter p_usr_ctx). See SCURTY Concepts Guide, chapter “User context and security context” for a more detailed explanation. The existing value in table REP_TENANT_GROUPS remains unchanged this parameter is omitted. |
|
p_usr_ctx |
yes |
|
If the user context is activated for the tenant group, the user may restrict a database session to simplify SQL statements that repeatedly operate on a subset of data. See SCURTY Concepts Guide, chapter “User context and security context” for a more detailed explanation. The user context may be changed by the user with package SCURTY_CTX_USR (a public synonym). The existing value in table REP_TENANT_GROUPS remains unchanged this parameter is omitted. |
|
p_check_data_type |
no |
|
The allowed data type for a tenant code during the process of granting or revoking tenant access or setting the user context. The default tenant code (p_def_tnt_code) must match this data type. The all tenant code (p_all_tnt_code) does not need to match this data type. The existing value in table REP_TENANT_GROUPS remains unchanged this parameter is omitted. |
Example
Change the comment in tenant group ‘CUSTOMER’ to ‘Selected customers only’. All other parameters remain unchanged in table REP_TENANT_GROUPS:
EXEC p_rep_admin.change_tnt_group ( p_tnt_group => 'CUSTOMER' , p_tnt_group_desc => 'Selected customers only' );