The SET_CONSUMER_GROUP_MAPPING procedure adds, deletes, or modifies an entry that maps the session to a resource consumer group based on the logon and operating attributes of a session.
Syntax
DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING(
attribute IN VARCHAR2,
value IN VARCHAR2,
consumer_group IN VARCHAR2 DEFAULT NULL);
Parameters
| Parameter | Description |
|---|---|
| attribute | The attribute to be added or modified. In the current database version, you can add or modify only the ORACLE_USER attribute, which specifies the database username, and the COLUMN attribute, which specifies the column name. |
| value | The attribute value, which contains the absolute mapping and a regular expression. |
| consumer_group | The name of the mapped-to resource consumer group. If you set the value to NULL, the mapping will be deleted. |
Usage notes
If no mapping exists between the specified attribute and value, a mapping to the specified resource consumer group will be created. If a mapping exists between the specified attribute and value, the mapped-to resource consumer group will be updated to the specified consumer group. If the consumer_group parameter is set to NULL, any mapping between the specified attribute and value will be deleted.
Examples
obclient> CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('ORACLE_USER','ob123','group1');