Databases Reference
In-Depth Information
task_id number := 0;
wkld_name varchar2(30) := 'SQLACCESS2522132_wkld';
saved_rows number := 0;
failed_rows number := 0;
num_found number;
BEGIN
/* Create Task */
dbms_advisor.create_task(DBMS_ADVISOR.SQLACCESS_ADVISOR,
task_id,taskname,task_desc,task_or_template);
..................
<dozens of lines of code here...>
..................
dbms_advisor.set_task_parameter(taskname,'CREATION_COST','TRUE');
dbms_advisor.set_task_parameter(taskname,'JOURNALING','4');
dbms_advisor.set_task_parameter(taskname,'DAYS_TO_EXPIRE','30');
/* Execute Task */
dbms_advisor.execute_task(taskname);
END;
Figure 10-6. Reviewing options before submitting job
If everything looks good, click on the Submit button. You should now be able to view the status of
the SQL Advisor Task from the Advisor Central screen. Figure 10-7 shows that the task has been
CREATED. This status will change to RUNNING, and then COMPLETED when it is finished. Depending
on the workload, this task may several minutes to complete.
 
Search WWH ::




Custom Search