Which DBMS_RESOURCE_MANAGER procedure prioritizes consumer-group mappings?

Which DBMS_RESOURCE_MANAGER procedure prioritizes consumer-group mappings?

Which DBMS_RESOURCE_MANAGER procedure prioritizes consumer-group mappings?

A.
CREATE_MAPPING_PRIORITY

B.
SET_MAPPING_PRIORITY

C.
SET_MAPPING_ORDER

D.
PRIORITIZE_MAPPING_ORDER

E.
This functionality is not available through the DBMS_RESOURCE_MANAGER package.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Justyna

Justyna

None of the procedures from A -D exist in dbms_resource_package.

Justyna

Justyna

I mean dbms_resource_manager package.

Helcio

Helcio

The SET_MAPPING_PRIORITY is a new feacture 10g.

Creating Mappings for Automatic Assignment of Sessions to Consumer Groups
The dbms_resource_manager.set_group_mapping procedure allows you to map a specific consumer group to a given session based on either login or run-time attributes.
These attributes include:
■ The username
■ The service name
■ The client OS username
■ The client program name
■ The client machine
■ The module name
■ The module name action
You then have to determine what session attributes you want to map to a given consumer group. In this example, I have mapped the client machine called tiger to the resource consumer group LOW_PRIORITY:
Exec dbms_resource_manager.set_group_mapping (DBMS_RESOURCE_MANAGER.CLIENT_MACHINE,‘tiger’,’low_priority’);

Thus, if anyone logs in to the database from the machine named tiger, they will be assigned to the consumer group LOW_PRIORITY, which will have already been created.
Often times, there can be a number of mappings that apply to a given session, and a priority has to be defined. This is done by using the procedure dbms_resource_manager.set_mapping_priority. This example creates two mappings:

Dbms_resource_manager.set_group_mapping (DBMS_RESOURCE_MANAGER.CLIENT_MACHINE, ‘tiger’,’low_priority’);
Dbms_resource_manager.set_group_mapping (DBMS_RESOURCE_MANAGER.ORACLE_USER, ‘NUMBER_ONE’,’high_priority’);

In this case, anyone signing in from tiger is assigned to the LOW_PRIORITY consumer group, but where will the user NUMBER_ONE be assigned? Well, right now it’s hard to tell. So, to make sure that NUMBER_ONE is always set to be assigned to the high-priority resource consumer group, I can use the provided procedure called dbms_resource_manager.set_mapping_priority:
Dbms_resource_manager.set_mapping_priority(ORACLE_USER=>1,
CLIENT_MACHINE=>2, EXPLICIT=>3, MODULE_NAME=>4, SERVICE_NAME=>5,
CLIENT_OS_USER=>6, CLIENT_PROGRAM=>7, MODULE_NAME_ACTION=>8);