ORA-13516: AWR Operation failed or ORA-20200: Database/Instance nnnnnn does not exist in DBA_HIST_DATABASE_INSTANCE
When running $ORACLE_HOME/rdbms/admin/awrrpt.sql
The process fails with an ORA error.
I have attempted to re-add the target to grid control but still seeing the same issue. - after restarting the agent as well.
I am not getting prompted to select the snap ids (nor days...)
Using 3280118196 for database Id
Using 1 for instance number
declare
*
ERROR at line 1:
ORA-20200: Database/Instance 3280118196/1 does not exist in
DBA_HIST_DATABASE_INSTANCE
ORA-06512: at line 23
Trying the following also fails:
prod1db SQL> BEGIN
2 DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
3 END;
4 /
BEGIN
*
ERROR at line 1:
ORA-13516: AWR Operation failed: AWR Schema not initialized
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 14
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 37
ORA-06512: at line 2
The DBID is not found in the table in question:
prod1db SQL> select dbid from v$database;
DBID
----------
3280118196
prod1db SQL> select distinct DBID from DBA_HIST_DATABASE_INSTANCE;
DBID
----------
1902548339
2322143645
3283087540
3853371416
This is a single instance database on a RAC cluster.
select nam.ksppinm name, val.KSPPSTVL, nam.ksppdesc description
from x$ksppi nam, x$ksppsv val
where nam.indx = val.indx AND
nam.ksppinm = '_awr_restrict_mode'
order By 1
This show AWR is NOT running in restricted mode.
Solution
Note:782974.1 How to Recreate The AWR ( AUTOMATIC WORKLOAD ) Repository
Thanks

No comments:
Post a Comment