Resource Manager usage

Source: Internet
Author: User

Resource Manager usage

Http://easy2achieve.iteye.com/blog/328028

1. Clear and create the pending Area

Exec dbms_resource_manager.clear_pending_area ();

Exec dbms_resource_manager.create_pending_area ();

2. Create a cunsumer Group

Exec dbms_resource_manager.create_consumer_group (consumer_group => 'testa ', comment => 'R ');

You can create multiple instances as needed to separate users.

Exec dbms_resource_manager.create_consumer_group (consumer_group => 'testb', comment => 'R ');

3. Create a plan

Exec dbms_resource_manager.create_plan (Plan => 'plan1', comment => 'T ');

4. Add resource restrictions for the plan, such as the degree of Parallelism

Exec dbms_resource_manager.create_plan_directive (Plan => 'plan1', group_or_subplan => 'sys _ group', parallel_degree_limit_p1 => 100, comment => 'A ');

Exec dbms_resource_manager.create_plan_directive (Plan => 'plan1', group_or_subplan => 'other _ groups ', parallel_degree_limit_p1 => 50, comment => 'C ');

Exec dbms_resource_manager.create_plan_directive (Plan => 'plan1', group_or_subplan => 'testa ', parallel_degree_limit_p1 => 10, comment =>' B ');

Exec dbms_resource_manager.create_plan_directive (Plan => 'plan1', group_or_subplan => 'testb', parallel_degree_limit_p1 => 1, comment => 'B ');

5. Verify and submit the pending Area

Exec dbms_resource_manager.validate_pending_area ();

Exec dbms_resource_manager.submit_pending_area ();

6. initialize the user's Resource Group

Exec dbms_resource_manager_privs.grant_switch_consumer_group ('A', 'testa ', false );

Exec dbms_resource_manager_privs.grant_switch_consumer_group ('B', 'testb', false );

Exec dbms_resource_manager.set_initial_consumer_group ('A', 'testa ');

Exec dbms_resource_manager.set_initial_consumer_group ('B', 'testb

');

7. Enable parameters and restart the database to take effect.

Simple LAN

Exec dbms_resource_manager.create_simple_plan (

Simple_plan => 'SP ',

Consumer_group1 => 'AB', groupworker CPU => 20,

Consumer_group1 => 'ac', groupworker CPU => 80 ,)

Reinitialize the user's Resource Group. Configure RM to completely become a physical activity.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.