AWR report in oracle
I am trying to generate an AWR report in oracle 11G. I get an error while building. the error is mentioned below
Using the report name awrrpt_1_2504_2709.html. select output from table (dbms_workload_repository.awr_report_html (: dbid, * ERROR on line 1: ORA-00904 :: invalid id
Steps I use to generate AWR reports
@ $ ORACLE_HOME / RDBMS / admin / awrrpt.sql
Enter a value for the report_type: html parameter
Enter a value for begin_snap: 2504 Start snapshot ID: 2504
Enter a value for end_snap: 2709 End snapshot ID: 2709
Please help me with this.
source to share
The user you are using to create the AWR must not have execute permission on the package DBMS_WORKLOAD_REPOSITORY
.
For quoting from Oracle Documentation,
.. To invoke these procedures, the user must be granted the DBA role.
Here is the list GRANTS
you need to create an AWR
GRANT SELECT ON SYS.V_$DATABASE TO MY_USER;
GRANT SELECT ON SYS.V_$INSTANCE TO MY_USER;
GRANT EXECUTE ON SYS.DBMS_WORKLOAD_REPOSITORY TO MY_USER;
GRANT SELECT ON SYS.DBA_HIST_DATABASE_INSTANCE TO MY_USER;
GRANT SELECT ON SYS.DBA_HIST_SNAPSHOT TO MY_USER;
GRANT ADVISOR TO MY_USER;
source to share