I already told about the fact that you can teach the DbVisualizer tool perform about every trick that you can come up with to do in a database. One thing I found that was lacking was Resource Manager. Together with Nathan Aaron I implemented some form of Resource Manager control in dbvis. Here is a short explanation about how to use it.
first download my oracle.xml for DbVisualizer - see the links section for the exact location
Connect to an oracle database, preferably as a dba and go to the DBA tree in the object tree for the database that you connected to.
Open the DBA tree and go to Resource Mamanger
In dbvis you can configure actions on objects in the tree. For Resource Manager you will need to create a pending area, make changes, validate and submit the pending area when you are satisfied, or clear the pending are when you do not want to commit your changes. Those actions can be seen by using ctrl-click on the Resource Manager object in the tree. The actions menu for Resource Manager will popup.
Every time when you connect to the database to work on Resource Manager you will need to Create Pending Area again. You can not connect to the previously created pending area. You can recognize if a pending area is active by opening the sub trees. The Resource Plans trees show the defined Resource Manager Plans. I used a little encoding to show which plan is active and an indicator for Top plan or Sub plan. Here you can see the the plan called PLANBOARD is the active Top plan.
Currently the pending area is not active. Create the pending area by choosing Create Pending Area from the Resource Manager context menu. A confirmation screen will popup that can also show the SQL that is going to be used.
Hit enter to complete the action and see what happens to the object tree.
It suddenly shows the same info as before with an extra copy with PENDING as status. Here you can see that Create Pending Area effectively duplicates the current configuration so you can work on the duplicate.
Now open the PLANBOARD plan (you can download the sql to generate this plan from the PLANBOARD log I made before). And open the Resource Plan Directives.
where you now should be able to see the plan directives that are defined for the plan called planboard. Now remove the Resource Consumer Group PRIO3 from the plan by ctrl-clicking on the PRIO03 directive in the object tree. For every action in dbvis you get a popup asking for confirmation and optionally showing the generated SQL.
Again, hit enter to remove the plan from the plan in the pending area. If you regret this action you can clear the pending area, create it again and start all over. In this case we are going to create an extra Resource Consumer Group PRIO04 to be used in this plan. To do so activate the context menu on Resource Consumer Groups and select Create Resource Consumer Group and complete the popup window that appears.
and hit enter to make it all happen. In the left pane you will immediately see the new item (marked by a star) appear.
Now go back to the Resource Plans tree and activate the context menu item Add Group to Plan from the PLANBOARD plan in the pending area.
and select the PRIO04 group from the list of values. Now activate the context menu Modify Resource Directive from the PRIO04 Resource Plan Directive and complete the parameter window that popped up.
Make the changes that you like and hit enter to put them in the pending area.
Now check the validity of the pending area by selecting Validate Pending Area from the Resource Manager context menu. If nothing pops up, the pending area is valid. If there is a problem, it will be told you. In this example I was foolish enough to make an error to show what happens.
Click on Resource Plan Directives in the PLANBOARD plan in the Pending area and decide what to change to make the pending area valid.
If finally the pending area is valid submit the Pending Area by choosing the appropriate menu item from the Resource Manager context menu. When you do so you will see that the pending area is gone when the action is complete.
In a next episode I will explain how to use the mysterious Generate Monitor SQL that is also in the Resource Manager context menu.
Ronald - who is counting down to the publication date of his book ...
0 reacties:
Een reactie plaatsen