Thursday, 26 May 2022
RMAN backup scripts
Sunday, 22 May 2022
Observations of database slowness
Friday, 13 May 2022
AWR Analysis methodology
1. Review header information looking at Oracle® release data, the duration of the report period, number of sessions, is this real application clusters (RAC) or not, various memory area sizing and block size. Oracle release level can highlight specific release related bugs and issues. Generally long duration reports will tend to average out issues and you may need to request a report specific to a problem time period. Number of sessions is used with later analysis to determine overall system load. RAC determines if you need to review interconnect issues. Also, only one node’s report from a 2 - 4 node system may be useless unless the actual problem is occurring on that node. Memory sizes such as DB cache size and shared pool size can quickly pinpoint issues.
For example, if the shared pool is larger than the DB cache size then there are probably bind variable or versioning issues in the database.
2. Review the load profile section next. I pay most attention to physical reads, physical writes, hard parse to parse ratio and executes to transaction ratio. The sum of physical reads and writes will tell you the amount of block IOPS, then multiply times block size and you have a quick throughput estimate. The ratio of hard parses to parses tells you how often SQL is being fully parsed. Full parsing of SQL statements has a negative effect on performance. High hard parse ratios (>2 - 3 percent) indicate probable bind variable issues or maybe versioning problems. Rows per sort can also be reviewed here to see if large sorts are occurring.
3. Review the Instance Efficiencies section next. The hit rates for the cache and shared pool, Execute to Parse, Parse CPU to Parse
Elapsed, In Memory Sort and Soft Parse percents are what I look at here. The first two being low indicate possible cache or shared pool issues, the next two, bind variable and versioning issues. In Memory Sort being low (in the high 90s or lower) indicates
PGA_AGGREGATE_TARGET or SORT_AREA_SIZE issues and Soft Parsing being low ties in with the first two indicating bind variable and versioning issues. It only takes a few percent of non-memory sorts to drive the temporary tablespace to the top of the IO list.
4. Next look at the Shared Pool Statistics. If your usage is low (<85 percent) then your shared pool is over sized. If your reuse is low (<60 - 70 percent) you may have bind variable or versioning issues. Ideally all the percentages in this area of the report should be as high (close to 100) as possible.
5. The next section, the Top Five Wait Events, is arguably the most important part of the report. Using the wait events highlighted here you can quickly find where issues are occurring, allowing you to zoom into other areas of the report. Here are a few hot buttons:
a. Db file sequential reads: Usually indicates memory starvation, look at the db cache analysis and for buffer busy waits along with cache latch issues.
b. Db file scattered reads: Usually indicates excessive full table scans, look at the AWR segment statistics for tables that are fully scanned. If this is a Statspack and you are at or above Oracle9i, look at the v$sql_plan table to see where the full table scans or full index scans are happening, here is an example script to look at the full table scans.
rem based on V$SQL_PLAN table
col operation format a13
col object_name format a32
col object_owner format a10
col options format a15
col executions format 999,999,999
column dt new_value today noprint
select to_char(sysdate,’ddmonyyyyhh24miss’) dt from dual;
set pages 55 lines 132 trims on
ttitle ‘Full Table/Index Scans’
spool fts&&today
select
a.hash_value,a.object_owner,a.object_name, rtrim(a.operation) operation,
a.options, sum(b.executions) executions, c.bytes, (sum(b.executions)*c.bytes)/(1024*1024)
fts_meg
from
v$sql_Plan a, v$sqlarea b, dba_segments c
where
(a.object_owner=c.owner
and a.object_name=c.segment_name)
and a.address=b.address
and a.operation IN (‘TABLE ACCESS’,’INDEX’)
and nvl(a.options,’NULL’) in (‘FULL’,’NULL’,’FULL SCAN’)
and a.object_owner not in (‘SYS’,’SYSTEM’,’PERFSTAT’,’SYSMAN’,’WKSYS’,’DBSNMP’)
and b.executions>1
group by a.hash_value,a.object_owner, a.object_name, operation, options, c.bytes
order by a.object_owner,a.object_name,operation, options, executions desc
/
spool off
set pages 20
How to recovery PDB when PDB database is dropped in Oracle
How to recovery PDB when PDB database is dropped :) [oracle@rac01 ~]$ sqlplus '/as sysdba' SQL*Plus: Release 21.0.0.0.0 - Product...
-
What Is OEM? Oracle Enterprise Manager (OEM) has built-in management capabilities that enable DBAs and Apps DBAs to monitor and ma...
-
In each version of the Oracle database, a large number of background processes will be added. Below I have compiled a list of Oracle backg...
-
Oracle ASMCMD is ASM command-line utility that you can use to manage Oracle ASM instances, disk groups, file access control for disk groups,...