Statspack 4-tested and installed Statspack)

Source: Internet
Author: User

Running statspack. snap can generate a System Snapshot and run it twice. Then, execute spreport. SQL to generate a report based on two time points.

If everything works properly, the installation is successful.

 

SQL> execute statspack. snap

PL/SQL procedure successfully completed.

SQL> execute statspack. snap

PL/SQL procedure successfully completed.

SQL> @ spreport. SQL

...

 

 

However, you may get the following error:

 

SQL> exec statspack. snap;

BEGIN statspack. snap; END;

 

*

ERROR at line 1:

ORA-01401: inserted value too large for column

ORA-06512: at "PERFSTAT. STATSPACK", line 978

ORA-06512: at "PERFSTAT. STATSPACK", line 1612

ORA-06512: at "PERFSTAT. STATSPACK", line 71

ORA-06512: at line 1

 

This is a Bug in Oracle, Bug no.1940915.

This Bug is fixed after 8.1.7.3.

This problem only occurs in multiple character sets. You need to modify the spcpkg. SQL script, $ ORACLE_HOME/rdbms/admin/spcpkg. SQL,
Change "substr" to "substrb" and then run the script again.

Error section of the script:

 

 

Select l_snap_id

, P_dbid

, P_instance_number

, Substr (SQL _text, 1, 31)

...........

 

 

Substr treats multiple characters as one byte. substrb as multiple bytes. During data collection, statpack adds the top 10
The first 31 bytes of SQL are stored in the data table. If the first 31 characters of SQL have Chinese characters, this error occurs.

 

From: http://www.eygle.com/statspack/statspack04.htm

Note: Reports are generally generated in the current folder.

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.