【ASH】使用ASH得到Oracle活动会话的历史信息

1.什么是ASH
ASH 英文全程是:Active Session History;
中文名字可以叫做:活动会话历史信息记录。
ASH是以V$SESSION视图为基础,每秒采样一次,目的是记录活动会话的等待事件。这样,就给我们这些DBA一种“找后账”的途径。

ASH是快速诊断数据库问题的一种参考途径,与AWR功效相仿。

2.记录一下ASH报告的生成过程
通过这个实验,完整记录一下生成ASH报告的过程。以便于有一个感性的认识。

ora10g@testsecdb /home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Wed Sep 9 11:10:51 2009

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options

sys@ora10g> @?/rdbms/admin/ashrpt.sql

Current Instance
~~~~~~~~~~~~~~~~

   DB Id    DB Name      Inst Num Instance
----------- ------------ -------- ------------
 4014372368 ORA10G              1 ora10g


Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type: text

Type Specified:  text


Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   DB Id     Inst Num DB Name      Instance     Host
------------ -------- ------------ ------------ ------------
* 4014372368        1 ORA10G       ora10g       testsecdb

Defaults to current database

Using database id: 4014372368

Defaults to current instance

Using instance number: 1


ASH Samples in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Oldest ASH sample available:  02-Sep-09 16:51:55   [   9739 mins in the past]
Latest ASH sample available:  09-Sep-09 11:10:36   [      1 mins in the past]


Specify the timeframe. to generate the ASH report
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter begin time for report:

--    Valid input formats:
--      To specify absolute begin time:
--        [MM/DD[/YY]] HH24:MI[:SS]
--        Examples: 02/23/03 14:30:15
--                  02/23 14:30:15
--                  14:30:15
--                  14:30
--      To specify relative begin time: (start with '-' sign)
--        -[HH24:]MI
--        Examples: -1:15  (SYSDATE - 1 Hr 15 Mins)
--                  -25    (SYSDATE - 25 Mins)

Defaults to -15 mins
Enter value for begin_time: 09/09/09 09:10:00
Report begin time specified: 09/09/09 09:10:00

Enter duration in minutes starting from begin time:
Defaults to SYSDATE - begin_time
Press Enter to analyze till current time
Enter value for duration: 30
Report duration specified:   30

Using 09-Sep-09 09:10:00 as report begin time
Using 09-Sep-09 09:40:00 as report end time


Specify Slot Width (using ashrpti.sql) for 'Activity Over Time' section
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- Explanation:
--   In the 'Activity Over Time' section of the ASH report,
--   the analysis period is divided into smaller slots
--   and top wait events are reported in each of those slots.

-- Default:
--   The analysis period will be automatically split upto 10 slots
--   complying to a minimum slot width of
--     1 minute,  if the source is V$ACTIVE_SESSION_HISTORY or
--     5 minutes, if the source is DBA_HIST_ACTIVE_SESS_HISTORY.


Specify Slot Width in seconds to use in the 'Activity Over Time' section:
Defaults to a value as explained above:
Slot Width specified:


Specify Report Targets (using ashrpti.sql) to generate the ASH report
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- Explanation:
--   ASH Report can accept "Report Targets",
--   like a particular SQL statement, or a particular SESSION,
--   to generate the report on. If one or more report targets are
--   specified, then the data used to generate the report will only be
--   the ASH samples that pertain to ALL the specified report targets.

-- Default:
--   If none of the report targets are specified,
--   then the target defaults to all activity in the database instance.


Specify SESSION_ID (eg: from V$SESSION.SID) report target:
Defaults to NULL:
SESSION report target specified:


Specify SQL_ID (eg: from V$SQL.SQL_ID) report target:
Defaults to NULL: (% and _ wildcards allowed)
SQL report target specified:


Specify WATI_CLASS name (eg: from V$EVENT_NAME.WAIT_CLASS) report target:
[Enter 'CPU' to investigate CPU usage]
Defaults to NULL: (% and _ wildcards allowed)
WAIT_CLASS report target specified:


Specify SERVICE_HASH (eg: from V$ACTIVE_SERVICES.NAME_HASH) report target:
Defaults to NULL:
SERVICE report target specified:


Specify MODULE name (eg: from V$SESSION.MODULE) report target:
Defaults to NULL: (% and _ wildcards allowed)
MODULE report target specified:


