How can i check the longest running query ??

Hi ,
I need to find out which query that is taking the longest time ?
how can i check that ?
pls advise
tks & rgds

Current Active Queries:
col sql_text format a50
col machine format a10
col username format a10
col action format a10
set linesize 200
SELECT /*+ ORDERED */
     username
     ,S.LAST_CALL_ET
     ,s.action
     ,S.STATUS
     ,s.sid
     ,s.serial#
     , s.machine
     , X.sql_text
FROM      sys
     .v_$session S
     LEFT OUTER JOIN sys.v_$sqlarea X
     ON s.sql_address = x.address
     AND      s.sql_hash_value = x.hash_value
WHERE      s.type != 'BACKGROUND'
AND s.STATUS = 'ACTIVE'
ORDER BY 2,1
You can add AND s.USERNAME= 'USERNAME' for a particular user
Long Running Queries
col sql_text format a50
col opname format a20
col machine format a10
col username format a10
col action format a10
set linesize 200
select /*+ ORDERED */
     sl.username
     ,sl.opname
     ,sl.start_time
     ,sl.last_update_time
     ,sl.time_remaining
     ,sl.elapsed_seconds
     ,sa.sql_text
from v$sqlarea sa,v$session_longops sl
where sl.sql_hash_value = sa.hash_value
and sl.sql_address = sa.address
/

