In order to create and manage resource plans and resource consumer groups, you must have
the ADMINISTER_RESOURCE_MANAGER system privilege enabled for your session. DBAs have
this privilege with the with admin option. To grant this privilege to non-DBAs, you must execute
the GRANT_SYSTEM_PRIVILEGE procedure of the DBMS_RESOURCE_MANAGER_PRIVS
package. The following example grants the user MARTHAG the ability to manage the Database
Resource Manager:
execute DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SYSTEM_PRIVILEGE -
(grantee_name => 'MarthaG', -
privilege_name => 'ADMINISTER_RESOURCE_MANAGER', -
admin_option => TRUE);
You can revoke MARTHAG??™s privileges via the REVOKE_SYSTEM_PRIVILEGE procedure of the
DBMS_RESOURCE_MANAGER package.
With the ADMINISTER_RESOURCE_MANAGER privilege enabled, you can create a resource
consumer group using the CREATE_CONSUMER_GROUP procedure within DBMS_RESOURCE_
MANAGER. The syntax for the CREATE_CONSUMER_GROUP procedure is shown in the
following listing:
CREATE_CONSUMER_GROUP
(consumer_group IN VARCHAR2,
comment IN VARCHAR2,
cpu_mth IN VARCHAR2 DEFAULT 'ROUND-ROBIN')
You will be assigning users to resource consumer groups, so give the groups names that are
based on the logical divisions of your users. The following example creates two groups??”one for
online developers and a second for batch developers:
execute DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP -
(Consumer_Group => 'Online_developers', -
Comment => 'Online developers');
execute DBMS_RESOURCE_MANAGER.
Pages:
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254