Sie sind auf Seite 1von 2

[1] select * from (select event, waits Waits , time Wait Time (s) , pct*100 Percent of Total , waitclass

Wa t Class from (select e.event_name event, e.total_waits nvl(b.total_waits,0) waits, (e.time_waited_micro nvl(b.time_waited_micro,0))/1000000 time , (e.time_waited_micro nvl(b.time_waited_micro,0))/(select sum(e1.time_waited_mi cro nvl(b1.time_waited_micro,0)) from dba_hist_system_event b1 , dba_hist_system_event e1 where b1.snap_id(+) = b.snap_id and e1.snap_id = e.snap_id and b1.dbid(+) = b.db id and e1.dbid = e.dbid and b1.instance_number(+) = b.instance_number and e1.instance_number = e.instance_number and b1.event_id(+) = e1.event_id and e1.total_waits > nvl(b1.total_waits,0) and e1.wait_class <> Idle ) pct , e.wait_class waitclass from dba_hist_system_event b , dba_hist_system_event e where b.snap_id(+) = &pBgnSnap and e.snap_id = &pEndSnap and b.event_id(+) = e.event_id and e.total_waits > nvl(b.total_waits,0) and e.wait_class <> Idle order by waits desc ) where rownum < 11) ; [2] SELECT extent_management, 2 allocation_type, 3 segment_space_management 4 FROM dba_tablespaces 5* WHERE tablespace_name='TEST01'; [3] CREATE TABLESPACE test02 2 DATAFILE '/pasx02/oradata/pasx/test02.dbf' size 500M 3 EXTENT MANAGEMENT local 4 AUTOALLOCATE 500M 5* SEGMENT SPACE MANAGEMENT auto; [4] TIMED_STATISTICS files. Must be set to TRUE to get timing information in your trace

MAX_DUMP_FILE_SIZE Controls the maximum size of the trace file. For 10046 trace files, the default setting is generally too small. USER_DUMP_DEST This is the location the 10046 trace file(s) are written to.

STATISTICS_LEVEL This should be set, at a minimum, to TYPICAL. When set to ALL, more information will be collected in the resulting t race files. All examples in this white paper are with STATISTICS_LEVEL set to TYPI

CAL. The default value of this setting in Oracle Database 10g is unlimited, which can be a disaster because Oracle will allow you to fill up a file system i f you are not careful. This can be bad news if your USER_DUMP_DEST is set to a location that does not d eal well with being filled up. Locations such as ORACLE_HOME and root are not recommended locations to assign USER_DUMP_DEST to. Also, most Oracle platforms allow the MAX_DUMP_FILE_SIZE to be set to unlimited. Be careful if this is your setting! Here are some examples of setting these para meters with the alter session command: ALTER SYSTEM SET timed_statistics=TRUE By default only those who have access to the Oracle user account, or are a membe r of the Oracle DBA group, will be able to read the output of the 10046 trace event. If you should wish all users to have access to these files, you can set the hidden Oracle parameter _trace_files_public to TRUE.