Gather_table_stats and AWR

Hi all,
i would like to disable automatic gathering of table statistics with dbms_scheduler.disable(name => 'SYS.GATHER_STATS_JOB'), because we like to gather statistics every time immediatly after we batch load our tables in our data warehouse. Is it right that this job is also needed for AWR and that oracle will not save system statistics once per hour if i disable this job?
Database version is 10gR2.
Thanks,
Robert

user1367414 wrote:
Hi all,
i would like to disable automatic gathering of table statistics with dbms_scheduler.disable(name => 'SYS.GATHER_STATS_JOB'), because we like to gather statistics every time immediatly after we batch load our tables in our data warehouse. Is it right that this job is also needed for AWR and that oracle will not save system statistics once per hour if i disable this job?
Database version is 10gR2.Robert,
the recommended way to disable automatic statistics collection on the non-Oracle objects in 10g is:
exec DBMS_STATS.SET_PARAM('AUTOSTATS_TARGET', 'ORACLE')
This way the job still gets executed but collects only statistics on the dictionary / AWR / etc. (owned by Oracle) tables. If you disable the job completely, your dictionary statistics might get outdated, potentially leading to suboptimal dictionary performance.
By the way:
"Oracle Database 10g uses a scheduled job, GATHER_STATS_JOB, to collect AWR statistics."This is a bit misleading, the job's purpose is to collect object statistics, as already mentioned the AWR snapshots are controlled differently (and by default are taken every hour, not only during the maintenance windows).
Another way you could handle your requirement would be to lock the statistics of the affected table or schemas by using DBMS_STATS.LOCK_TABLE/SCHEMA_STATS. This way these tables/schemas will be skipped by the default gathering job, and you need then to use the "FORCE=>true" parameter when gathering statistics individually. Note that there is one peculiarity with this approach: If you create/rebuild indexes on a table having the statistics locked, the default option "COMPUTE STATISTICS" of 10g doesn't apply any more, so it doesn't update the statistics of the index automatically in the dictionary, and there is unfortunately no "force" parameter available in the CREATE/ALTER INDEX command. You would need to either temporarily unlock the statistics or gather the index statistics separately (which means additional work for the database).
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/
Edited by: Randolf Geist on Jan 18, 2009 12:17 PM
Added note about lock statistics approach

