This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,647 Users
  • 2,269,776 Discussions
  • 7,916,827 Comments

Discussions

How to run an AWR report logged inside a pluggable database using the PL/SQL API

Laury
Laury Member Posts: 1,672 Silver Badge

Hi,

I am working with Oracle RDBMS 19c.

I am trying to run an AWR report for a pluggbale database using the API, but I get the following errors:

1)

---

SQL> select output from table(dbms_workload_repository.awr_global_report_html(

 l_dbid => 3244381767,

 l_inst_num => 1,

 l_bid => 1,

 l_eid => 3

 )

); 2  3  4  5  6  7


OUTPUT

----------------------------------------------------------------------------------------------------------------------------------------------------------------

*** ORA-20019: 1 is not a valid snapshot ID for database 3244381767.

---

2)

---

SQL> select output from table(dbms_workload_repository.awr_global_report_html(

 l_dbid => 3244381767,

 l_inst_num => null,

 l_bid => 1,

 l_eid => 3

 )

);

 2  3  4  5  6  7 select output from table(dbms_workload_repository.awr_global_report_html(

             *

ERROR at line 1:

ORA-06553: PLS-307: too many declarations of 'AWR_GLOBAL_REPORT_HTML' match this call

---

The value of 3244381767 is the value of the dbid I get from v$database.

The values of the snspshots 1,2, are value I get from dba_hist_snapshot and from the pluggable database?

Does someone know how to run an AWR report using the PL/SQL API?

Kind Regads