SQL> connect sys/manager as SYSDBA
SQL>CREATE TABLESPACE TBS_STSPCK DATAFILE '/opt/app/oracle/oradata/orcl/stats01.dbf' size 500m autoextend on
maxsize unlimited;
SQL> @spcreate
here it will ask for username and defalut tablespace for this username
SELECT Snap_Level FROM STATS$STATSPACK_PARAMETER
EXECUTE STATSPACK.MODIFY_STATSPACK_PARAMETER –
(i_snap_level=>5, i_buffer_gets_th=>100000, -
i_modify_parameter=>'true');
Level Description
0–4 General performance statistics on all memory areas, latches, pools, and
events, and segment statistics, such as rollback and undo segments.
5 Same statistics from the lower levels, plus the most resource-intensive
SQL statements.
6 Introduced in Oracle 9.0.1, level 6 includes the level 5 results plus
SQL plans.
7–9 Introduced in Oracle 10g, level 7 includes level 6 results plus additional
Segment Level statistics, including logical reads, physical reads/writes,
global cache cr/current served and buffer busy, ITL, and row lock waits.
10 and greater Same statistics from level 6 plus parent/child latch data.
to create snapshot
execute STATSPACK.SNAP;
to create statspack report
@ORACLE_HOME/rdbms/admin/spreport
SQL>CREATE TABLESPACE TBS_STSPCK DATAFILE '/opt/app/oracle/oradata/orcl/stats01.dbf' size 500m autoextend on
maxsize unlimited;
SQL> @spcreate
here it will ask for username and defalut tablespace for this username
SELECT Snap_Level FROM STATS$STATSPACK_PARAMETER
EXECUTE STATSPACK.MODIFY_STATSPACK_PARAMETER –
(i_snap_level=>5, i_buffer_gets_th=>100000, -
i_modify_parameter=>'true');
Level Description
0–4 General performance statistics on all memory areas, latches, pools, and
events, and segment statistics, such as rollback and undo segments.
5 Same statistics from the lower levels, plus the most resource-intensive
SQL statements.
6 Introduced in Oracle 9.0.1, level 6 includes the level 5 results plus
SQL plans.
7–9 Introduced in Oracle 10g, level 7 includes level 6 results plus additional
Segment Level statistics, including logical reads, physical reads/writes,
global cache cr/current served and buffer busy, ITL, and row lock waits.
10 and greater Same statistics from level 6 plus parent/child latch data.
to create snapshot
execute STATSPACK.SNAP;
to create statspack report
@ORACLE_HOME/rdbms/admin/spreport