While executing dbms_workload_repository package the following error message is reported.
sql> exec dbms_workload_repository.modify_snapshot_settings(interval=>0);
BEGIN dbms_workload_repository.modify_snapshot_settings(interval=>0); END;
ERROR at line 1:
ORA-13516: AWR Operation failed: SWRF Schema not initialized
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 85
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 133
ORA-06512: at line 1
Cause of the Problem
These errors have happened because of wrong or invalid objects with respect to AWR.
Solution of the Problem
In order to resolve the issue you need to drop and recreate the AWR objects, which you can do by running CATNOAWR.SQL and CATAWR.SQL scripts.
Note that from 10.2 onwards, the script name has changed. The catalog script for AWR Tables, used to create the Workload Repository Schema is CATAWRTB.SQL .
In case of Oracle 10gR1,
To re-create the AWR objects, by running the catnoawr.sql and catawr.sql scripts located in $ORACLE_HOME/rdbms/admin.
SQL> @$ORACLE_HOME/rdbms/admin/catnoawr.sqlIn case of Oracle 10gR2,
SQL> @$ORACLE_HOME/rdbms/admin/catawr.sql
SQL> shut immediate
SQL> startup
SQL> @$ORACLE_HOME/rdbms/admin/CATAWRTB.sqlOn re-start of the database instance, the AWR tables will be populated with the required data.
SQL> shut immediate;
SQL> startup
Note that, the CATNOAWR.SQL scripts is no longer available in 10.2 and cannot be found
in the $ORACLE_HOME/rdbms/admin directory.
No comments:
Post a Comment