Specify ACTION name (eg: from V$SESSION.ACTION) report target:
Defaults to NULL: (% and _ wildcards allowed)
ACTION report target specified:


Specify CLIENT_ID (eg: from V$SESSION.CLIENT_IDENTIFIER) report target:
Defaults to NULL: (% and _ wildcards allowed)
CLIENT_ID report target specified:


Specify PLSQL_ENTRY name (eg: "SYS.DBMS_LOB.*") report target:
Defaults to NULL: (% and _ wildcards allowed)
PLSQL_ENTRY report target specified:

Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is ashrpt_1_0909_0940.txt.  To use this name,
press to continue, otherwise enter an alternative.
Enter value for report_name: ash_report

Using the report name ash_report

Summary of All User Input
-------------------------
Format         : TEXT
DB Id          : 4014372368
Inst num       : 1
Begin time     : 09-Sep-09 09:10:00
End time       : 09-Sep-09 09:40:00
Slot width     : Default
Report targets : 0
Report name    : ash_report


ASH Report For ORA10G/ora10g

DB Name         DB Id    Instance     Inst Num Release     RAC Host
------------ ----------- ------------ -------- ----------- --- ------------
ORA10G        4014372368 ora10g              1 10.2.0.3.0  NO  testsecdb

CPUs           SGA Size       Buffer Cache        Shared Pool    ASH Buffer Size
---- ------------------ ------------------ ------------------ ------------------
   4      1,024M (100%)       760M (74.2%)       248M (24.2%)        8.0M (0.8%)


          Analysis Begin Time:   09-Sep-09 09:10:00
            Analysis End Time:   09-Sep-09 09:40:00
                 Elapsed Time:        30.0 (mins)
                 Sample Count:          15
      Average Active Sessions:        0.01
  Avg. Active Session per CPU:        0.00
                Report Target:   None specified

Top User Events                DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

                                                               Avg Active
Event                               Event Class     % Activity   Sessions
----------------------------------- --------------- ---------- ----------
log file sync                       Commit               13.33       0.00
CPU + Wait for CPU                  CPU                   6.67       0.00
          -------------------------------------------------------------

Top Background Events          DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

                                                               Avg Active
Event                               Event Class     % Activity   Sessions
----------------------------------- --------------- ---------- ----------
control file parallel write         System I/O           46.67       0.00
CPU + Wait for CPU                  CPU                  20.00       0.00
log file parallel write             System I/O           13.33       0.00
          -------------------------------------------------------------

Top Event P1/P2/P3 Values      DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

Event                          % Event  P1 Value, P2 Value, P3 Value % Activity
------------------------------ ------- ----------------------------- ----------
Parameter 1                Parameter 2                Parameter 3
-------------------------- -------------------------- --------------------------
control file parallel write      46.67                   "3","3","3"      46.67
files                      block#                     requests

log file parallel write          13.33                   "2","4","2"      13.33
files                      blocks                     requests

log file sync                    13.33                "3799","0","0"       6.67
buffer#                    NOT DEFINED                NOT DEFINED

                                                      "4429","0","0"       6.67


          -------------------------------------------------------------

Top Service/Module             DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

Service        Module                   % Activity Action               % Action
-------------- ------------------------ ---------- ------------------ ----------
SYS$BACKGROUND UNNAMED                       80.00 UNNAMED                 80.00
ora10g         TOAD 9.7.2.5                   6.67 UNNAMED                  6.67
SYS$USERS                                     6.67                          6.67
               EM_PING                        6.67 AGENT_STATUS_MARKE       6.67
          -------------------------------------------------------------

Top Client IDs                 DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

                  No data exists for this section of the report.
          -------------------------------------------------------------

Top SQL Command Types          DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)
-> 'Distinct SQLIDs' is the count of the distinct number of SQLIDs
      with the given SQL Command Type found over all the ASH samples
      in the analysis period

                                           Distinct            Avg Active
SQL Command Type                             SQLIDs % Activity   Sessions
---------------------------------------- ---------- ---------- ----------
SELECT                                            1       6.67       0.00
          -------------------------------------------------------------
Top SQL Statements             DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

       SQL ID    Planhash % Activity Event                             % Event
------------- ----------- ---------- ------------------------------ ----------
141kncypu4abz  1494918175       6.67 CPU + Wait for CPU                   6.67
Select table_owner, table_name, db_link from sys.all_synonyms where synonym_name
=:Objectname and wner=:Name

          -------------------------------------------------------------

