5 Replies Latest reply: May 9, 2012 11:04 PM by Kamran Agayev A. RSS

    Resource Manager

    585227
      Hi All,

      I would like to implement resource manager via oracle service. Code is as follows:

      exec DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
      exec DBMS_RESOURCE_MANAGER.CREATE_PLAN(PLAN => 'my_plan',COMMENT => 'Resource plan/method for ERP Database');
      exec DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP => 'normal',COMMENT => 'Resource consumer group/method for normal jobs');
      exec DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP => 'adhoc',COMMENT => 'Resource consumer group/method for adhoc jobs');
      exec DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'my_plan',GROUP_OR_SUBPLAN => 'normal', COMMENT => 'normal sessions');
      exec DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'my_plan', GROUP_OR_SUBPLAN => 'adhoc', COMMENT => 'adhoc sessions');
      exec DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'my_plan', GROUP_OR_SUBPLAN => 'OTHER_GROUPS', COMMENT => 'mandatory');
      EXEC DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING(DBMS_RESOURCE_MANAGER.SERVICE_name , 'goslive', 'normal');
      EXEC DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING(DBMS_RESOURCE_MANAGER.SERVICE_name , 'test', 'adhoc');
      exec dbms_resource_manager.set_consumer_group_mapping_pri(2, 7,1, 9, 8, 10, 5, 4, 3, 6);
      exec DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
      exec DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();


      ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = 'my_plan';

      But looks like it doesn't work. Any idea what i'm missing.
      Same code if I use with user name wise it works fine, as I can assign initial consumer group for the user. But not able to assign initial consumer group to the service.

      Please advice.

      Thanks,

      Hal.
        • 1. Re: Resource Manager
          599200
          Hal,

          I'm trying to do the same as you and it's not working either!

          Which version of the DB are you using ?

          I actually want every user to be assigned to 1 a default group when they log in, but switch it to another group if they use a specific program, so I try to assign the default group by SERVICE_NAME.

          What I found was that it doesn't work and leaves the user in the OTHER_GROUPS! So I'm going to try a logon trigger next and manually switch the user to the default group based on session, I'll try and post an update if I get anywhere.

          Let me know if you have solved it with another method.

          Ooops, just saw that your post was made 2008 !!!!!!!
          • 2. Re: Resource Manager
            289595
            Please check the alert log if you get any error there.
            • 3. Re: Resource Manager
              936235
              The oracle forum is useless piece of crap in terms of usefulness I've ever saw on internet.
              Try your question on stackoverflow.com. There are lot less useless advises in there.
              • 4. Re: Resource Manager
                Helios-GunesEROL
                You have been Reported

                Regard
                Helios
                • 5. Re: Resource Manager
                  Kamran Agayev A.
                  933232 wrote:
                  The oracle forum is useless piece of crap in terms of usefulness I've ever saw on internet.
                  Try your question on stackoverflow.com. There are lot less useless advises in there.
                  It seems you haven't asked any question yet over the Forum as your post count is 1
                  At least all Oracle ACEs are responsible for having forum activity and we love share our knowledge

                  There're a lot of answered questions over the forum. So be polite!

                  Kamran Agayev A.
                  Oracle ACE