查询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