Metric Extension SQL usage for SQL with semi-colon terminated.
Hello,
I would like to create a metric extension that can show the number of stale statistics in my database.
How do I use below SQL into metric extension SQL Query because the requirement is SQL statements should not be semi-colon terminated.
I read in Oracle Notes that we need to use out parameter position/type but the instruction is unclear.
declare
m_objects dbms_stats.ObjectTab;
begin
dbms_stats.gather_database_stats(
options => 'LIST STALE',
objlist => m_objects
);
dbms_output.put_line(m_objects.count);
end;
/
Please advise.