Enterprise Manager Generic (MOSC)

MOSC Banner

Metric Extension SQL usage for SQL with semi-colon terminated.

edited Jun 24, 2016 3:50AM in Enterprise Manager Generic (MOSC) Question

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.

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center