Manually Generating Segment Advisor Advice
==========================================

Step 1 – Create a task.

dbms_advisor.create_task (
advisor_name => ‘Segment Advisor’,
task_id      => my_task_id,
task_name    => test123,
task_desc    => my_task_desc);

Step 2 – Assign an object to the task.

dbms_advisor.create_object (
task_name   => test123,
object_type => ‘TABLE’,
attr1       => ‘MV_MAINT’,
attr2       => ‘EMP’,
attr3       => NULL,
attr4       => NULL,
attr5       => NULL,
object_id   => obj_id);

Step 3 – Set the task parameters.

dbms_advisor.set_task_parameter(
task_name => test123,
parameter => ‘recommend_all’,
value     => ‘TRUE’);

Step 4 – Execute the task.

dbms_advisor.execute_task(test123);
END;
/

 

 

SELECT
‘Task Name : ‘ || f.task_name || chr(10) ||
‘Segment Name : ‘ || o.attr2 || chr(10) ||
‘Segment Type : ‘ || o.type || chr(10) ||
‘Partition Name : ‘ || o.attr3 || chr(10) ||
‘Message : ‘ || f.message || chr(10) ||
‘More Info : ‘ || f.more_info TASK_ADVICE
FROM dba_advisor_findings f
,dba_advisor_objects o
WHERE o.task_id = f.task_id
AND o.object_id = f.object_id
AND f.task_name like ‘&task_name’
ORDER BY f.task_name;

 

TASK_ADVICE
——————————————————————————–
Task Name : test123
Segment Name : EMP
Segment Type : TABLE
Partition Name :
Message : The object has chained rows that can be removed by re-org.
More Info : 10 percent chained rows can be removed by re-org.

Recent Posts

Start typing and press Enter to search