ADD_MULTICOL_TENANT_COL¶
Add a column search rule to a multi column tenant map definition.
The columns named using this procedure are part of the relation between the protected table and the mapping (master) table. The mapping table holds the tenant codes that will be used to restrict access on the protected table.
Parameter p_map_column_expr points to a column name in the mapping table. Parameter names starting with ‘p_tnt_co…’ are used to specify a column name in the protected table. Data within these two columns must match to contribute to the relation between the tables.
This procedure inserts a row into table REP_TENANT_MULTICOL_MAP.
Parameter Name |
Required |
DefaultValue |
Values |
Description |
|---|---|---|---|---|
p_tnt_group |
yes |
The name of the tenant group. The name is case sensitive. |
||
p_tnt_name |
yes |
The name of the tenant. The name is case sensitive. |
||
p_tnt_col_position |
yes |
An arbitrary, unique number (positive integer or 0). This number specifies the position of the column within the relationship between the tables. It has to be referenced if a tenant column needs to be changed or removed. |
||
p_tnt_col_data_type |
yes |
|
The data type used for the tenant code. |
|
p_tnt_col_incl_pattern |
yes |
A regular expression that matches a column name in the protected table. Matched columns are part of the relation to the mapping (master) table. |
||
p_map_column_expr |
yes |
A SQL expression or simply the column name that matches the name of a column in the mapping table. This column is used for the relation to the columns in the protected tables that are found using parameters ‘p_tnt_col_***’ and ‘p_tnt_comment_***’ . |
||
p_tnt_col_excl_pattern |
yes |
A regular expression that matches a column name in the protected table. Matched columns are excluded from contributing to the relation with the mapping (master) table. |
||
p_tnt_comment_incl_pattern |
yes |
A regular expression applied to column comments. Matched columns are part of the relation to the mapping (master) table. |
||
p_tnt_comment_excl_pattern |
no |
A regular expression applied to column comments. If a column comment matches, the column will be excluded from contributing to the relation to the mapping (master) table. |
Example
Add columns named ‘DST’ that may have any comment (‘.*’) and are of data type ‘TEXT’ to the multi column tenant mapping definition of tenant ‘T_BUDGET_DEP’ in tenant group ‘TG_SF’. The position of found columns within the relationship is ‘1’. No regular expression patterns exclude column names or column comments from the relation (two ‘NULL’ values). The corresponding column in the mapping table is also named ‘DST’:
EXEC p_rep_admin.add_multicol_tenant_col ( 'TG_SF' , 'T_BUDGET_DEP' , 1 , 'TEXT' , 'DST' , 'DST' , NULL , '.*' , NULL );