003.ASH Report Analysis - How To Read ASH Report
003.ASH Report Analysis - How To Read ASH Report
Mallik
AWR:
--- Gives you only TOP SQLs
--- Other SQLs are executed at the same time which will not be captured in AWR
Example:
--- 1 standard program used to run in 10 second which taking 1 mins.
--- As per Application or business perspective SLA is 10 sec, At any cost this standard SQL has to
complete in 10 sec
--- Since this executed within 1 min so it never appeared in AWR report.
If application team is coming up and complaining out these type of issues and if you want to have a
look on these SQLs and issue best way to look at them is ASH report (Active Sessions History)
AWR
--- We will try to find out what happened at my DB 09 AM - Session 1 doing update
during that time period 10 AM - Session 2 doing delete
11 AM - Session 3 doing select
--- But which will give me only TOP Issues 11:20 AM – Session 1 is Idel
Application team are coming and complaining at 5:00 PM that morning 10 AM my query was not running properly.
V$ACTIVE_SESSION_HISTORY 1
2
Since this In memory view, It will be having data about last 60 mins
1 in 10 sec only Next question comes what happens beyond 60 mins?
DBA_HIST_ACTIVE_SESS_HISTORY
Waits
–Event, P1, P2, P3
SQL
–Sql_id, Opcode, Plan_hash
Objects
–Object#, File#, Block#
Application
–Program, Module, Action, Client_id, Service
To generate an ASH report on the local database instance using the command-line interface:
@$ORACLE_HOME/rdbms/admin/ashrpt.sql
To generate an ASH report on a specific database instance using the command-line interface:
@$ORACLE_HOME/rdbms/admin/ashrpti.sql
https://docs.oracle.com/database/121/TGDBA/sampling.htm#TGDBA279
To generate an ASH report on the local database instance using the command-line interface:
@$ORACLE_HOME/rdbms/admin/ashrpt.sql
To generate an ASH report on a specific database instance using the command-line interface:
@$ORACLE_HOME/rdbms/admin/ashrpti.sql
https://docs.oracle.com/database/121/TGDBA/sampling.htm#TGDBA279
6339 1 WAITING gtm@ns-acctmgr-02 (TNS V1-V3) 585drf2upjmt4 gc cr multi block request 163 194409 1
09B0000A00821E17 423 1 119155 N N
《 ==========blocking session 6339
520 1 WAITING 6339 1 JDBC Thin Client row cache lock 8 0 3 090A001D00A09584 275907 375 1141177 N N
546 1 WAITING 6339 1 JDBC Thin Client row cache lock 8 0 3 09DC000E0062B0F3 237852 124 2548434 N N
1425 1 WAITING 6339 1 JDBC Thin Client row cache lock 8 0 3 0918000200A3F6BF 275907 375 1389959 N N
1546 1 WAITING 6339 1 JDBC Thin Client row cache lock 8 0 3 0941000700ABE91A 275907 375 1130175 N N
1569 1 WAITING 6339 1 JDBC Thin Client row cache lock 8 0 3 09DE001100601B10 275907 308 3226885 N N
1730 1 WAITING 6339 1 JDBC Thin Client row cache lock 8 0 3 09F100150061865C -1 0 0 N N
…
2016-03-26 00:05:07 585drf2upjmt4 ALTER TABLE 3766qwdbcbx9u 2016-03-26 00:05:04 db file scattered read
<==================ALTER TABLE
=====Top level sql id 3766qwdbcbx9u