Top SQL using literals         DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

                  No data exists for this section of the report.
          -------------------------------------------------------------

Top PL/SQL Procedures          DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)
-> 'PL/SQL entry subprogram' represents the application's top-level
      entry-point(procedure, function, trigger, package initialization
      or RPC call) into PL/SQL.
-> 'PL/SQL current subprogram' is the pl/sql subprogram being executed
      at the point of sampling . If the value is 'SQL', it represents
      the percentage of time spent executing SQL for the particular
      plsql entry subprogram

PLSQL Entry Subprogram                                            % Activity
----------------------------------------------------------------- ----------
PLSQL Current Subprogram                                           % Current
----------------------------------------------------------------- ----------
SYSMAN.EMD_MAINTENANCE.EXECUTE_EM_DBMS_JOB_PROCS                        6.67
   SYSMAN.MGMT_JOB_ENGINE.PROCESS_EMD_QUEUE_ENTRIES                     6.67
          -------------------------------------------------------------
Top Sessions                   DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)
-> '# Samples Active' shows the number of ASH samples in which the session
      was found waiting for that particular event. The percentage shown
      in this column is calculated with respect to wall clock time
      and not total database activity.
-> 'XIDs' shows the number of distinct transaction IDs sampled in ASH
      when the session was waiting for that particular event
-> For sessions running Parallel Queries, this section will NOT aggregate
      the PQ slave activity into the session issuing the PQ. Refer to
      the 'Top Sessions running PQs' section for such statistics.

   Sid, Serial# % Activity Event                             % Event
--------------- ---------- ------------------------------ ----------
User                 Program                          # Samples Active     XIDs
-------------------- ------------------------------ ------------------ --------
      165,    1      46.67 control file parallel write         46.67
SYS                  oracle@testsecdb (CKPT)            7/1,800 [  0%]        0

      166,    1      20.00 log file parallel write             13.33
SYS                  oracle@testsecdb (LGWR)            2/1,800 [  0%]        0

                           CPU + Wait for CPU                   6.67
                                                        1/1,800 [  0%]        0

      167,    1      13.33 CPU + Wait for CPU                  13.33
SYS                  oracle@testsecdb (DBW0)            2/1,800 [  0%]        0

      147, 4114       6.67 CPU + Wait for CPU                   6.67
SYSTEM               toad.exe                           1/1,800 [  0%]        0

      158,19271       6.67 log file sync                        6.67
SYSMAN               oracle@testsecdb (J000)            1/1,800 [  0%]        0

          -------------------------------------------------------------



Error encountered in Top Blocking Sessions