Similar Messages

  • Diff b/w snapshot baselines and AWR reports

    Hi All,
    Can anyone tell what is the difference b/w snapshot baselines and AWR reports. I have gone through couple of articles and i feel both are same, however given different names.
    Am I correct?
    Thanks

    AWR report is a report comparing the pair of snapshots and thus giving you the details of what has happened between that inerval!
    The baselines is that "interesting time period" which you define telling to oracle and is used by oracle to compute the sql response tiime of your db with it in the subsequent timings. So both are completely different actually!
    HTH
    Aman....

  • License position for ADDM, ASH and AWR

    What's the license position for ADDM, ASH & AWR ?
    I see these are freely available via OEM DB Control on my database instance. However I think I remember seeing ( though I can't find it now ) something that said they are chargeable ( under the Oracle Diagnostics pack license ? ). So even though they are freely accessible from OEM, if you use them you become liable for a license fee !
    I understood that AWR is really the replacement for Stats Pack but that Stats Pack is still in 11g because it is free ( whilst ADDM, ASH and AWR are not ) - is that correct ?
    I have not been able to find any documentation pertaining to the licensing / chargability ( or otherwise ) of these producs / features
    Can anyone clear the confusion ?

    Hi,
    Statspack is still free and the diagnostic features are licenced.
    Pricing details can be obtained from
    http://www.oracle.com/us/corporate/pricing/price-lists/index.html
    http://www.oracle.com/us/corporate/pricing/technology-price-list-070617.pdf
    -Aravind

  • How to monitor on disk i/o on healthcheck and awr report on biweekly health

    can you explain how to monitor from disk i/o and awr report from old snap shot to new snap shot
    how to check and analyze .,,,,,,,,,,,,,,,,,,,,,can any one tell few points which we can **regularly maintain for health check**
    thanks in advance
    SQL> SELECT group_number ,disk_number ,mount_status ,total_mb/1024 ,free_mb/1024
    2 ,reads, (bytes_read / (1024*1024*1024)) mb_read ,read_errs ,read_time,writes
    3 ,write_errs ,write_time FROM v$asm_disk;
    GROUP_NUMBER DISK_NUMBER MOUNT_S TOTAL_MB/1024 FREE_MB/1024 READS
    MB_READ READ_ERRS READ_TIME WRITES WRITE_ERRS WRITE_TIME
    2 0 OPENED 199.989258 0 13697147
    402.589765 0 44542.38 4358669 0 8883.86
    2 1 OPENED 199.989258 0 13653653
    405.503195 0 46014.33 4805783 0 11138.13
    2 2 OPENED 199.989258 0 15272350
    415.620874 0 45524.7 4571038 0 9806.01
    GROUP_NUMBER DISK_NUMBER MOUNT_S TOTAL_MB/1024 FREE_MB/1024 READS
    MB_READ READ_ERRS READ_TIME WRITES WRITE_ERRS WRITE_TIME
    2 3 OPENED 199.989258 0 22713630
    533.380945 0 48105.68 4692729 0 9994.31
    2 4 OPENED 199.99707 0 23986390
    547.804756 0 57601.79 5788565 0 11073.44
    1 0 OPENED 199.989258 0 310810
    47.4352741 0 9652.12 1877994 0 3490.5
    GROUP_NUMBER DISK_NUMBER MOUNT_S TOTAL_MB/1024 FREE_MB/1024 READS
    MB_READ READ_ERRS READ_TIME WRITES WRITE_ERRS WRITE_TIME
    1 1 OPENED 199.99707 0 137665
    44.7837362 0 9155.21 751099 0 3092.96
    1 2 OPENED 199.99707 0 139561
    44.7904587 0 9424.26 753116 0 2858.23
    1 3 OPENED 199.99707 0 141139
    44.7718539 0 9506.27 802414 0 2768.22
    9 rows selected.
    can you please tell me how to monitor on disk i/os which is as shown above and
    please tell me AWR report to analyze some basic points for health check
    please give some details for health check of database.
    thanks in advance

    Hi;
    What is DB version?
    Please check below doc:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28275/tdppt_degrade.htm#CACGCJDC
    Also see:
    What is AWR( Automatic workload repository ) and How to generate the AWR report? [ID 748642.1]
    How To Understand AWR Report / Statspack Report [ID 842884.1]
    Regard
    Helios

  • ADDM and AWR report interpretation

    Hi,
    I have some confusion regarding the understanding of ADDM and AWR report.
    I have created AWR reports for various period. All report indicated that all Instance efficiency checklists at their high 90s.
    I have also created ADDM report during the same intervals. ADDM reports suggesting a higher SGA value.
    When I am trying to correlate the ADDM and AWR then the findings seems self contradictory. On one hand AWR reflecting high instance efficiency ratios and on the other ADDM suggesting for higher SGA value. Please help me to get a better idea regarding this.
    There is one more confusion. Due to some product related compulsion we have to use CURSOR_SHARING=EXACT. But the AWR report reflects 98 against Soft Parse %. Though we are using high number of bind variable within our application. But due to the value of CURSOR_SHARING all queries should be hard parsed each time the literal change. As per my understanding there should be very less soft parsing, but the value reflects high Soft Parse.
    Thanks in advance for your valuable time.
    Regards,
    Joy

    >
    Just a little detail to add to Dom's comments.
    If you are convinced that you have lots of code that should be doing hard parsing, but the "soft parse ratio" looks wrong, then take a look in the statspack/AWR section labelled "SQL ordered by Parse Calls". You may find that some trivial, harmless looking piece of SQL has suffered a huge number of parse calls - and if so they will almost certainly have been "soft" parse calls and could therefore be hiding your expected "hard" parse figures.
    Critical point: if you look at a ratio, you've hidden the underlying scale of any potential problem.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Is statspack and awr report are same?

    Hi
    All,
    Is statspack and awr report are same? and in which oracle version they are?
    Thanks,
    Vishal

    I wouldn't expect AWR or statspack to be able to generate snapshots or to run reports while the database is in restricted mode. I've never tested it, but I wouldn't expect it to work.
    Restricted mode is not normally used to allow normal users to test a database. Normally, if you're upgrading a production database, you have already validated that the upgrade works correctly by upgrading and testing the dev, test, and potentially staging databases. So when it comes to upgrading prod, you do the upgrade, verify that the upgrade scripts didn't throw any errors, and open up the database for users to do some quick validation. If there is some fear that users logging in would "mess up the database", that implies that you don't have enough confidence in the upgrade to even think about upgrading prod.
    Occasionally, you'll have a standby database that gets upgraded and opened up and a select number of users given information on how to connect to the new database. Those users would verify the new database and then some sort of switchover would take place to move everyone from the old system to the new one. That generally requires a lot more work, though, because you have to replicate data during the parallel production phase.
    Justin

  • Can I have automatic e-mail setting for ADDM and AWR reports??

    Can I have Automatic e-mail settings for all my AWR and ADDM reports so I don;t have to run the reports all the time but they can be sent over to my mailbox and I can review them, if at all I can do that then can I bound them to a particular time frame where I can recieve only those reports durin the peak usage of my database.
    thanks

    Hi Rohan,
    Can I have Automatic e-mail settings for all my AWR and ADDM reports so I don;t have to run the reports all the time but they can be sent over to my mailbox and I can review them,You bet! I do it for all of my databases:
    1 - Use a cron (or preferably dbms_scheduler) to schedule the awrrpt.sql execution, directing the report to a fixed file location (e.g. /tmp).
    2 - As step 2 from the scheduled task, direct the report as input to sendmail:
    For Windows:
    http://www.dba-oracle.com/t_e_mail_interface_windows.htm
    For Linux:
    http://www.dba-oracle.com/t_email_mailing_messages_plsql.htm
    For complete details of job scheduling, see Dr. Hall's book "Oracle Job Scheduling":
    http://www.rampant-books.com/book_2005_1_scheduling.htm
    Hope this helps. . . .
    Donald K. Burleson
    Oracle Press author

  • ASH and AWR related

    Hello,
    I have studied about AWR and ASH but i am not getting the clarity.
    Like ASH means it will collect information about all the active database sessions like database user,
    the module being run, SQL execution plans, wait events, CPU time used, and
    database objects being accessed.The MMNL background process is responsible for writing
    session data to memory. This should enable performance data to be collected
    with minimal overhead to the system
    AWR:-The Automatic Workload Repository (AWR) collects performance
    data automatically...
    Like performance data means it wll also collect info about sql exection plans and cpu time used and additionally about operating system statistics.
    What is the difference i am unable to understand...both will get the performance info about the database which will be used by ADDM to intimate us what should we do next thats it rite?
    KIndly tell me exact difference in simple words.
    Thanks,
    928714.

    Both are going to work automatically and without any special settings to be done . All what you need is license to use them though. The major difference is that AWR is a whole database level health check. So let's suppose you are doing a regular monitoring activity and want to have a report of the comparable time periods, you would be using AWR. This would help you to see that what's going on the overall level and using that you can decided what to do next(or db itself can suggest to you) .
    On the other hand, ASH as you said yourself, is a report of those sessions which are active and yet are waiting. So the situation to use it would be , for example, few users report to you that I am slow from the last 10 minutes. To find out the problem with the user, you wouldn't grab a whole database level, hourly long report i.e. AWR but a 10 minute report of ASH and would use it to find out what's going on. That would be a place where the entire db's report would be like using a hammer to kill an ant.
    HTH
    Aman....

  • Poorly Performing SQL Queries and AWR

    version : 10.2.0.4 on OEL 5.
    Snapshot duration is 30 mins. Its long, but sorry that is what is available right now.
    I have three queries in my database which are performing pretty slow. I took AWR reports for these queries and they are as follows:
    Query 1:
    ======
        Plan Hash           Total Elapsed                 1st Capture   Last Capture
    #   Value                    Time(ms)    Executions       Snap ID        Snap ID
    1   3714475000                113,449             9         60539          60540
    -> % Total DB Time is the Elapsed Time of the SQL statement divided  into the Total Database Time multiplied by 100
    Stat Name                                Statement   Per Execution % Snap
    Elapsed Time (ms)                           113,449       12,605.4     3.9
    CPU Time (ms)                               108,620       12,068.9     4.0
    Executions                                        9            N/A     N/A
    Buffer Gets                                4.25E+07    4,722,689.0    11.7
    Disk Reads                                        0            0.0     0.0
    Parse Calls                                       9            1.0     0.0
    Rows                                             20            2.2     N/A
    User I/O Wait Time (ms)                           0            N/A     N/A
    Cluster Wait Time (ms)                            0            N/A     N/A
    Application Wait Time (ms)                        0            N/A     N/A
    Concurrency Wait Time (ms)                        0            N/A     N/A
    Invalidations                                     0            N/A     N/A
    Version Count                                     2            N/A     N/A
    Sharable Mem(KB)                                252            N/A     N/AQuery 2:
    ======
        Plan Hash           Total Elapsed                 1st Capture   Last Capture
    #   Value                    Time(ms)    Executions       Snap ID        Snap ID
    1   4197000940              1,344,458             3         60539          60540
    -> % Total DB Time is the Elapsed Time of the SQL statement divided   into the Total Database Time multiplied by 100
    Stat Name                                Statement   Per Execution % Snap
    Elapsed Time (ms)                         1,344,458      448,152.7    46.5
    CPU Time (ms)                             1,353,670      451,223.3    49.7
    Executions                                        3            N/A     N/A
    Buffer Gets                                3.42E+07   11,383,856.7     9.4
    Disk Reads                                        0            0.0     0.0
    Parse Calls                                       3            1.0     0.0
    Rows                                             48           16.0     N/A
    User I/O Wait Time (ms)                           0            N/A     N/A
    Cluster Wait Time (ms)                            0            N/A     N/A
    Application Wait Time (ms)                        0            N/A     N/A
    Concurrency Wait Time (ms)                        0            N/A     N/A
    Invalidations                                     0            N/A     N/A
    Version Count                                     2            N/A     N/A
    Sharable Mem(KB)                                270            N/A     N/AQuery 3:
    ======
        Plan Hash           Total Elapsed                 1st Capture   Last Capture
    #   Value                    Time(ms)    Executions       Snap ID        Snap ID
    1   2000299266                104,060             7         60539          60540
    -> % Total DB Time is the Elapsed Time of the SQL statement divided   into the Total Database Time multiplied by 100
    Stat Name                                Statement   Per Execution % Snap
    Elapsed Time (ms)                           104,060       14,865.7     3.6
    CPU Time (ms)                               106,150       15,164.3     3.9
    Executions                                        7            N/A     N/A
    Buffer Gets                                4.38E+07    6,256,828.1    12.1
    Disk Reads                                        0            0.0     0.0
    Parse Calls                                       7            1.0     0.0
    Rows                                             79           11.3     N/A
    User I/O Wait Time (ms)                           0            N/A     N/A
    Cluster Wait Time (ms)                            0            N/A     N/A
    Application Wait Time (ms)                        0            N/A     N/A
    Concurrency Wait Time (ms)                        0            N/A     N/A
    Invalidations                                     0            N/A     N/A
    Version Count                                     2            N/A     N/A
    Sharable Mem(KB)                                748            N/A     N/AAny Ideas please as what is wrong with the above statistics? And what should I do next with it?
    Thanks.

    Here is one of the plan for query:
    | Id  | Operation                            | Name                   | Rows  | Bytes | Cost (%CPU)|
    Time     |
    |   0 | SELECT STATEMENT                     |                        |       |       |  9628 (100)|
              |
    |   1 |  VIEW                                |                        |    73 | 58546 |  9628   (1)|
    00:01:56 |
    |   2 |   WINDOW SORT PUSHED RANK            |                        |    73 | 22630 |  9628   (1)|
    00:01:56 |
    |   3 |    FILTER                            |                        |       |       |            |
              |
    |   4 |     NESTED LOOPS                     |                        |    73 | 22630 |  9627   (1)|
    00:01:56 |
    |   5 |      NESTED LOOPS                    |                        |    73 | 20586 |  9554   (1)|
    00:01:55 |
    |   6 |       NESTED LOOPS OUTER             |                        |    72 | 15552 |  9482   (1)|
    00:01:54 |
    |   7 |        NESTED LOOPS                  |                        |    72 | 13320 |  9410   (1)|
    00:01:53 |
    |   8 |         NESTED LOOPS                 |                        |    72 | 12168 |  9338   (1)|
    00:01:53 |
    |   9 |          NESTED LOOPS                |                        |  4370 |   277K|    29   (0)|
    00:00:01 |
    |  10 |           TABLE ACCESS BY INDEX ROWID| test_ORG                |     1 |    34 |     2   (0)|
    00:00:01 |
    |  11 |            INDEX UNIQUE SCAN         | test_ORG_PK             |     1 |       |     1   (0)|
    00:00:01 |
    |  12 |           TABLE ACCESS FULL          | test_USER               |  4370 |   132K|    27   (0)|
    00:00:01 |
    |  13 |          TABLE ACCESS BY INDEX ROWID | REF_CLIENT_FOO_ACCT   |     1 |   104 |     7   (0)|
    00:00:01 |
    |  14 |           INDEX RANGE SCAN           | RCFA_test_ORG_IDX       |   165 |       |     2   (0)|
    00:00:01 |
    |  15 |         TABLE ACCESS BY INDEX ROWID  | test_ACCOUNT            |     1 |    16 |     1   (0)|
    00:00:01 |
    |  16 |          INDEX UNIQUE SCAN           | test_CUSTODY_ACCOUNT_PK |     1 |       |     0   (0)|
              |
    |  17 |        TABLE ACCESS BY INDEX ROWID   | test_USER               |     1 |    31 |     1   (0)|
    00:00:01 |
    |  18 |         INDEX UNIQUE SCAN            | test_USER_PK_IDX        |     1 |       |     0   (0)|
              |
    |  19 |       TABLE ACCESS BY INDEX ROWID    | REF_FOO               |     1 |    66 |     1   (0)|
    00:00:01 |
    |  20 |        INDEX UNIQUE SCAN             | REF_FOO_PK            |     1 |       |     0   (0)|
              |
    |  21 |      TABLE ACCESS BY INDEX ROWID     | REF_FOO_FAMILY        |     1 |    28 |     1   (0)|
    00:00:01 |
    PLAN_TABLE_OUTPUT
    |  22 |       INDEX UNIQUE SCAN              | REF_FOO_FAMILY_PK     |     1 |       |     0   (0)|
              |
    40 rows selected.
    SQL>

  • Oracle 9.2.0.8 and AWR report?

    Does anyone know if 9.2.0.8 supports AWR?
    Thanks in advance!

    Thanks! I figured it may since I have also seen that it now support Automatic Memory Management, which was also introduced in 10g v1.
    Thanks

  • Good question on ADDM and AWR

    Just curious to know what is the difference between running *{color:#808000}awrrpt.sql{color}* and *{color:#808000}addmrpt.sql{color}*?
    I could not get right information googling out.
    Thanks for your time!

    1)addmrpt.sql -- Generates "DETAILED ADDM REPORT" which reports findings and gives recommendations about activities impacting the db most. It generates a text file.
    2)awrrpt.sql -- Generates a "WORKLOAD REPOSITORY REPORT" which is like a statspack report. You can generate a html file from this script
    Kev

  • Enterprise manager ADDM and AWR

    I'm currently using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    What is the licensing concept of AWR?
    Is that built-in by default to the above release or does it requrie any pricing?
    I would like to use the ADDM feature for monitoring performance of the project
    that is in development.

    AFAIK one can not use ASH/AWR/ADDM views without at least buying the Diagnostic pack (it seems that those features are part of this pack).
    Of course it is ridiculous that one can not disable those mechanisms even if one can not use them (it is ppossible in 11g), but that is the Oracle licensing ...

  • Object name, segment advisor and db sequential read

    oracle 10.2.0.4:
    I am looking at our ADDM and AWR report. It's complaining about db file sequential read waits and also "Segment Advisor" on LOB SYS_LOB.... I have couple of questions:
    1. When select is fired (from JDBC/hibernate) with the column that is of type BLOB does the blob gets extracted at that point or just the reference is returned to the BLOB. And only when that column is accessed then the blob is fetched. Or does it get fetched right away in the "Select statemement"?
    2. I see Sedgment Advisor on object name LOB SYS_LOB000000012511C000006$$. How do I know which column/table it's referring to.
    3. db file sequential read waits means that something is wrong with disk layout?
    4. Even though our IO is not that high ADDM keeps complaining about increasing SGA to 64G. Currently as it is 32G and it's huge. Could it be because of above reasons that it thinks that it needs larger SGA?

    We are expecting a very high load in coming days. So I was looking at the system to check if somethings needs to be improved beforehand. I see things like 'User I/O waiting on Hot Objects", "db file sequential read waits". I read about it but I am not sure how to really see if it's going to be a problem or if it's a problem. We have indexes but one of the queries selects blob and is not always used so I was wondering if db file sequential read is being caused by that. I am not sure why we would have waiting on Hot objects because currently our system in not very busy. Hot object is a LOB and it's partitioned. It says database object with id XXXX, 0 full object scansm 25336 physical and direct reds. I know the table by looking up in DBA_LOBS.

  • Automation of AWR report.

    Hi All,
    I want to automate for awr report generating for every 30 min. For this I am creating a script which is not working properly. Script given below.
    1. Declaring an variable
    2. Giving value to the variable by running sql query
    3. Executing dbms_workload_repository procedure.
    Please help me proper steps.
    SET SERVEROUTPUT ON
    Declare
    DBID_NUM NUMBER;
    INST_NUMBER NUMBER;
    MAX_SNAP_ID NUMBER;
    MIN_SNAP_ID NUMBER;
    DBID_NUM := select DBID into DBID_NUM from dba_hist_snapshot WHERE ROWNUM=1;
    INS_NUMBER := select INSTANCE_NUMBER into INST_NUMBER from dba_hist_snapshot WHERE ROWNUM=1;
    MAX_SNAP_ID := select MAX(SNAP_ID) into MAX_SNAP_ID from dba_hist_snapshot;
    MIN_SNAP_ID =: select MAX(SNAP_ID)-1 into MIN_SNAP_ID from dba_hist_snapshot;
    Begin
    SELECT output FROM TABLE (dbms_workload_repository.awr_report_html(DBID_NUM,INST_NUMBER,MAX_SNAP_ID,MIN_SNAP_ID));
    End;
    /

    Hi,
    I am trying to help, however it's hard because you haven't clarified your end goal. What time period do you need to generate the AWR report for? Generating an AWR report from the entire range of available snap_id's is utterly useless. It's like measuring your average body temperature from the moment of birth up to now.
    How are you planning to generate it -- into a database table, into a file, to terminal output? You didn't mention that and it's impossible to deduce it from your script.
    Most importantly, why do you need to produce all these AWR reports for each 30 mins? Every 30 days, I would understand, but every 30 mins?! Do you realize that if you want to look at some trends, it much easier to do that using AWR views directly, rather than trying to extract data from html codes? And if you want your performance history just in case -- why don't you increase your SYSAUX tablespace and AWR retention, so that you can go back and generate a retrospective AWR report when needed?
    I wrote an anonymous to autogenerate an AWR report for the last snapshot and dump it to the screen, hope this helps:
    declare
      l_dbid number;
      l_inst_id number;
      l_last_snap_id number;
      l_output clob;
    begin
      select dbid into l_dbid from v$database;
      select instance_number into l_inst_id from v$instance;
      select max(snap_id) into l_last_snap_id from dba_hist_snapshot;
      for rec in (select * from table(dbms_workload_repository.awr_report_text(l_dbid,l_inst_id, l_last_snap_id - 1, l_last_snap_id))) loop
         dbms_output.put_line(rec.output);
       end loop;
    end;
    /Best regards,
    Nikolay
    P.S. You have 17 out of 21 questions unresolved. Has the forum been really this unhelpful for you?

  • How to retrieve 'top 5 timed events' from AWR

    Hello,
    I have a 10g database and awr is running every hour. How do I get the 'Top 5 Timed Events' from the awr report for every single hour on the last five days worth of awr reports? I can see the awr reports through GRID but where is the actual location of the snapshots? Instead of getting this information from awr reports, can I get 'Top 5 timed events' from the data dictionary for every hour for the last five days? Thank you in advance.

    watson2000 wrote:
    Hello,
    I have a 10g database and awr is running every hour. How do I get the 'Top 5 Timed Events' from the awr report for every single hour on the last five days worth of awr reports? I can see the awr reports through GRID but where is the actual location of the snapshots? Instead of getting this information from awr reports, can I get 'Top 5 timed events' from the data dictionary for every hour for the last five days? The "Top 5" comes from combining information about system events and the time model statistics. The information is stored in a number of tables in the SYS schema with names starting with WRH$, but also exposed in a set of views starting with DBA_HIST.
    To reconstruct the Top 5 hourly for the last five days, you will need to access DBA_HIST_SYSTEM_EVENTS (system events) DBA_HIST_SYS_TIME_MODEL (time model) and DBA_HIST_SNAPSHOT (list of snapshot ids and times).
    It won't be a trivial query, as you need to collect the "DB CPU" entry from dba_hist_system_time_model, union it with the dba_hist_system_events, then take the top 5 for each snapshot from the result. You'll probably need to look at subquery factoring and analytic functions to make this as efficient as possible.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Having problems with install

    On one of my PC work stations, I upgraded from XP Home to XP Professional. Unfortunately, despite all of the necessary program files remaining in place, none of them are working... not photoshop, dreamweaver, fireworks, flash, etc. What do you think

  • Need Help [Toshiba Registration] plzzz!

    I registered my product ,but i chose wrong Country puchrased: United States I puchrased it on switzerland , how can I change that? Here is the link where you can see product information http://www.csd.toshiba.com/cgi-bin/tais/support/jsp/globalEntitl

  • Host command in oracle forms

    can anyone any one help me on this issue i am trying to use host command in a.s which is running in unix o.s to rename one of the file i am using the below command but its not working . can any one tell me whats worng or how to perform this the_comma

  • Apps that are clashing with Mavericks

    Hi Can anyone tell me how to uninstall apps that seem to be causing my iMac with 8 Gb of ram to keep running out of memory ene though I am doing no work at all? Apparently after running an etrcheck this is the report: I have a similar problem as Gert

  • Mission Control - Suggestion

    Hi there, me and a friend discussed the new Mission Control and its way to organize windows. When one have a lot of windows open Mission Control beautifuly organizes one's windows to preview miniatures, and it's really great. Though, when one have on