Database Reference
In-Depth Information
7 dbms_resource_manager.validate_pending_area;
8 dbms_resource_manager.submit_pending_area;
9 end;
10 /
PL/SQL procedure successfully completed.
The success of this operation can be seen in the v$session.resource_consumer_group field and in
dba_users.initial_rsrc_consumer_group. If for some reason you don't see the correct consumer group in these, then
you may need to grant the SOE user the privilege to switch consumer groups, as shown in this example:
begin
DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA;
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA;
-- grant the SOE user the privs to switch his consumer group
DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP (
GRANTEE_NAME => 'SOE',
CONSUMER_GROUP => 'SWINGBENCH_GROUP',
GRANT_OPTION => FALSE);
DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA;
DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA;
END;
/
PL/SQL procedure successfully completed.
Testing the Resource Plan
With all the hard work done it is about time to test and see if the resource manager actually provides a benefit.
Unfortunately there was no suitable load generator available to fully exploit the power of the lab server so a slightly
different method had to be chosen to saturate the CPU. The lab server has 24 cores and 32 GB RAM available to itself,
therefore the load generated has to be substantial. A little script, to be executed on the database server itself helps to
achieve this goal:
$ cat burn.sh
#!/bin/bash
# check if all parameters have been passed
if [[ -z "$1" || -z "$2" ]] ; then
echo "usage burn.sh <pdb> <num_sessions>"
exit 99
else
PDB=$1
SESSIONS=$2
fi
 
Search WWH ::




Custom Search