查詢SNAP對應的ADDM的語句 select task_id,task_name,description from dba_advisor_tasks order by 1 desc
導出最新的ADDM報告(需要sys用戶) select dbms_advisor.get_task_report(task_name) from dba_advisor_tasks where task_id =( select max(t.task_id) from dba_advisor_tasks t, dba_advisor_log l where t.task_id=l.task_id and t.advisor_name='ADDM' and l.status='COMPLETED' );
導出某個task_id的ADDM報告(需要sys用戶) select dbms_advisor.get_task_report(task_name) from dba_advisor_tasks where task_id =XX
導出task_name名稱為ADDM:1866763731_1_31374的報告(需要sys用戶) select dbms_advisor.get_task_report('ADDM:1866763731_1_31374') from dual