Forum Stats

  • 3,853,259 Users
  • 2,264,199 Discussions
  • 7,905,296 Comments

Discussions

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

Laury
Laury Member Posts: 1,669 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