TTILE OFF
PROMPT
PROMPT 3.0 Log Switch in The Last Day
PROMPT
Prompt
TTILE LEFT "*** Database:" xdbname ", how offen the log switch (as of:" xdate ") ***" SKIP 1
Column Archive_name Format A40
Column "Time" Format A25
Select to_char (TO_DATE (Time, 'MM / DD / RR HH24: MI: SS'), 'DD-MON-RRRR HH24: MI: SS') "Time",
Archive_name
From v $ log_history
WHERE to_DATE (Time, 'MM / DD / RR HH24: MI: SS')> SYSDATE - 1
ORDER BY TO_DATE (Time, 'MM / DD / RR HH24: MI: SS') DESC;
Prompt
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt 3.0 Investness
Prompt Standard:
Prompt During Periods of High Activity, Log Switches Are Occurring Every 20 Minutes
Prompt <<<<<<<<<<<<<<<<<< Note: >>>>>>>>>>>>>>>>>>>>>> PROMPT
TTILE OFF
Prompt
PROMPT
PROMPT 3.1 Log Buffer - Redo Log Space Requests: The Value
Prompt Should Be Relative Small Prompt Server IS WAITI for
Prompt Disk Space To BE Allocate for Redo Log Entries
Prompt Space Is Created by Performing A Log Switch
PROMPT
Prompt
TTILE LEFT "*** log buffers - redo log space requests ***" SKIP 1
SELECT SUBSTR (Name, 1, 25) "log buffers",
Substr (Value, 1, 15) "Value (NEAR 0?)"
From v $ sysstat
Where name = 'redo log space requests'
/
Prompt
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt 3.1 Investigation
Prompt if the value is not near 0, increase log buffer.prompt <<<<<<<<<<<<<<<<< Note: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>
Prompt
TTILE OFF
Prompt
PROMPT
PROMPT 3.2 Log Buffer - Log Buffer Space
PROMPT
Prompt
TTILE LEFT "*** log buffers - log buffer space waits ***" SKIP 1
SELECT SID, EVENT, SECONDS_IN_WAIT, STATE
From v $ session_wait
WHERE Event = 'log buffer Space'
/
Prompt
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt 3.2 Investness
Prompt there be no log buffer space Waits
Prompt Making The Log Buffer Bigger if IT Is Small
Prompt Moving The log files to faster Disks Such As Striped Disks
Prompt <<<<<<<<<<<<<<<<<< Note: >>>>>>>>>>>>>>>>>>>>>> PROMPT
TTILE OFF
Prompt
PROMPT
Prompt 3.3 Log Buffer - Redo Buffer Allocation Retries
PROMPT
Prompt
TTILE LEFT "*** log buffers - redo buffer allocation retries ***" SKIP 1
Column name Print
Select Name, Value
From v $ sysstat
WHERE Name in ('Redo Buffer Allocation Retries', 'Redo Entries')
/
Prompt
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt 3.3 Investigation
Prompt Redo Buffer Allocation Retries Should Be Near 0
Prompt The Number SHOULD BE Less Than 1% of Redo Entries
Prompt Increase the size of the redo log buffer (log buffer)
Prompt Improve the checkpointing or archiving process
Prompt <<<<<<<<<<<<<<<<<< Note: >>>>>>>>>>>>>>>>>>>>>> PROMPT
TTILE OFF
Prompt
PROMPT
PROMPT 3.4 Log Buffer - Log File Switch COMPLETION
Prompt Identify The Log File Switch Waits Because of Log Switches
PROMPT
Prompt
TTILE LEFT "*** log buffers - log file switch ***" SKIP 1
SELECT EVENT, TOTAL_WAITS, TIME_WAITED, AVERAGE_WAIT
From v $ system_event
WHERE EVENT LIKE 'LOG File Switch Completion%'
/
Prompt
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt 3.4 Investigation
Prompt Increase the size of the redo log files
Prompt <<<<<<<<<<<<<<<<<< Note: >>>>>>>>>>>>>>>>>>>>>> PROMPT
TTILE OFF
Prompt
PROMPT
PROMPT 3.5 Log Buffer - CheckPoint Incomplete
PROMPT
Prompt
TTILE LEFT "*** log buffers - checkpoint incompletion ***" SKIP 1
SELECT EVENT, TOTAL_WAITS, TIME_WAITED, AVERAGE_WAIT
From v $ system_event
WHERE EVENT LIKE 'LOG FILE SWITCH (CHECK%'
Or Event Like 'Log File Switch (Arch%'
/
Prompt
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt 3.5 Investigation
Prompt Check The Frequency of Check Points and Set The Appropriate Values
PROMPT for log_checkpoint_interval and log_checkpoint_timeout
Prompt Check The size and number of redo log groups
Prompt Confirm That The Archive Device IS Not Full
Prompt add redo log groups
Prompt increase the number of buffers to archive and reducing the size of buffers by setting
PROMPT log_archive_buff_rchive_buff_rchive_buffer_size
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt
TTILE OFF
Prompt
PROMPT
Prompt 4.0 Share Pool Size - Gets and Misses (Library Cache)
PROMPT
Prompt
Column "Executions" Format 9, 999, 999, 990
Column "Cache Misses Executing" Format 9, 999, 999, 990
Column "Data Dictionary Gets" Format 9,999,999,999
Column "Get Misses" Format 9, 999, 999, 999
Column "% Ratio" format 999.99
TTITLE LEFT SKIP 1 -
Left "*** Shared pool size ***" SKIP 1
Select SUM (Pins) "Executions",
SUM (RELOADS) "Cache Misses Executing",
(SUM (RELOADS) / SUM (PINS) * 100) "% Ratio"
From v $ librarycache
/
Prompt
Prompt <<<<<<<<<<<<<<<<<< Note: >>>>>>>>>>>>>>>>>> PROMPT 4.0 Investigation
Prompt if% Ratio is Above 1%, Increase Share_pool_size.
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt
TTILE OFF
Prompt
PROMPT
Prompt 4.1 Share Pool Size - Gets and Misses (Data Dictionary)
PROMPT
Prompt
TTILE LEFT "*************** Shared pool size (dictionary gets) **********" SKIP 1
Select SUM (Gets) "Data Dictionary Gets",
SUM (GetMisses) "Get Misses",
100 * (SUM (GETMISSES) / SUM (Gets)) "Ratio"
From v $ rowcache
/
Prompt
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt 4.1 Investigation
PROMPT IF% Ratio Is Above 12%, Increase Shared_Pool_Size.Prompt <<<<<<<<<<<<<<<<< Note: >>>>>>>>>>>>>>>>> >>>>>>
Prompt
TTILE OFF
Prompt
PROMPT
PROMPT 5.0 Check Which SQL Is The Most Cost SQL
PROMPT
Prompt
TTILE OFF
TTILE LEFT "*** V $ SQL Check ***" SKIP 1
Column SQL_Text Format A50
SELECT SQL_TEXT, EXECUTIONS, ROWS_PROCESSED, BUFFER_GETS / 100, DISK_READS / 100
From v $ SQL V, (SELECT SUM (Buffer_Gets) TOT_GETS from V $ SQL)
WHERE BUFFER_GETS> TOT_GETS * 0.1
Order by buffer_gets desc
/
Prompt
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt 5.0 Investness
Prompt SELECTED SQL IS The MOST COST SQL (> 10% of Total Gets)
Prompt <<<<<<<<<<<<<<<<<< Note: >>>>>>>>>>>>>>>>>>>>>> PROMPT
TTILE OFF
Prompt
PROMPT
Prompt 6.0 How much CPU is buy for Each Session
PROMPT
Prompt
TTILE LEFT "*** CPU usage ***" SKIP 1
Column UserName Format A10
Column Machine Format A15
Column Osuser Format A15
Column Terminal Format A15
COLUMN Program Format A20
Select S.SID, V.SERIAL #, V.USERNAME, V. OSUSER, V.MACHINE, V.TERMINAL, V.PROGRAM, S.VALUE "CPU Used"
From V $ SESSSTAT S, V $ STATNAME N, V $ session v
Where s.statistic # = n.statistic # and n.name = 'cpu buy by this session'
And S.SID = V.SID
/
Prompt
Prompt <<<<<<<<<<<<<<<<<< NOTE: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Prompt 6.0 Investness
Prompt
Prompt <<<<<<<<<<<<<<<<<< Note: >>>>>>>>>>>>>>>>>>>>>> PROMPT