While executing SQL statement: Len = 6845
SELECT dbms_ash_internal.get_sid_str(ash.blocking_session,  ash.blocki
ng_session_serial#) as sess,  ash.dim1_percentage,  ash.event, ash.dim
12_percentage,  dbms_ash_internal.get_blksid_user(      ash.blocking_s
ession,      ash.blocking_session_serial#),  dbms_ash_internal.get_blk
sid_program(      ash.blocking_session,      ash.blocking_session_seri
al#, 30),  dbms_ash_internal.get_blksid_active(      ash.blocking_sess
ion,      ash.blocking_session_serial#, 18),  dbms_ash_internal.get_bl
ksid_xids(      ash.blocking_session,      ash.blocking_session_serial
#)   FROM   ( SELECT d12aa_ash.* FROM   ( SELECT d12gb_ash.*,        (
dim1_count*100/:ash_num_rows) as dim1_percentage,        dense_rank()
over (order by dim1_count desc,                               blocking
_session, blocking_session_serial# )        as dim1_rank FROM   ( SELE
CT blocking_session, blocking_session_serial# ,        event ,
        count(*) as dim12_count,        (count(*) * 100 / :ash_num_row
s)        as dim12_percentage,        rank() over (partition by
         blocking_session, blocking_session_serial#
  order by count(*) desc,                        event
    )        as dim12_rank,        sum(count(*)) over (partition by
                    blocking_session, blocking_session_serial#)
as dim1_count FROM    ( SELECT unified_ash.* FROM    ( ( SELECT d.dbid
, inst.instance_number, 0 as snap_id,        a.sample_id, a.sample_tim
e,        a.session_id, a.session_serial#,        a.session_type,
   a.session_state, a.user_id,        a.sql_id, a.sql_opcode,        a
.sql_child_number, a.sql_plan_hash_value,        a.plsql_entry_object_
id, a.plsql_entry_subprogram_id,        a.plsql_object_id, a.plsql_sub
program_id,        a.service_hash, a.qc_session_id, a.qc_instance_id,
       nvl(a.event, 'CPU + Wait for CPU') as event,        nvl(a.event
_id, 1) as event_id,        nvl(a.wait_class, 'CPU') as wait_class,
     nvl(a.wait_class_id, 9999) as wait_class_id,        a.seq#,
  a.p1, a.p1text,        a.p2, a.p2text,        a.p3, a.p3text,
 a.wait_time, a.time_waited,        a.xid,        a.blocking_session,
a.blocking_session_serial#,        a.blocking_session_status,        a
.current_obj#, a.current_file#, a.current_block#,        a.program, a.
module, a.action, a.client_id FROM   V$ACTIVE_SESSION_HISTORY a,
  V$DATABASE d,        V$INSTANCE inst WHERE  1=1             and  :as
h_enable_mem_view = 1             and  a.sample_time between :ash_mem_

Encountered error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too
 small



Continuing to Next Section...
Top Sessions running PQs      DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

                  No data exists for this section of the report.
          -------------------------------------------------------------

Top DB Objects                 DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

                  No data exists for this section of the report.
          -------------------------------------------------------------

Top DB Files                   DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

                  No data exists for this section of the report.
          -------------------------------------------------------------

Top Latches                    DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)

                  No data exists for this section of the report.
          -------------------------------------------------------------
Activity Over Time             DB/Inst: ORA10G/ora10g  (Sep 09 09:10 to 09:40)
-> Analysis period is divided into smaller time slots
-> Top 3 events are reported in each of those slots
-> 'Slot Count' shows the number of ASH samples in that slot
-> 'Event Count' shows the number of ASH samples waiting for
   that event in that slot
-> '% Event' is 'Event Count' over all ASH samples in the analysis period

                         Slot                                   Event
Slot Time (Duration)    Count Event                             Count % Event
-------------------- -------- ------------------------------ -------- -------
09:10:00   (2.0 min)        2 log file parallel write               1    6.67
                              log file sync                         1    6.67
09:12:00   (3.0 min)        1 control file parallel write           1    6.67
09:15:00   (3.0 min)        1 control file parallel write           1    6.67
09:18:00   (3.0 min)        3 CPU + Wait for CPU                    3   20.00
09:21:00   (3.0 min)        2 CPU + Wait for CPU                    1    6.67
                              control file parallel write           1    6.67
09:24:00   (3.0 min)        2 control file parallel write           2   13.33
09:30:00   (3.0 min)        3 control file parallel write           1    6.67
                              log file parallel write               1    6.67
                              log file sync                         1    6.67
09:33:00   (3.0 min)        1 control file parallel write           1    6.67
          -------------------------------------------------------------

End of Report
Report written to ash_report
sys@ora10g>


同样的时间段,也可以使用html的格式生成报告。

3.使用EM生成ASH报告的方法
另外一种生成html的方法是使用Oracle Enterprise Manager工具。方法很简单,只需要进入到“Performance”,点击“Run ASH Report”稍等片刻即可得到相应的报告。

附一份在OEM中生成的ASH报告,进一步加深感性认识。

EM_DC_banner.gif
Setupt.gifPreferencest.gifHelpt.gifLogout
tb-D.gift.gif
c-ghss.gift.gifc-ghse.gift.gifc-ghe.gif
t.gif
t.gif
Database Instance: ora10g  >  Run ASH Reportt.gifLogged in As SYS
Run ASH Report
t.gif
Specify the time period for the report.b-createReport.gif
t.gif
Start Datet.gifvar _locale='en-US';var _tLocale='en';var _df2DYS=1950;var _dfs=new Object();_dfs["startDate"]='M/d/yy't.gifvar _jspDir='/em/cabo/jsps/';var _configName='_uixDefCfg';var _enc='UTF-8';var _contextURI='/em';c-dp.gif

(Example: 12/15/03)
t.gif
Start Timet.gif121234567891011000102030405060708091011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859AMPM
End Datet.gif_dfs["endDate"]='M/d/yy't.gifc-dp.gif

(Example: 12/15/03)
t.gif
End Timet.gif121234567891011000102030405060708091011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859AMPM
t.gif
t.gif
Report Results
t.gif
t.gif
b-saveToFile.gif
body.awr {font:bold 10pt Arial,Helvetica,Geneva,sans-serif;color:black; background:White;} pre.awr {font:8pt Courier;color:black; background:White;}h1.awr {font:bold 20pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;border-bottom:1px solid #cccc99;margin-top:0pt; margin-bottom:0pt;padding:0px 0px 0px 0px;} h2.awr {font:bold 18pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;margin-top:4pt; margin-bottom:0pt;} h3.awr {font:bold 16pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;margin-top:4pt; margin-bottom:0pt;}li.awr {font: 8pt Arial,Helvetica,Geneva,sans-serif; color:black; background:White;} th.awrnobg {font:bold 8pt Arial,Helvetica,Geneva,sans-serif; color:black; background:White;padding-left:4px; padding-right:4px;padding-bottom:2px}th.awrbg {font:bold 8pt Arial,Helvetica,Geneva,sans-serif; color:White; background:#0066CC;padding-left:4px; padding-right:4px;padding-bottom:2px} td.awrnc {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:White;vertical-align:top;} td.awrc {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;}a.awr {font:bold 8pt Arial,Helvetica,sans-serif;color:#663300; vertical-align:top;margin-top:0pt; margin-bottom:0pt;}

ASH Report For ORA10G/ora10g

DB NameDB IdInstanceInst numReleaseRACHost
ORA10G4014372368ora10g110.2.0.3.0NOtestsecdb

CPUsSGA SizeBuffer CacheShared PoolASH Buffer Size
41,024M (100%)760M (74.2%)248M (24.2%)8.0M (0.8%)


Sample TimeData Source
Analysis Begin Time:09-9月 -09 12:12:20V$ACTIVE_SESSION_HISTORY
Analysis End Time:09-9月 -09 12:17:20V$ACTIVE_SESSION_HISTORY
Elapsed Time: 5.0 (mins)  
Sample Count: 10 
Average Active Sessions: 0.03 
Avg. Active Session per CPU: 0.01 
Report Target:None specified 

ASH Report


Back to Top

Top Events

Back to Top

Top User Events

EventEvent Class% ActivityAvg Active Sessions
CPU + Wait for CPUCPU50.000.02

Back to Top Events
Back to Top

Top Background Events

EventEvent Class% ActivityAvg Active Sessions
CPU + Wait for CPUCPU30.000.01
control file parallel writeSystem I/O20.000.01

Back to Top Events
Back to Top

Top Event P1/P2/P3 Values

Event% EventP1 Value, P2 Value, P3 Value% ActivityParameter 1Parameter 2Parameter 3
control file parallel write20.00"3","3","3"20.00filesblock#requests

Back to Top Events
Back to Top

Load Profile

Back to Top

Top Service/Module

ServiceModule% ActivityAction% Action
SYS$BACKGROUNDUNNAMED50.00UNNAMED50.00
SYS$USERSRealtime Connection50.00UNNAMED50.00

Back to Load Profile
Back to Top

Top Client IDs

No data exists for this section of the report.

Back to Load Profile
Back to Top

Top SQL Command Types

  • 'Distinct SQLIDs' is the count of the distinct number of SQLIDs with the given SQL Command Type found over all the ASH samples in the analysis period
SQL Command TypeDistinct SQLIDs% ActivityAvg Active Sessions
SELECT450.000.02

Back to Load Profile
Back to Top

Top SQL

Back to Top

Top SQL Statements

SQL IDPlanhash% ActivityEvent% EventSQL Text
257rmrxgvaj4z167814123120.00CPU + Wait for CPU20.00select begin_time, wait_class...
b8b5jdj7khuaw309811561510.00CPU + Wait for CPU10.00SELECT event#, sql_id, sql_p...
cakg0hdjjw2wf171622112310.00CPU + Wait for CPU10.00select value from v$sysmetric ...
fsz8wz5pmvamh171622112310.00CPU + Wait for CPU10.00select metric_id, value from ...

Back to Top SQL
Back to Top

Top SQL using literals

No data exists for this section of the report.

Back to Top SQL
Back to Top

Complete List of SQL Text

SQL IdSQL Text
257rmrxgvaj4zselect begin_time, wait_class#, (time_waited)/(intsize_csec/100) from v$waitclassmetric union all select begin_time, -1, value from v$sysmetric where metric_name = 'CPU Usage Per Sec' and group_id = 2 order by begin_time, wait_class#
b8b5jdj7khuawSELECT event#, sql_id, sql_plan_hash_value, sql_opcode, session_id, session_serial#, module, action, client_id, DECODE(wait_time, 0, 'W', 'C'), 1, time_waited, service_hash, user_id, program, sample_time, p1, p2, p3, current_file#, current_obj#, current_block#, qc_session_id, qc_instance_id FROM v$active_session_history WHERE sample_time > :1 AND sample_time <= :2
cakg0hdjjw2wfselect value from v$sysmetric where group_id = 2 and metric_id = :1
fsz8wz5pmvamhselect metric_id, value from v$sysmetric where intsize_csec > 5900 and group_id = 2 and metric_id in (2092, 2093, 2125, 2126, 2100, 2124, 2127, 2128)

Back to Top SQL
Back to Top

Top PL/SQL Procedures

No data exists for this section of the report.


Back to Top

Top Sessions

Back to Top

Top Sessions

  • '# Samples Active' shows the number of ASH samples in which the session was found waiting for that particular event. The percentage shown in this column is calculated with respect to wall clock time and not total database activity.
  • 'XIDs' shows the number of distinct transaction IDs sampled in ASH when the session was waiting for that particular event
  • For sessions running Parallel Queries, this section will NOT aggregate the PQ slave activity into the session issuing the PQ. Refer to the 'Top Sessions running PQs' section for such statistics.
Sid, Serial#% ActivityEvent% EventUserProgram# Samples ActiveXIDs
132, 251850.00CPU + Wait for CPU50.00DBSNMPOMS5/300 [ 2%]0
167, 130.00CPU + Wait for CPU30.00SYSoracle@testsecdb (DBW0)3/300 [ 1%]0
165, 120.00control file parallel write20.00SYSoracle@testsecdb (CKPT)2/300 [ 1%]0

Back to Top Sessions
Back to Top

Top Blocking Sessions

No data exists for this section of the report.

Back to Top Sessions
Back to Top

Top Sessions running PQs

No data exists for this section of the report.

Back to Top Sessions
Back to Top

Top Objects/Files/Latches

Back to Top

Top DB Objects

No data exists for this section of the report.

Back to Top Objects/Files/Latches
Back to Top

Top DB Files

No data exists for this section of the report.

Back to Top Objects/Files/Latches
Back to Top

Top Latches

No data exists for this section of the report.

Back to Top Objects/Files/Latches
Back to Top

Activity Over Time

  • Analysis period is divided into smaller time slots
  • Top 3 events are reported in each of those slots
  • 'Slot Count' shows the number of ASH samples in that slot
  • 'Event Count' shows the number of ASH samples waiting for that event in that slot
  • '% Event' is 'Event Count' over all ASH samples in the analysis period
Slot Time (Duration)Slot CountEventEvent Count% Event
12:12:20 (40 secs)1control file parallel write110.00
12:14:00 (1.0 min)2CPU + Wait for CPU220.00
12:15:00 (1.0 min)6CPU + Wait for CPU660.00
12:16:00 (1.0 min)1control file parallel write110.00


Back to Top

End of Report

var _resetfooNames=["event"];var _foo_Validations=['new SimpleDateFormat(\'M/d/yy\').validate(%value%)'];function _fooValidater(form){var fl = _multiValidate(form,[0,"startDate",0,1,0,"endDate",0,1]);if (fl.length>0){alert('Form. validation failures:'+fl);return false;}else{return true;}}var _foo_Labels={'startDate':'Start Date','endDate':'End Date'};var _foo_Formats=['Value "%value%" in "%label%" is not a date.'];function _submitOnEnter(e, frm) { var kc; if(window.event) kc=window.event.keyCode; else if(e) kc=e.which; else return true; return (kc!=13);}
t.gif
t.gifc-skir.gif
t.gif
t.gif
Database  |  Setup  |  Preferences  |  Help  |  Logout
Copyright © 1996, 2006, Oracle. All rights reserved.
About Oracle Enterprise Manager 10g Database Control

4.小结
使用ASH报告可以很便捷的获取系统当前及短期“逝去”的运行情况,对于诊断系统性能问题有很大的帮助。

Good luck.

secooler
09.09.09

-- The End --


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/519536/viewspace-614228/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/519536/viewspace-614228/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值