set serveroutput on size unlimited
spool awr_8408_8478.txt
declare
dbid number := 644588240; — a remplacer par ton dbid
instance_id number := 1;
l_premier number := 8408;
l_dernier number := 8478;
end_id number;
begin
for start_id in l_premier..l_dernier loop
end_id := start_id + 1;
for awrreport in ( select output from table(dbms_workload_repository.awr_report_html(dbid,instance_id,start_id,end_id)) )
loop
dbms_output.put_line(awrreport.output);
end loop;
end loop;
end;
/
spool off
Laisser un commentaire