Similar Messages

  • How can i check when a given query was run

    how can i check when a given query was run ( i mean the timestamp ) from forms
    I am trying to run the query depending on when it was last run

    Hello,
    I'm not sure to really understand your need, but if you want to refresh the data blocks regularly, you can use a timer that would execute_query on the block every elapsed period of time.
    Anyway, there is no "timestamp" of this kind, so that you would store the information somewhere in memory on in a table, from a PRE-SELECT or POST-SELECT trigger for instance.
    Francois

  • How can I check the expiration date of a Certificate Keychain from terminal?

    Hello, I am writing a bash script to alert me when my corporate certificates are about to expire. How can I check the expiration date of a certificate in keychain? I'm running Mac OS 10.6.8 on a newer MacBook pro with full admin rights.
    Specifically I will be checking three certs: a Root Authority, Issuing Authority, and a user cert (Identity).
    I was exploring the Security and Openssl command line tools. But I can't seem to get the info I need.
    Any recommendations would be appreciated.
    Thank you!

    Anyone?

  • How can i check the procedure execution time..?

    Hi All,
    Can any one of you tell me how can i check the procedure execution time..?
    Thanks in advance.

    if running it from SQL*Plus,
    SQL> set timing on
    Or from PL/SQL, use DBMS_UTILITY.GET_TIME before and after the call and calclate the difference.

  • How can I check the patch I have been apply?

    Dear all:
    How can I check the patch I have been apply in the Financial Management?Does it have the record in the server? or has the SQL to query?
    Regards
    Terry

    Hi Terry;
    In addition to Hussein Sawwan great post, please also check those notes-recomendation on
    how to check MINIPACK 11I.AD.I.5 ?
    Regard
    Helios

  • How can i check the realtime ability of my program with LV 6.1?

    Hi, i did use a PXI-6053E daq card with Labview RT 6.0.3, after upgrading to
    LV 6.1 the single scan vi in my control loop displays no error, if i put too
    much stuff in the loop. i check data remaining, everything exactly as in
    the example i attached. With Labview 6.0.3 i did use the opcode "read
    oldest" all the time and got a "1" at data remaining output if runnig too
    slow. How can i check the realtime ability of my Program with LV 6.1? The
    attached example is running with 35kHz and green RT-LED, even if i put a
    "wait 1 ms" in the loop.
    Thx4help.
    Joerg
    [Attachment Optimized HW Timed Loop.llb, see below]
    Attachments:
    Optimized_HW_Timed_Loop.llb ‏242 KB

    You should still be able to use the data remaining output of AI SingleScan to indicate that you are maintaining real-time as you did in LabVIEW 6.0.3. If this is not working properly for you, you might try wiping out the ni-rt folder on the RT system and re-installing the RT software on it through MAX on your host computer. Check the versions you have. If you are still seeing data remaining = 0 even when you are running your loop significantly slower than your scan rate, you might want to contact the LabVIEW RT group at National Instruments for additional assistance.

  • How can we let the program run in backgroud automatically?

    normally,we need to find peak off time run big program
    that read pooled table and slowly.
    How can we let the program run in backgroud automatically?
    BTW:before that pop a window just give runner a notice.

    Here is an example, try this one.
    REPORT ztest.
    PARAMETERS: p_vbeln LIKE vbak-vbeln,
                p_bkrun NO-DISPLAY.
    DATA: ls_vbak LIKE vbak.
    DATA: v_answer,
          v_jobcount LIKE tbtcjob-jobcount.
      IF p_bkrun IS INITIAL.
    *-- not background processing
        CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
             EXPORTING
                  textline1      = 'This may time out.'
                  textline2      = 'Do you want to run in background?'
                  titel          = 'Warning!!!'
                  cancel_display = space
             IMPORTING
                  answer         = v_answer.
        IF v_answer = 'J'.
    *-- run in the background
          CALL FUNCTION 'JOB_OPEN'
               EXPORTING
                    jobname          = 'ZTEST'
               IMPORTING
                    jobcount         = v_jobcount
               EXCEPTIONS
                    cant_create_job  = 1
                    invalid_job_data = 2
                    jobname_missing  = 3
                    OTHERS           = 4.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            EXIT.
          ENDIF.
    *-- submit the program in the background
          SUBMIT ztest
            WITH p_bkrun = 'X'
            WITH p_vbeln = p_vbeln
            USER sy-uname
            VIA JOB 'ZTEST' NUMBER v_jobcount AND RETURN.
    *-- close the job
          CALL FUNCTION 'JOB_CLOSE'
               EXPORTING
                    jobcount             = v_jobcount
                    jobname              = 'ZTEST'
                    strtimmed            = 'X'
               EXCEPTIONS
                    cant_start_immediate = 1
                    invalid_startdate    = 2
                    jobname_missing      = 3
                    job_close_failed     = 4
                    job_nosteps          = 5
                    job_notex            = 6
                    lock_failed          = 7
                    OTHERS               = 8.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE 'W' NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          EXIT.
        ELSE.
          CLEAR v_answer.
        ENDIF.
      ENDIF.
      CHECK v_answer IS INITIAL.
      SELECT SINGLE * FROM vbak
                      INTO ls_vbak
                     WHERE vbeln = p_vbeln.
      IF sy-subrc <> 0.
        WRITE:/ 'Invalid Order Id.'.
      ENDIF.
    END-OF-SELECTION.
      CHECK v_answer IS INITIAL.
      IF p_bkrun IS INITIAL.
        WRITE:/ 'Here is the result running the program in foreground.'.
      ELSE.
        WRITE:/ 'Here is the result running the program in background.'.
      ENDIF.
      WRITE:/ ls_vbak-vbeln,
              ls_vbak-vkorg.

  • IP Job in BW finished, but how can I check the IDoc receive status in BW ?

    Hi,experts
    After I execute a Infopackage with loading more than 200000 records data, the infopackage monitor show me yellow light, 186020 from 200000 records. this infomation still show me till now, seaval hours,it looks pause here.
    And I check the request in the R/3, the Job has finished. as you know it means the R/3 push the IDoc already finished.
    and how can I do now ? or how can I check the IDoc receive status in BW side?

    Hi,
    I too had the same problem, i executed the following to solve the proble, may be this will help you:
    1) Go to T-code SM58 and select TRFC and press F6,
    2) For manual push of I-Docs, GO to T-COde BD87 select perticular idoc and see the status if it is not executed properly then do the manual push by pressing Execute option,
    Thanks,

  • I have two email accounts. It is only letting me check one. How can I check the other?

    I registered two different email accounts on my iPad mini. It's only letting me check one. How can I check the other one too?

    Congratuations on your new iPad!
    Since your device is so new, I can state categorically that this an issue with configuration. Delete the account that doesn't work, and enter the information anew.
    If you're still having problems, check that your email address and password are correct, and if possible, verify it by checking your ISP's settings.

  • How can i check the office web app server(wac client) is calling custom WOPI host?

    I am getting an error when I testing my wopi host(which is the same as
    example) with Office Web app server "Sorry, there was a problem and we can't open this document.  If this happens again, try opening the document in Microsoft Word."
    1-how can find the log files of this error?
    2-how can i check the office web app server(wac client) is calling my WOPI host?
    I am not sure about cumunication between owa to wopi host. I actually dont know how to implement checkfile and getfile functions to wopi host for waiting for call back from owa client.
    Note:I am sure that office web app server is configured true. Because i test it with sharepoint 2013 and editing and viewing is working well.

    Hi,
    According to your post, my understanding is that
    CheckFileInfo is how the WOPI application gets information about the file and the permissions a user has on the file. It should have a URL that looks like this:
    HTTP://server/<...>/wopi*/files/<id>?access_token=<token>
    While CheckFileInfo provides information about a file, GetFile returns the file itself. It should have a URL that looks like this:
    HTTP://server/<...>/wopi*/files/<id>/contents?access_token=<token>
    There is a great article for your reference.
    http://blogs.msdn.com/b/officedevdocs/archive/2013/03/20/introducing-wopi.aspx
    You can also refer to the following article which is about building an Office Web Apps(OWA) WOPI Host.
    http://blogs.msdn.com/b/scicoria/archive/2013/07/22/building-an-office-web-apps-owa-wopi-host.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How can I check the specs with a broken LCD?

    A friend just gave me an ibook, but the LCD does not come on. How can I check the specs of the computer?
    I tried hooking it up to an external monitor, but I believe I need to setup the prefs to show on the external (I.E. the external was just black, but the computer was on).
    Any ideas here?
    All I know about the computer is that it's a white ibook with dual USB ports, firewire, and eithernet port on the side.
    Thanks in advance.
    -brown
    Message was edited by: Ryan Brown2

    The specs for the iBook should be on the label with the serial number.
    http://support.apple.com/kb/TA27282?viewlocale=en_US
    What does it say there?

  • How can I check the version of the rdf file?

    Dear all:
    How can I check the version of the rdf file? such like CEXRECRE.rdf .
    my environment is : oracle 11.5.9
    platform : Linux red hat 4.0
    Regards
    Terry

    Terry,
    Use "adident" or "strings -a" commands -- See (Note: 125922.1 - How To Find Oracle Application File Versions) for details.
    Thanks,
    Hussein

  • How can I check the version of Oracle in Linux?

    Dear all :
    How can I check the version of Oracle in Linux ?
    Regards
    Terry

    Hi terry;
    How can I check the version of Oracle in Linux ?You mean your db version or something else? If you mean you want to control your version issue is:
    source env file as oramgr
    sqlplus "/as sysdba"
    when u login sqlplus it will give u something as below:
    SQL*Plus: Release 10.2.0.4.0 - Production on
    Regard
    Helios

  • How can i check the file  which is upload from  the server

    when upload the excel file from the server file to the internal table ,how can i check the data whether it accord with  the required condition .
    for example ,i want to upload the file which have the data whose type is pack, and it have three integer and  two decimal ,how can i check in my code.
    thanks,

    Hi Sichen,
    First upload the file, Then do ur validations and delete the records that doesn't satisfy ur requirements.
    Thanks,
    Vinod.

  • How can i check the license file installed on the server CCM 6.1.4

    Hi;
    i have installed the CCM 6.1.4; and now i want to upgrade to 8.5, but i don't remenber witch type license i have uploaded ( normal or Hospitality).
    how can i check the license file installed on this server???
    thanks.

    Hi Matthew,
    I think your idea should work just fine, but you will need to work with;
    [email protected]
    To put together the proper license file due to this change called the "License MAC"
    Customer Impact from New Licensing Procedures
    Cisco Unified Communications Manager on VMware on Cisco UCS B-Series Blade Servers uses a different licensing model than Cisco Unified Communications Manager on an MCS server. The MAC address of the NIC card is no longer used to associate the license to the server.
    Instead, the license gets associated to a license MAC, which is a 12 digit HEX value created by hashing the following parameters that you configure on the server:
    •Time zone
    •NTP server 1 (or "none")
    •NIC speed (or "auto")
    •Hostname
    •IP Address (or "dhcp")
    •IP Mask (or "dhcp")
    •Gateway Address (or "dhcp")
    •Primary DNS (or "dhcp")
    •SMTP server (or "none")
    •Certificate Information (Organization, Unit, Location, State, Country)
    This hash of these fields is called the LICENSE MAC
    Note : Once there is a change in any of the parameters that creates the License MAC, it will
    give you 30 day grace period to generate a new license file for the CM based on new license
    MAC.
    http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/install/8_0_2/install/cmins802.html#wp584709
    Cheers!
    Rob

Maybe you are looking for

  • OB52 close posting periods

    All, Our finance people use transaction OB52 to close posting periods. This transaction very well might not be the correct one for my users to use. But  there is no way to restrict this transaction by company code. I checked the available objects to

  • How to generate a empty file in AL11 using ABAP and unix command

    Hi Experts, when load infopackage triggers it will search file from AL11 if file is available it will get loaded successfully.  When there is no file in AL11 error while opening file (orgin A) and the load will fail.  At this level i have to write a

  • Can i get osx yosemity on my late 2008 unibody-macbook ?

    can i get osx yosemity on my late 2008 unibody-macbook ?

  • How to know wifi hotspot status?

    how can we detect the hotspot network when it is turned on. in windows phone 8.1 programmatically? Please help me out ?

  • XI Courses.

    friends, i am planning attend the SAP XI courses,kindly help me in deciding the courses required for me, my requirement will be migrating a business intelligense application from oracle datawarehouse to SAP BW and also using the data of SAP MM module