ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
Note: Optimizer statistics are automatically gathered by automatic optimizer statistics collection,
which gathers statistics on all objects in the database which have stale or missing statistics.
Automatic optimizer statistics collection runs as part of the automated maintenance tasks infrastructure (AutoTask) and is enabled by default to run in all predefined maintenance windows.
dbms_auto_task_admin.get_client_attributes(
client_name IN VARCHAR2, -- name from DBA_AUTOTASK_CLIENT
service_name OUT VARCHAR2, -- Service name for client, may be NULL
window_group OUT VARCHAR2); -- Name of the active window group
desc dba_autotask_client
set linesize 121
col client_name format a35
col consumer_group format a25
col service_name format a15
col window_group format a20
SELECT client_name, status, consumer_group, window_group
FROM dba_autotask_client;
Returns percent of resources allocated to each AUTOTASK High Priority Consumer Group: Total adds to 100%
Deprecated as of 12cR1
dbms_auto_task_admin.get_p1_resources(
stats_group_pct OUT NUMBER, -- %resources for Statistics Gathering
seg_group_pct OUT NUMBER, -- %resources for Space Management
tune_group_pct OUT NUMBER, -- %resources for SQL Tuning
health_group_pct OUT NUMBER); -- %resources for Health Checks
dbms_auto_task_admin.modify_autotask_settings(
client_name IN VARCHAR2, -- Name of the client as found in DBA_AUTOTASK_CLIENT View.
attribute_name IN VARCHAR2, -- Attribute to be set
attribute_value IN NUMBER -- Attribute value in numeric form
Associates an AUTOTASK Client with a specified service
dbms_auto_task_admin.set_client_service(
client_name IN VARCHAR2, -- from DBA_AUTOTASK_CLIENT
service_name IN VARCHAR2); -- Service name for client, may be NULL
SELECT client_name, service_name
FROM dba_autotask_client;
SELECT name
FROM dba_services;
DECLARE
sname dba_autotask_client.service_name%TYPE;
BEGIN
dbms_auto_task_admin.set_client_service('sql tuning advisor', 'orabase');
END;
/
SELECT client_name, service_name
FROM dba_autotask_client;
Sets percentage-based resource allocation for each High Priority Consumer Group used by AUTOTASK Clients: Must total 100%
Deprecated as of 12cR1
dbms_auto_task_admin.set_p1_resources(
stats_group_pct IN NUMBER, -- %resources for Statistics Gathering
seg_group_pct IN NUMBER, -- %resources for Space Management
tune_group_pct IN NUMBER, -- %resources for SQL Tuning
health_group_pct IN NUMBER); -- %resources for Health Checks
desc dba_rsrc_consumer_groups
SELECT consumer_group_id, consumer_group
FROM dba_rsrc_consumer_groups;
desc resource_plan_directive$
SELECT plan, group_or_subplan, mgmt_p1
FROM resource_plan_directive$
WHERE (group_or_subplan LIKE '%STATS%'
OR group_or_subplan LIKE '%SPACE%'
OR group_or_subplan LIKE '%SQL%'
OR group_or_subplan LIKE '%HEALTH%');
SELECT plan, group_or_subplan, mgmt_p1
FROM resource_plan_directive$
WHERE (group_or_subplan LIKE '%STATS%'
OR group_or_subplan LIKE '%SPACE%'
OR group_or_subplan LIKE '%SQL%'
OR group_or_subplan LIKE '%HEALTH%');
SELECT plan, group_or_subplan, mgmt_p1
FROM resource_plan_directive$
WHERE (group_or_subplan LIKE '%STATS%'
OR group_or_subplan LIKE '%SPACE%'
OR group_or_subplan LIKE '%SQL%'
OR group_or_subplan LIKE '%HEALTH%');