ORA-06502 appears when an AWR report is generated

Source: Internet
Author: User

ORA-06502 appears when an AWR report is generated

The following error occurred recently when generating an AWR report for a system: ORA-06502: PL/SQL: numeric or value error: character string buffer too small, then the process of generating the AWR report is terminated. Check the generated AWR report. If the report is incomplete, the AWR report is completed in the Complete List of SQL Text section, finally, it ends with a very long SQL statement, and the SQL statement is not completely displayed. After checking the MOS, we found that this was caused by a Bug 7833620 (refer to the MOS document Doc ID 1303342.1). However, we were a bit tempted to generate an AWR report and apply patches, so I decided to find a way to bypass this BUG.

According to the above analysis, the cause of AWR report generation failure is that there is a particularly long SQL statement in the system. With this in mind, the next step is to make it easy. The SQL text that generates the AWR report is from WRH $ _ SQLTEXT. You only need to cut the SQL text in the base table, we should be able to generate the AWR report correctly. The WRH $ _ SQLTEXT base table stores the SQL text information during the snapshot period. Operations on this table will not affect the running of system SQL statements, however, operations on the base table are always very dangerous. We recommend that you do not directly operate on the generation system. You can import the produced AWR data to the test environment to generate an AWR report. For more information about AWR import/export, see.

The structure of the WRH $ _ SQLTEXT base table is as follows:

SQL> desc WRH $ _ SQLTEXT

  • Name Null? Type
  • -----------------------------------------------------------------------------
  • SNAP_ID

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.