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.