ORA-13518 reported after reconstruction of AWR

Source: Internet
Author: User

The AWR import failed today and damaged the awr of the database. It can only be rebuilt. After reconstruction, an error is reported in awr.

SYS @ hcndb> begin
Dbms_workload_repository.modify_snapshot_settings (
3 interval => 30,
4 retention => 14*24*60
5 );
6 end;
7/
Begin
*
ERROR at line 1:
ORA-13518: Invalid database id (231820269)
ORA-06512: at "SYS. DBMS_WORKLOAD_REPOSITORY", line 85
ORA-06512: at "SYS. DBMS_WORKLOAD_REPOSITORY", line 133
ORA-06512: at line 2

View the MOS document:
 
ORA-13518: 'invalid Database id' On Call to DBMS_WORKLOAD_REPOSITORY Package [Id 984447.1]

Changes
Recently AWR was recreated using catnoawr. SQL and catawrtb. SQL.
Cause
When a function/procedure is called from DBMS_WORKLOAD_REPOSITORY package, it refers table WRM $ _ DATABASE_INSTANCE to get dbid information. as the AWR repositories has been recreated, the table doesn' t not have any data present in it.
 
SQL> select * from WRM $ _ DATABASE_INSTANCE;
No rows selected
 

Solution
 
The WRM $ _ DATABASE_INSTANCE gets populated with instance information when the instance is rebooted. so, If you have recreated AWR using catnoawr. SQL, catawrtb. SQL, then you need to bounce the Instance. on restart, the table will be populated with the requisite information. hence, better option for recreating AWR is to use startup restrict method. after the recreation activity is completed, shutdown the database and open it normally.

Resume normal after instance restart, record

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.