运行$ORACLE_HOME/rdbms/admin/addmrpt.sql

 
  
  1. D:\>set nls_lang=AMERICAN 
  2.  
  3. D:\>sqlplus / as sysdba 
  4.  
  5. SQL*Plus: Release 10.2.0.1.0 - Production on Sat Aug 18 22:17:18 2012 
  6.  
  7. Copyright (c) 1982, 2005, Oracle.  All rights reserved. 
  8.  
  9.  
  10. Connected to
  11. Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production 
  12. With the Partitioning, OLAP and Data Mining options 
  13.  
  14. SQL> @G:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\addmrpt.sql 
  15.  
  16. Current Instance 
  17. ~~~~~~~~~~~~~~~~ 
  18.  
  19.    DB Id    DB Name      Inst Num Instance 
  20. ----------- ------------ -------- ------------ 
  21.  3913660635 ORALIFE             1 oralife 
  22.  
  23.  
  24. Instances in this Workload Repository schema 
  25. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  26.  
  27.    DB Id     Inst Num DB Name      Instance     Host 
  28. ------------ -------- ------------ ------------ ------------ 
  29. * 3913660635        1 ORALIFE      oralife      LAUGHING-PC 
  30.  
  31. Using 3913660635 for database Id 
  32. Using          1 for instance number 
  33.  
  34.  
  35. Specify the number of days of snapshots to choose from 
  36. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  37. Entering the number of days (n) will result in the most recent 
  38. (n) days of snapshots being listed.  Pressing <return> without 
  39. specifying a number lists all completed snapshots. 
  40.  
  41.  
  42.  
  43. Listing the last 3 days of Completed Snapshots 
  44.  
  45.                                                         Snap 
  46. Instance     DB Name        Snap Id    Snap Started    Level 
  47. ------------ ------------ --------- ------------------ ----- 
  48. oralife      ORALIFE            936 16 Aug 2012 00:00      1 
  49.  
  50.                                 937 16 Aug 2012 20:23      1 
  51.                                 938 16 Aug 2012 21:01      1 
  52.  
  53.                                 939 17 Aug 2012 20:13      1 
  54.                                 940 17 Aug 2012 21:00      1 
  55.                                 941 17 Aug 2012 22:00      1 
  56.                                 942 17 Aug 2012 23:00      1 
  57.                                 943 18 Aug 2012 00:00      1 
  58.  
  59.                                 944 18 Aug 2012 09:31      1 
  60.                                 945 18 Aug 2012 10:56      1 
  61.                                 946 18 Aug 2012 10:59      1 
  62.                                 947 18 Aug 2012 17:25      1 
  63.                                 948 18 Aug 2012 18:00      1 
  64.                                 949 18 Aug 2012 19:00      1 
  65.                                 950 18 Aug 2012 19:10      1 
  66.                                 951 18 Aug 2012 19:10      1 
  67.                                 952 18 Aug 2012 19:23      1 
  68.                                 953 18 Aug 2012 19:23      1 
  69.                                 954 18 Aug 2012 20:00      1 
  70.                                 955 18 Aug 2012 20:30      1 
  71.                                 956 18 Aug 2012 21:00      1 
  72.                                 957 18 Aug 2012 21:30      1 
  73.                                 958 18 Aug 2012 22:00      1 
  74.  
  75.  
  76.  
  77. Specify the Begin and End Snapshot Ids 
  78. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  79. Enter value for begin_snap: 945 
  80. Begin Snapshot Id specified: 945 
  81.  
  82. Enter value for end_snap: 946 
  83. End   Snapshot Id specified: 946 
  84.  
  85.  
  86.  
  87. Specify the Report Name 
  88. ~~~~~~~~~~~~~~~~~~~~~~~ 
  89. The default report file name is addmrpt_1_945_946.txt.  To use this name
  90. press <returnto continue, otherwise enter an alternative. 
  91.  
  92. Enter value for report_name: 
  93.  
  94. Using the report name addmrpt_1_945_946.txt 
  95.  
  96.  
  97. Running the ADDM analysis on the specified pair of snapshots ... 
  98.  
  99.  
  100. Generating the ADDM report for this analysis ... 
  101.  
  102.  
  103.           DETAILED ADDM REPORT FOR TASK 'TASK_3683' WITH ID 3683 
  104.           ------------------------------------------------------ 
  105.  
  106.               Analysis Period: 18-AUG-2012 from 10:56:24 to 10:59:50 
  107.          Database ID/Instance: 3913660635/1 
  108.       Database/Instance Names: ORALIFE/oralife 
  109.                     Host Name: LAUGHING-PC 
  110.              Database Version: 10.2.0.1.0 
  111.                Snapshot Range: from 945 to 946 
  112.                 Database Time: 1421 seconds 
  113.         Average Database Load: 6.9 active sessions 
  114.  
  115. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  116.  
  117.  
  118. FINDING 1: 100% impact (1440 seconds) 
  119. ------------------------------------- 
  120. SQL statements were found waiting for row lock waits. 
  121.  
  122.    RECOMMENDATION 1: Application Analysis, 100% benefit (1440 seconds) 
  123.       ACTION: Significant row contention was detected in the TABLE "LAU.T" 
  124.          with object id 56826. Trace the cause of row contention in the 
  125.          application logic using the given blocked SQL. 
  126.          RELEVANT OBJECT: database object with id 56826 
  127.       RATIONALE: The SQL statement with SQL_ID "4kg9ytrpamq3d" was blocked on 
  128.          row locks. 
  129.          RELEVANT OBJECT: SQL statement with SQL_ID 4kg9ytrpamq3d 
  130.          update t set id=30000 where id=1 
  131.  
  132.    SYMPTOMS THAT LED TO THE FINDING: 
  133.       SYMPTOM: Wait class "Application" was consuming significant database 
  134.                time. (100% impact [1440 seconds]) 
  135.  
  136. FINDING 2: 100% impact (1421 seconds) 
  137. ------------------------------------- 
  138. SQL statements consuming significant database time were found. 
  139.  
  140.    RECOMMENDATION 1: SQL Tuning, 100% benefit (1452 seconds) 
  141.       ACTION: Investigate the SQL statement with SQL_ID "4kg9ytrpamq3d" for 
  142.          possible performance improvements. 
  143.          RELEVANT OBJECT: SQL statement with SQL_ID 4kg9ytrpamq3d and 
  144.          PLAN_HASH 931696821 
  145.          update t set id=30000 where id=1 
  146.       RATIONALE: Waiting for event "enq: TX - row lock contention" in wait 
  147.          class "Application" accounted for 99% of the database time spent in 
  148.          processing the SQL statement with SQL_ID "4kg9ytrpamq3d"
  149.  
  150.  
  151. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  152.  
  153.           ADDITIONAL INFORMATION 
  154.           ---------------------- 
  155.  
  156. Wait class "Commit" was not consuming significant database time
  157. Wait class "Concurrency" was not consuming significant database time
  158. Wait class "Configuration" was not consuming significant database time
  159. CPU was not a bottleneck for the instance. 
  160. Wait class "Network" was not consuming significant database time
  161. Wait class "User I/O" was not consuming significant database time
  162. Session connect and disconnect calls were not consuming significant database 
  163. time
  164. Hard parsing of SQL statements was not consuming significant database time
  165.  
  166. The database's maintenance windows were active during 100% of the analysis 
  167. period. 
  168.  
  169. The analysis of I/O performance is based on the default assumption that the 
  170. average read time for one database block is 10000 micro-seconds. 
  171.  
  172. An explanation of the terminology used in this report is available when you 
  173. run the report with the 'ALL' level of detail. 
  174.  
  175.  
  176. End of Report 
  177. Report written to addmrpt_1_945_946.txt