Sample_time in ASH

HI,
In the part of the SQL below, in where clause, what exactly SAMPLE_TIME will take ?
from v$active_session_history where sample_time between sysdate - interval '1' hour and sysdate
I need to take in ASH the metrics related to yesterday. is it correct to use below where clause?
where sample_time > SYSDATE - 1
Thanks,
Kz

Yes and No, because you might not find all the data stored in memory, ASH is managed in circular buffer and it holds records for active sessions at 1 second interval.
You can calculate DB Time as COUNT(*) from ASH.
The data from ASH is archived in DBA_HIST_ACTIVE_SESS_HISTORY. If you don't find the data in V$ACTIVE_SESSION_HISTORY view check for it in DBA_HIST_ACTIVE_SESS_HISTORY.
Data in DBA_HIST_ACTIVE_SESS_HISTORY is at 10 second interval, remember ASH is 1 second.
If you need to calculate DB Time from DBA_HIST_ACTIVE_SESS_HISTORY, you can do it as COUNT(*) * 10
Regards,
Ivica Arsov

Similar Messages

  • What type of monitoring/report will help me here? AWR/ASH/SQLTUNE?

    Hi All,
    Oracle v11.2.0.2 Linux 64 bit.
    In our application there is a service which keeps running on a Wondows machine and runs few (3 to 4) SQLs repeatedly.
    Yesterday evening between 22:50 and 23:15 we had a performance issue with the service i.e. normally these SQLs which take between 3-6 seconds, were taking 35, 40 seconds. AFter 23:15, there was no problem because there was no data (or very less data) to process for next 2-3 hours. Later on it was running fine (back to the original timings).
    Now I want to investigate that specific issue I had yesterday (about 12 - 14 hours ago). I have the SQL Ids, session id.
    I don't have access to Enterprice manager or Grid control, only SQL prompt. However I can ask the DBAs to generate a report, but with all required details.
    Problem is, what report do I run? what to use?
    1) AWR is set to 1 hour interval. And my problem window is split in 2 different snapshots. If I look at 2 AWR reports ( 22:00 - 23:00 and 23:00 - 00:00), the numbers don't show much of an issue, as all the numbers are averaged out for the whole 1 hour (i.e. a SQL performed well 15 times and did badly 5 times, the overall average won't look bad)
    2) ASH report is a complete mistry to me. I am trying to generate the report with ashrpt.sql / ashrpti.sql. Most of the sections say "No data exists for this section of the report". When using ashrpti.sql do I need to enter all the values it ask? Is there a Oracle's recomended way to give values and run this report? Documentation does not show a sample/example call which will work.
    3) DBMS_SQLTUNE reports are also not showing any data. Almost blank reports. How can I find out if the data required for DBMS_SQLTUNE is there? or how long that data is retained?
    We always get such delays randomly, ask a DBA, they say, "No problem". Not their fault, but they are looking at averaged out numbers.
    Thoughts please.

    Hi,
    your problem is that you are trying to resolve a problem related to a specific statement by using instance-wide tools. You should look at performance stats for that particular statement.
    1) Identify sql_id of the offending statement (e.g. select sql_id from v$sql where sql_fulltext like '%part_of_statement_text_here%', if it doesn't return results check case or look in
    dba_hist_sqlstat)
    2) Look for records with this sql_id in DBA_HIST_ACTIVE_SESS_HISTORY (use filter on sample_time). Compare performance indicators for the timeframe of the incident and outside it
    3) You can also find performance stats for this statement in DBA_HIST_SQLSTAT, but you will have aggregates over snapshot duration
    Given your symptoms, the most logical explanation is a plan flip. Check plan_hash_value in DBA_HIST_SQLSTAT -- if it changed around the time of the incident, that will confirm your suspicion.
    Use dbms_stats.display_awr to display both "good" and "bad" plan. Try to understand the key difference, look at predicates for any hint that could explain it. If it doesn't give you results,
    use format=>'advanced' to generate outlines for both plans, then you can set STATISTICS_LEVEL=ALL and run the statement with both plan, producing extended plan statistics. Use
    dbms_xplan.display_cursor(..,..,format=>'allstats last') to display it. If having difficulty interpreting it, post it here to get the help from community.
    Best regards,
    Nikolay

  • Issues on ASH report

    I have an issue with generating ASH Report on Oracle 11gR2 (11.2.0.1) RAC (2-nodes) on HP-UX. Its working on one node but not the other.
    When I ran ashrpt.sql, its accepting all the inputs and hangs, its not ending. When I trace the session I get the following,
    Ioctl ASYNC_CONFIG error, errno = 1
    Ioctl ASYNC_CONFIG error, errno = 1
    WAIT #5: nam='control file sequential read' ela= 373 file#=0 block#=1 blocks=1 obj#=581 tim=70344326749
    WAIT #5: nam='control file sequential read' ela= 425 file#=0 block#=16 blocks=1 obj#=581 tim=70344327317
    WAIT #5: nam='control file sequential read' ela= 433 file#=0 block#=18 blocks=1 obj#=581 tim=70344327784
    WAIT #5: nam='control file sequential read' ela= 278 file#=0 block#=281 blocks=1 obj#=581 tim=70344328098
    WAIT #5: nam='control file sequential read' ela= 331 file#=0 block#=1 blocks=1 obj#=581 tim=70344329323
    WAIT #5: nam='control file sequential read' ela= 308 file#=0 block#=16 blocks=1 obj#=581 tim=70344329727
    WAIT #5: nam='control file sequential read' ela= 364 file#=0 block#=18 blocks=1 obj#=581 tim=70344330124
    WAIT #5: nam='control file sequential read' ela= 383 file#=0 block#=180 blocks=1 obj#=581 tim=70344330541
    WAIT #5: nam='asynch descriptor resize' ela= 2 outstanding #aio=0 current aio limit=0 new aio limit=2142 obj#=581 tim=70344330586
    Ioctl ASYNC_CONFIG error, errno = 1
    Ioctl ASYNC_CONFIG error, errno = 1
    WAIT #5: nam='control file sequential read' ela= 310 file#=0 block#=1 blocks=1 obj#=581 tim=70344363432
    WAIT #5: nam='control file sequential read' ela= 414 file#=0 block#=16 blocks=1 obj#=581 tim=70344363961
    WAIT #5: nam='control file sequential read' ela= 202 file#=0 block#=18 blocks=1 obj#=581 tim=70344364196
    WAIT #5: nam='control file sequential read' ela= 360 file#=0 block#=281 blocks=1 obj#=581 tim=70344364592
    WAIT #5: nam='control file sequential read' ela= 181 file#=0 block#=1 blocks=1 obj#=581 tim=70344365663
    WAIT #5: nam='control file sequential read' ela= 354 file#=0 block#=16 blocks=1 obj#=581 tim=70344366182
    WAIT #5: nam='control file sequential read' ela= 325 file#=0 block#=18 blocks=1 obj#=581 tim=70344366541
    WAIT #5: nam='control file sequential read' ela= 364 file#=0 block#=180 blocks=1 obj#=581 tim=70344366939
    WAIT #5: nam='asynch descriptor resize' ela= 1 outstanding #aio=0 current aio limit=0 new aio limit=2142 obj#=581 tim=70344366984
    Ioctl ASYNC_CONFIG error, errno = 1
    Ioctl ASYNC_CONFIG error, errno = 1
    ...............................................................................does anybody has similar problem?

    Hi,
    Yes, its possible.
    1. First create the tabular form on the table you want to update
    2. Go and edit the SQL Query , add all the tables and columns that you want
    3. Now edit the report attributes and remove the references to Table/Column in the source of all the non-base table columns.
    It has to be a 2 step process, the wizard does not allow you to enter a query of the type you have.
    Regards,

  • Explain plan, Oracle 10g, AWR, ASH etc etc

    Hi,
    I'm obviously not searching on the right terms but using one of the following : AWR, ASH, ADDM, isn't it possible to get the explain plan for a certain SQL_ID after the fact?
    I was sure that using ash and specifying the SQL_ID that one could have the explain plan, but I don't have it in the ASH Report. We don't have Grid in place, only snapshots taken every hour.
    cheers.

    Thankyou both for your very quick replies, just what I needed.
    Edited by: mattyb on Mar 25, 2009 2:06 PM

  • I want to know if the Macbook Pro with the ash key board and as the cd rom infront is more recent than the one with the black key board and as the cd rom on the side.

    I want to know if the Macbook Pro with the ash key board and as the cd rom infront is more recent than the one with the black key board and as the cd rom on the side.

    Hi Tracy,
    I'm guessing "ash" is the silver colored keyboard, the same color as the rest of the MBP? If so, that machine, with the optical drive slot on the front, is the older machine.

  • 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

  • Generation of ASH report very slow

    Hello,
    I'm in 11203, and generation of ASH report is very slow.
    AWR and ADDM reports are generated quickly.
    To understand what happen, I check the wait event on the session that is executing ASH report, and I found that this session is waiting 99% with "controlfile sequential read".
    My question is :
    Is there any way to make the generation of ASH report quick ?
    Why the generation need to access to the controlfile ?
    Thank you a lot.

    Hi, Keith.
    I tried the pagination scheme "Row Ranges X to Y (with next and previous links)".
    This caused the same problem - my page aborts with the error message:
    "Internet Explorer cannot open the Intenet site https://oraweb.slac.stanford.edu/apex/slacprod/f?p=116:13:439623456781::NO:::
    Operation aborted"
    I even removed pagination altogether and still got the same error.
    Futhermore, it is sporadic. At times I invoke the report with 500 rows and it
    displays without problem. And then, 5 seconds later, I run the re-run the report (again asking to display 500 rows), and it aborts.
    This report worked without error (it was "slow", but worked) two weeks ago. But now, it is failing. My gut feeling is that my problem lies with out Oracle
    Application Server. I have the feeling that our DBA's have changed some
    sort of configuration (a buffer, perhaps) that is causing my problem. Not sure
    about this. I guess I'm reaching for straws at this point.
    Thanks for your help. It is appreciated.
    Elie

  • In OEM 12c 12.1.0.3, no data found in ASH analysis for Oracle DB 10.2.0.4

    Hi Experts,
    Has this bug been fixed till now? Any patch can I applied on this issues?
    Thanks,
    Royal.

    The issue seems to be from DB side and an SR would help you in resolving the issue.
    However, added below few points you can look as well from your side.
    + DB may be core dumping in which case it would be required to resolve the core dump issue.
    + Running ASH report from sqlplus may not be working in which we need to resolve the DB side issue.
    + If feasible you can choose to upgrade DB to higher version.
    Regards,
    Bip

  • AWR, ASH, ADDM

    Hi all,
    11.2.0.1
    Aix 6.1 5L (quadcore, 16GRam)
    I am still confused how to take full advantage of these monitoring tools.
    Actually the our database performance is currently satisfactory, except for occasional few minutes spikes of CPU highs > 80 .
    I just want to catch the culprit process/program responsible for this spikes, as I have no I idea who it is.
    Is it wise to run ASH, AWR, ADDM with an input from time 1AM to 1AM next day?
    What I mean is I will analyze a 1-day period, so that I can catch the program/process that has the higest cpu/memory usage for the day.
    Is this possible?
    Thanks a lot,
    zxy

    Run the ash report (or start with just the OEM Active session screen) for the few minutes around the spike. (See $ORACLE_HOME/rdbms/admin/ashrpt.sql)
    I already run the ASH for the specified timeframe of within 10 minute period, and I got this sql programs captured.
    A.)
    SQL*Net break/reset to client    90.71 ** Row Source Not Available **      90.71
    begin dbms_aqin.aq$_dequeue_in( :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :1
    2, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :2
    8, :29); end;
    This dbms_aqin.aq$_dequeue_in is the one running.
    Is this tunable?
    B.) How to I resolve enqueque?
              475hxdks610gr           3555540364                    4          24.24
    enq: TX - row lock contention    24.24 FOR UPDATE 24.24
    SELECT isotrcnum FROM SERVICEPROVIDERPROFILE FOR UPDATE
    C.) How do I resolve sqlnet break/reset
    ccd38r7qn1mn9           1923507850                    0          18.18
    SQL*Net break/reset to client    18.18 SELECT STATEMENT                    18.18
    SELECT TRMNL_STATUS.cntrlid cntrlid,TRMNL_STATUS.mrchid mrchid,TRMNL_STATUS.dtcd
    e dtcde,TRMNL_STATUS.stats stats,TRMNL_STATUS.termid termid,NVL(BATCH_SETTLE.adr
    sncod, 0) adrsncod FROM TRMNL_STATUS TRMNL_STATUS,BATCH_SETTLE BATCH_SETTLE WHE
    RE TRMNL_STATUS.cntrlid=3 AND TRMNL_STATUS.mrchid=0 AND TRMNL_STATUS.dtcde=1 AND

  • Difference between AWR ,ADDM ,ASH

    Hello
    Can some one please explain me the difference between AWR ASH AND ADDM database reports
    Thankyou

    AWR
    [http://www.oracle-base.com/articles/10g/AutomaticWorkloadRepository10g.php#]
    ADDM
    [http://www.oracle-base.com/articles/10g/AutomaticDatabaseDiagnosticMonitor10g.php]
    ASH - Active Session History. Names says it all.
    [http://www.oracle.com/technology/pub/articles/10gdba/nanda_10gr2dba_part3.html#ash]
    -Anantha

  • 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....

  • Grid Control (OEM) - ASH Path

    Hi,
    I'm using Oracle 11g, from Grid Control (OEM), I would like to generate ASH reports, want to see how the performance (top activity) was 4 or 8 hours ago. Can I see this information in any other link other than ASH?
    Please give me the navigation link for ASH, for example to view "IO Performance Graph", I use the below path.
    Targets -> servername -> databases tab - > performance -> top activity
    Thank you.

    Hi,
    I'm able to view this from Historical details, is that correc?
    any other options available in OEM to do the same, thank you.

  • "PX Deq Credit: send blkd" , Oracle 11g, ASH, and OEM

    In our 10g databases (monitored by OEM 10g) we can sometimes see this event depicted magnificently in Pepto-Bismol pink, when a developer has overdone it with a parallelism hint or table parallelism setting.
    Last night, on one of our 11g databases, monitored by OEM 12c, we were trying to see if parallelism would help 2 long-running queries. (it was not a success.) I was specifically watching for the PX Deq Credit: send blkd and similar waits via OEM, and I also ran several ASH reports to verify there were no unusual events. No sign of these waits.
    Overnight, the developer who was working with me sent me a screen shot from Toad showing these waits. I looked again and still saw no signs via ASH or OEM. I queried DBA_HIST_ACTIVE_SESS_HISTORY and found some logged there from days or weeks ago but that was all. I ran an AWR report and sure enough:
                                                                 Avg
                                            %Time Total Wait    wait    Waits   % DB
    Event                             Waits -outs   Time (s)    (ms)     /txn   time
    PX Deq Credit: send blkd     13,656,665     0    314,939      23  2,474.0(this was over an 8-hour span. )
    Has something changed in Oracle 11g that prevents these from showing up in ASH or OEM?
    Thanks,
    Mike

    Hi,
    Its could be due to flush/Purge Logs runing every night as default DB Maintennace jobs
    Thanks,
    Ajay more

  • What does the ASH column TOP_LEVEL_SQL_OPCODE decode to?

    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production running on Linux x64
    Does anyone have the decoding for the TOP_LEVEL_SQL_OPCODE in V$ACTIVE_SESSION_HISTORY ?
    The server reference says "Indicates what phase of operation the top level SQL statement was in"
    Does anyone know if this is meaningful data?
    Here is an example from my system:
    SQL>select ash.TOP_LEVEL_SQL_OPCODE, count(
      2  from v$active_session_history ash
      3  group by ash.TOP_LEVEL_SQL_OPCODE
      4  order by 2 desc;
    TOP_LEVEL_SQL_OPCODE   COUNT(*)
                       3      23981
                      47       9191
                     189       7840
                       0       6450
                       6       5937
                       2        278
                       7        144
                     170         71
                      97         70
                      96         11
                      55         10
                      94          9
                       1          7
                       9          4
                      85          1
                     174          1
                      15          1
                      12          1

    is this making sense?
    SQL> select action, name from audit_actions
      2  where action in ( 3,47,189,0,6,2,7,170,97,96,55,94,1,9,85,174,15,12);
        ACTION NAME
             0 UNKNOWN
             1 CREATE TABLE
             2 INSERT
             3 SELECT
             6 UPDATE
             7 DELETE
             9 CREATE INDEX
            12 DROP TABLE
            15 ALTER TABLE
            47 PL/SQL EXECUTE
            55 SET ROLE
        ACTION NAME
            85 TRUNCATE TABLE
            94 CREATE PACKAGE
            96 DROP PACKAGE
            97 CREATE PACKAGE BODY
           170 CALL METHOD
           174 CREATE DIMENSION
    17 rows selected.Amiel

  • Roles and Privileges for 10g AWR and ASH reports

    Are there specific roles and privileges are required for one to run AWR and ASH reports for users who don't have DBA roles? If so, I would like to know about them.

    I think sysdba privilege need to run AWR report.
    Also check, how privilege is granted to PERFSTAT user in $ORACLE_HOME/rdbms/admin/spcuser.sql, you might get some clue!!!
    Cheer,
    Virag

Maybe you are looking for

  • How do you "delete all" email on iPhone 4S?

    How do you "delete all" email on iPhone 4S?

  • Optical Drive on the iSight G5 Model

    Please-does anyone know of any site(s) that show how to change the optical drive of the iSight Mac? I'm specifically interested in seeing a picture with connections to the drive. I'm putting together an iSight computer and there is a wire that I thin

  • Windows installer malfunctio​n

    Hi......I have a Toshiba Satellite P505-A8980.  When I try to download a program from the internet, I get an error window as shown in the attachment. I found that if I create a new user, the download downloads just fine. I really do not want to start

  • ACH (NACHA) File format support.

    Hi, A prospect of ours is asking about Business One support for ACH (NACHA) files when creating payables to vendors/clients, and furthermore be able to do and FTP transmission to deliver the NACHA file to the bank automatically? Thanks, Mauricio Edit

  • Get doc date according to material no

    Hello all, I am working on a query which gets the po orders, document date and material numbers associated to it. My need is to get the latest document date by the material number. My date is a characteristic and not a key figure  therefore i cannot