OCP 1Z0 053 221

来源:互联网 发布:淘宝零成本自动赚钱txt 编辑:程序博客网 时间:2024/06/08 13:41
221.To generate recommendations to improve the performance of a set of SQL queries in an application, 
you execute the following blocks of code: 
BEGIN dbms_advisor.create_task(dbms_advisor.sqlaccess_advisor,'TASK1'); END;/ 
BEGIN dbms_advisor.set_task_parameter('TASK1','ANALYSIS_SCOPE','ALL'); 
dbms_advisor.set_task_parameter('TASK1','MODE','COMPREHENSIVE'); 
END; 

BEGIN 
dbms_advisor.execute_task('TASK1'); 
dbms_output.put_line(dbms_advisor.get_task_script('TASK1')); 
END; 

The blocks of code execute successfully; however, you do not get the required outcome. 
What could be the reason? 
A. A template needs to be associated with the task. 
B. A workload needs to be associated with the task. 
C. The partial or complete workload scope needs to be associated with the task. 
D. The type of structures (indexes, materialized views, or partitions) to be recommended need to be 
specified for the task. 
Answer: B


正确用法如下
http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_advis.htm#ARPLS65117

Examples

DECLARE  task_id NUMBER;  task_name VARCHAR2(30);  workload_name VARCHAR2(30);BEGIN  task_name := 'My Task';  workload_name := 'My Workload';  DBMS_ADVISOR.CREATE_TASK(DBMS_ADVISOR.SQLACCESS_ADVISOR, task_id, task_name);  DBMS_ADVISOR.ADD_SQLWKLD_REF(task_name, workload_name);  DBMS_ADVISOR.EXECUTE_TASK(task_name);END;/


0 0
原创粉丝点击