| |
 |
|
Oracle Tips by Burleson |
Tuning to Prevent Contention
Contention occurs when a number of users attempt to access the same
resource at the same time. This can occur for any database object
but is most noticeable when the contention is for rollback segments,
redo logs, latches, or locks. You may also experience contention
during the processes involved with the multithreaded server.
To correct contention, you must first realize that it is occurring.
The procedure called in the script shown in Source 13.18 can be used
to monitor for contention. The procedure called is a part of the
DBA_UTILITIES package, described later in this chapter, in section
13.8, “Using the DBA_UTILITIES Package.” (Note, this package is over
1,200 lines long; if you want to look at it, download it from the
Wiley Web site.) The report generated by this script is shown in
Listing 13.19.
SOURCE 13.18 The RUNNING_STATS
calling script.
REM
REM NAME : DO_CALSTAT.SQL
REM FUNCTION :Generate calculated statisitics report using
REM FUNCTION :just_statistics procedure
REM USE :FROM STATUS.SQL or SQLPLUS
REM Limitations :
REM Revisions:
REM Date Modified By Reason For change
REM 05-MAY-1992 Mike Ault Initial Creation
REM 23-JUN-1997 Mike Ault Updated to V8
REM
SET PAGES 58 NEWPAGE 0
EXECUTE dba_utilities.running_stats(TRUE);
START title80 "CALCULATED STATISTICS REPORT"
DEFINE output = rep_out\&db\cal_stat.lis
SPOOL &output
SELECT * FROM dba_temp;
SPOOL OFF
This is an excerpt by
Mike Ault’s book “Oracle
Administration & Management” . If you want more current Oracle
tips by Mike Ault, check out his new book “Mike
Ault’s Oracle Internals Monitoring & Tuning Scripts” or Ault’s
Oracle Scripts Download. |