UDM for long running sql

Hello

I intend to use enterprise grid control manager to create a UDM for the following sql which alert me for the sql that runs to learn more then an hour for all the basics of ideas on how to do this
SELECT 
        substr(swn.sql_text,40),
        ||'SQL is Running on Instance ' ||s.inst_id || 'Since '|| ROUND(sl.elapsed_seconds/60) elapsed_mins,       
FROM   gv$session_longops sl,
gv$session s ,
gv$sql swn
WHERE  s.sid     = sl.sid
AND    s.inst_id = sl.inst_id
AND    s.serial# = sl.serial#
AND    s.inst_id = swn.inst_id
AND    s.sql_address = swn.address
AND    s.sql_hash_value = swn.hash_value
AND    sl.sofar  <> sl.totalwork
AND    sl.totalwork <> 0
AND    round((sl.elapsed_seconds)/60,0) > 60
order by 7
Published by: user9243284 on June 7, 2010 03:48

Could you tell us please my useful answer?
Thank you

Tags: Enterprise Manager

Similar Questions

  • How to use the structures of the event for long-running tasks

    I created a state machine that scans a cluster of Boolean controls in a State of 'home '. Most of the States run a Subvi or two in ~ 100 ms or less.

    However, a State run for 10 seconds.

    The code works but the user interface is limited because the controls are outside the cluster because they provide inputs to the structure of State machine case but do not cause changes in the State. In other words, I all orders cluster stacked vertically on one side of the main panel and do not have the flexibility to move the controls to the more intuitive positions on the Panel.

    My question: How can I convert this code in a structure of the event and keep this long term 'event' and prevent that the operator by clicking another button event during the execution of this event?

    Thank you

    You say you have controls outside of your main code... You should really put these inside and manipulate them in a State of your state machine is initialized. This allows you to make changes to the code easier and limits of line entering your outside loop.

    You can do different things to lock the user.

    You can disable specific controls so that they can't be clicked or edited.

    You can use the palette of the mouse to define the busy cursor and disabled again once finished, I do this a lot during treatment when my code something loads the user just clicked.

    One of my favorites is to set a Boolean value in your data that passes through you event titled structure "disable mouse." When the value is True, a mouse down event will effectively reject the event, clicking on disable. I also added an event mouse move where if the bool disable the mouse is set to True, it moves an indicator of string with the mouse by telling the user why it is disabled.

    If you want more specific suggestions, I suggest to post an excerpt of your code, or attach your screws, so that we can better help you.

  • Using cursors for long-running processes

    Hi all

    I know I could probably just google it or run tests, but if it is not an imposition, I just want to hear the responses with a "personal touch."

    I write a PL/SQL process that performs the tasks against the rows in a table that can end up having about a quarter of 1 million rows. Each line will take about one second to process, so we don't talk about something that's going to run everything straight for about 60 hours. There is a very high probability that the lines corresponding to the criteria for cons who should run the process will change during these 60 hours. In as few words as possible, the process runs on all rows in the table with a status 'active', and I also gave users a 'priority' indicator that is designed to enable them to identify which objects should run as soon as POSSIBLE against those who can wait. New active lines could be added, the lines that were active at the time of execution could be removed during transformation gets their etc..

    Is a slider, the wrong solution for this type of architecture? I thought I should do the following:

    1. Add a flag "transformed" in the table I am crossing
    2. clear a beginning of a journey
    3. use a loop where each time through the loop I interrogate the first line matching the criteria which the transformed flag is NOT set
    4 treat
    5. set his transformed Pavilion
    6. go back to 3 and exit the loop when no objects match the criteria, and not have the indicator defined

    Moreover, in the future phases of the project probably add us servers to the architecture and/or rewrite the code to take advantage of the multithreading and partitioning table to ensure that it runs overnight. We don't have time or the budget right now. Users understand that their data cannot be ready available and have need to look for the transformed flag know if yes or not it's been updated.

    So knowing that, for now, we have something that is going to run for 60 hours, is my approach better than just using a slider? Is there a better option I think not?

    Thank you
    DTXCF

    tennismanjoe wrote:

    In fact, for each row in the table, I have to go around and ask OTHER tables and perform calculations and whatnot and then update the results in the current line.

    Fortunately SQL update syntax lets you reference other tables and perform calculations.

    The fourth example of manual illustrates this.

    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28286/statements_10008.htm#i2189756

  • Why the fan on my macbook pro continue to run at a fast pace for long periods?

    The MacBook Pro mid-2010

    OS X El Capitan, 10.11.3 version

    Processor: 2.4 GHz Intel Core 2 duo

    Memory: 4 GB 1067 MHz DDR3

    Graphics card: NVIDIA GeForce 320 M 256 MB

    163 GB available

    iWorks ' 09 has been upgraded to the latest versions

    No new upgrade is available for the system.

    My Question: Why the fan on my macbook pro continues to run at a fast pace for long periods?

    I guess that the fan runs constantly, because the CPU is working at a high rate. I rebooted several times but without any resolution systems. At the bottom of the computer is very hot at times so place the laptop on an object that allows good air circulation. This problem occurs intermittently every few weeks or more. I wonder if it is downloading an important upgrade, do a scan of viruses, or by working as a bot. Lights for hours. Currently, I estimate that it has worked rapidly to possible 6 hours. Thank you.

    It will usually be to dissipate internal heat from running resource intensive applications.

    Download and install a temperature/speed control application.

    Open the activity monitor all THE PROCESSES and CPU to display values between high and low.

    When the fan speeds up, post pictures of both for review.

    Also run Apple Hardware Test:

    https://support.Apple.com/en-us/HT201257

    Note that an error free AHT is inconclusive.

    Ciao.

  • How can I stop my computer to go to the screen saver when I for example runs a scan of the computer, sometimes my scan takes a long time to finish?

    My problem is? How can I stop my computer to go to the screen saver when I for example runs a scan of the computer, sometimes my scan takes a long time to finish? Example I have Microsoft Security Essentials set allow to run daily on 1200 AM and until he finishes my computer goes to screen saver Mode. and when I click on my mouse, I must sign completely new in my computer > how to stop this from happening, I want to keep my Security Scan open until there finishes?

    All the solutions for this?

    Original title: Windows Vista systems

    Hello

    This can help you:

    "Enable or disable the screen saver.

    http://Windows.Microsoft.com/en-us/Windows/turn-screen-saver-on-off#1TC=Windows-Vista

    And this is how do to change the time to wait before the screensaver comes on (article 8) and how to disable the password to logon to him (art. 9):

    http://www.Vistax64.com/tutorials/85539-screen-saver.html

    "How to disable or enable Protection by password on Wake Up in Vista"

    http://www.Vistax64.com/tutorials/102686-password-protection-wakeup.html

    See you soon.

  • Running SQL

    Hi all

    Database Version: 11g

    I'm running a custom application request which is to invoke a few packages, and it takes a long time because of the huge amount of data processing.
    I am able to see my session from v$ session table and corresponding procedure call package based on sql_id v$ sql table.

    But my requirement is to see the sql that it is running in the procedure in question. This procedure has written many sql queries. V $ sql, I see only a procedure like anonymous block call. Is it possible to see the running sql code?

    Thanks in advance.

    Kind regards

    You might want to try to equip your code.

    You can use dbms_application_info for this.

    that is dbms_application_info.set_action ('start merge');

    Then, you just do a simple query on v$ session to find out what your code is doing.

  • Resolution of requests for long durations

    Hello

    We can directly implement the recommendations provided by MS Oracle SQL Tuning advisor *(10g) * as it is long running queries or we must make additional measurements?

    I hope that we must compare the SQL execution to the existing query plan and query recommended, is that enough or more? Thanks for posting

    Thank you
    Hari.

    Hello

    I think so

    We can directly implement the recommendations provided by MS Oracle SQL Tuning advisor *(10g) * as it is long running queries or we must make additional measurements?

    NO can't you. IE you can accept the profile recommended by Advanced optimizer, but it didn't affect/change the already for a long time the application runing.

    I hope that we must compare the SQL execution to the existing query plan and query recommended, is that enough or more? Thanks for posting

    SQL profile contain generally advance information required by the optimizer to produce effective explain the plan. If you look inside the SQL profile, you will find that it contains ultimately a set of TIPS of SQL.

    So to answer your first question, NO, because when SQL Analysis first hard/soft it parse already have generate / used its query plan, then you cannt change an existing query running. The new accepted SQL profile will be used the next time.

    Answers to your second question - once you run the SQL tuning advisor you would see typically other recommends, for example, statistics are out of date, create the new set of index etc etc. So you should first focus on these recommendations first. I know its bit cubersome to apply all of these recommendations, but practically when you implement these reco (except accept the sql profile) and still perform SQL Tuning advisor then could see previous recommendations went away (you already implemented like them), but if the SQL Setup again recommend to accept the profile so I think it would be OK. Because you already explored other tuning techniques recommended by the optimizer. Also the profile SQL too can become obsolete and to maintain their.

  • For loop runs with the value of N unwired

    In this case will be a loop run connected to the loop N worthless? I have seen a few examples of the loop for run without a certain number of times set to be ran wired or for example a size of table or something like that.

    PauldePaor wrote:

    Here's a program I am and as you can see the image that the program runs without the loop N being wired. The program will run without problem

    As everyone else has said, you don't have to plug something on N.  If you wire up a table for loop for input "auto-index", the loop for will run automatically the smaller table size.

    Perhaps an example will help:

    This makes a loop on my table size (in this case, long of 5 elements).  On the edge of the loop for which resembles [] brackets, indicates that it is auto-indexé.  The loop should go through each item one at a time (1, then 2, then 3, then 4, then 5).

  • Best practice for simultaneously run two loops (read + write) in sync

    Hello

    I thought I had a work program that could write and read simultaeously with reasonable accuracy, because it is perhaps not as reliable that I discovered the thought (he sometimes gets out of sync/jumps steps).

    Is there a good guide, method tutorial or recommended to do with reliability, in sync and effectively?

    Should I use the notifier? and/or timed loops?

    I have a loop of Scripture, which sends steps to a certain type of equipment (stepper motor or magnet etc.) to not more than 100 Hz.

    I have a loop of reading, that reads data from a detector (photodiode, the signal is dependent on the stage of writing), no more than about 1000 Hz (the playback loop runs faster than the loop of writing)

    I then pass information from one loop to the other (a single loop wrote to a group, the other readings of him).

    I then save data to a file by saving the content of the chart.

    Thank you

    Jeff_Tech wrote:

    (1)... in sync...

    (2) ... (the playback loop runs faster than the loop of writing...)

    These two statements are not a contradiction?

    There is important information that you have left behind, for example are - it enough for both in phase or is it also necessary that they occur at a very steady pace.

    What the two depend on each other? It is an application of control where the output depends on the entry in some way or is it simply an excitation/response pair.

    Are you single point of software timed acquisition?

    Should it operate for long periods of time or he just a scan done every time?

    In any case, are probably the right thing is to run the two hardware timed the same clock. Configure the AO output array and arm the AI, then start the two running of the same clock (for example, you might bind the conversion of CEW AO clock). Read the data in the buffer to HAVE at your leisure in a loop which is a not any special time.

    Can you show us a code so we get a better sense of what you are doing?

  • How to stop a script of long-run, or leave in the first place?

    How to stop a longrunning script to stop or start in the first place. It does in itself. I don't know what it is. The only reason for which we know that it is running is because from time to time, we get a box popping up to say something like "this can't start/work due to a long-running script. Is this something that is important for our computor or is she something harmful, or simply unnecessary?

    Hi Anna-KarinEdvardsson,

    1 did you change on your computer before the show?

    2 are. what scripts you referring?

    3. when exactly the script starts?

    I suggest you to set the computer to clean boot and check how it works.

    To configure the computer clean boot, follow the steps in the below link:

    How to perform a clean boot

    Note: After the installation of updates to the clean boot follow step: 7 article to reset your computer to normal startup.

  • I frequently get a pop up that says "' web page addresses do not cause of long-running script." "

    * Original title: pop ups

    I frequently get a pop up that says "' web page addresses do not cause of long-running script." "  It's maddening.

    It's all web sites that do, or just a specific or both? If its just one or two sites, try them as 'compatibility mode' - http://windows.microsoft.com/en-US/internet-explorer/use-compatibility-view#ie=ie-11

    If this does not help, it occurs to these sites if you run IE (assuming you're using IE) "mode without modules? ( [Internet Explore (No. Add ons)])

    If still no joy, then see if anything in this article allows --- https://support.microsoft.com/en-us/kb/308260#cause it is a long read but has a few things to try for script errors in Internet Explorer.

    The default base heal - use another browser like Mozilla Firefox - https://www.mozilla.org/en-US/firefox/new/

  • performance problem, when I use the lappy for long periods... he get odious

    I installed windows 7 in my lappy... When I use the lappy for long... he get odious... I'm irritating with that... and when I restart it started working as usual.please help me form this problem

    Hello

    1. have there been recent changes to the computer before the show?

    2. this happens to you when you work on any specific application?

    I suggest you follow the given steps and later a update on the State of the question.

    Method 1: Try to run the troubleshooter of Performance:

    http://Windows.Microsoft.com/en-us/Windows7/open-the-performance-Troubleshooter

    Method 2: Optimize Windows 7 for better performance:

    http://Windows.Microsoft.com/en-us/Windows7/optimize-Windows-7-for-better-performance

    Important: when running chkdsk on the drive hard if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data may be lost.

    Ways to improve your computer's performance:

    http://Windows.Microsoft.com/en-us/Windows7/ways-to-improve-your-computers-performance

    For all windows questions do not hesitate to contact us and we will be happy to help you.

  • scripts for long durations

    I continue to have a pop up box - when in various programs — that the readings for example - Facebook.com has stopped woring due to a long-running script - I can't find the script - but the music starts playing - looks like a game - I deleted all the games but it always keeps popping up - thank you for your help.

    Hello

    1. what browser you use on the computer?

    2 is this problem specific to all Web sites or all Web sites?

    If you are facing this problem when you use Internet Explorer, then try the following steps.

    To resolve this problem, use the following methods in the order in which they are presented. If method 1 does not resolve your problem, go to the next method.

    Method 1:

    I suggest you to run the fixit available at the following link:

    Troubleshoot Internet Explorer to IE quick, safe and stable

    http://support.Microsoft.com/mats/ie_performance_and_safety/en-us

    Method 2:

    Follow the steps in the following article:

    Tips for solving problems when Internet Explorer hangs or stops working

    http://Windows.Microsoft.com/en-us/Windows7/tips-for-solving-problems-with-Internet-Explorer

    Warning: him reset Internet Explorer settings feature might reset security settings or privacy settings that you have added to the list of Trusted Sites. Reset the Internet Explorer settings can also reset parental control settings. We recommend that you note these sites before you use the reset Internet Explorer settings.
    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

     

    Method 3:

    See the steps in troubleshooting mentioned in the following article:

    How to troubleshoot the script errors in Internet Explorer on Windows computers http://support.Microsoft.com/kb/308260

     

    For your reference:

    What should you do about Internet Explorer script errors?

    http://Windows.Microsoft.com/en-us/Windows7/what-should-you-do-about-Internet-Explorer-script-errors

    Response with more information to help you.

  • Parse Hard &amp; Soft Parse for a given SQL?

    Hi all

    I need to know which of these is a hard and soft analysis for a given Sql. What I think is the 'charges' and 'invalidation' indicates if a cursor is invalidated and gets reloaded, which allows us to check if a call analysis becomes hard analysis.

    Confusion here is should "Disk reads" value nonzero means hard analysis regardless of the 'load' and 'invalidation' and 'Disc bed' zero value means soft parse?

    SELECT a.SQL_ID, a.INSTANCE_NUMBER, a.SNAP_ID,
      TO_CHAR(b.END_INTERVAL_TIME, 'DD-MON-YYYY HH24:MI') snap_time,
      a.PLAN_HASH_VALUE,
            ROUND(a.ELAPSED_TIME_DELTA/1000000) TOTAL_EXECUTION_TIME_SEC,
            ROUND(a.CPU_TIME_DELTA/1000000)    cpu_seconds,
            a.ROWS_PROCESSED_DELTA    rows_processed,
            a.BUFFER_GETS_DELTA      buffer_gets,
            a.DISK_READS_DELTA      disk_reads,
            a.EXECUTIONS_DELTA      executions,
            a.PARSE_CALLS_DELTA    parses,
      a.VERSION_COUNT             version_count,
            a.LOADS_TOTAL               loads_total,
            a.INVALIDATIONS_TOTAL       invalidations_total
    FROM DBA_HIST_SQLSTAT a, DBA_HIST_SNAPSHOT b
    WHERE a.SNAP_ID = b.SNAP_ID and a.INSTANCE_NUMBER=b.INSTANCE_NUMBER
    AND a.INSTANCE_NUMBER=1 AND a.SQL_ID='bsraj0u9r9d3w'
    ORDER BY a.SNAP_ID desc;
    
                                                                 TOTAL
                  Instance      Snap Snap                    EXECUTION     CPU                    Buffer     Disk                   version loads invalidations
    Sql Id          Number        Id Time                    TIME(Sec) Seconds     Rows             Gets    Reads Executions Parses   count total         total
    ------------- -------- --------- -------------------- ------------ ------- -------- ---------------- -------- ---------- ------ ------- ----- -------------
    bsraj0u9r9d3w        1      9368 12-FEB-2016 12:00              14      13      200       14,079,211      780          2      1       1     6             5 --- hard Parse
    bsraj0u9r9d3w        1      9348 11-FEB-2016 16:00             110      91    1,500      104,806,435        0         15      4       1     5             4 --- ??
    bsraj0u9r9d3w        1      9347 11-FEB-2016 15:00              30      29      500       34,922,061        0          5      2       1     5             4 --- ??
    bsraj0u9r9d3w        1      9346 11-FEB-2016 14:00              14      13      200       14,009,248        0          2      1       1     5             4 --- ??
    bsraj0u9r9d3w        1      9341 11-FEB-2016 09:00              14      13      200       14,009,957      651          2      2       1     5             4 --- hard Parse
    bsraj0u9r9d3w        1      9297 09-FEB-2016 13:00              20      20      500       23,380,631        0          5      4       1     4             3 --- ??
    bsraj0u9r9d3w        1      9294 09-FEB-2016 10:00              65      53    1,300       58,569,220        0         13     13       1     3             2 --- ??
    bsraj0u9r9d3w        1      9293 09-FEB-2016 09:00              18      17      300       18,635,057        0          3      2       1     3             2 --- ??
    bsraj0u9r9d3w        1      9292 09-FEB-2016 08:00              70      67    1,700       77,145,560      787         17     17       1     3             2 --- hard Parse
    bsraj0u9r9d3w        1      9272 08-FEB-2016 12:00              18      18      400       22,164,178        0          4      4       1     2             1 --- ??
    bsraj0u9r9d3w        1      9270 08-FEB-2016 10:00             106     101    2,500      123,154,635        0         26     24       1     2             1 --- ??
    bsraj0u9r9d3w        1      9269 08-FEB-2016 09:00              11      10      300       11,401,899      657          3      3       1     2             1 --- hard Parse
    bsraj0u9r9d3w        1      9253 07-FEB-2016 17:00             104      98    2,300      115,320,927      788         23     23       1     1             0 --- hard Parse
    

    Thanks in advance

    Reads disk do not mean that the query will invalidation thus analyze hard. Reading disc mean simply that the IO that happens from disk and it is perhaps due to the result not being not not available in memory.

    I'm not sure why you use this type of analysis to check if requests are going for hard analysis or not? Why not pick up a particular query run and use TKPROF(better SQLTXPLAN) or AWR based SQRPT.sql to check the same? What is the exact issuethat, you're trying to solve?

    Aman...

  • Running SQL scripts on different databases

    Hello!

    At my work we have many databases on a server. I have to make a request so that users can run the application on a selected database SQL scripts.

    So my question may be separated into 2 sections:

    1 - is possible to let users SQL scripts run directly from the application?

    I think a database to create a page that displays the list of all the SQL scripts, that we want to use, and when you click on a specific script name in the list, it asks something like "Where the database you want to run the script?", and then, as confirmed by the user, it would show results running the script on a different page.

    is 2 - possible to let users choose what database to run these scripts?

    Any information would be helpful, I'm at the beginning of the project and am not sure at all about how to proceed, or if it is at all possible.

    Thank you!

    Fallen_Kaede wrote:

    Thanks for the quick response. I confirm that we are talking about databases on a server.

    The request is to "debug" to other databases. For example, be run scripts to the locks on the list, to show the different indexes on a table, etc. to help diagnose problems.

    It looks like the 'users' are DBA who should use OEM/Grid Control to do so.

    1 - is possible to let users SQL scripts run directly from the application?

    Lol the only way to run scripts in the APEX is the use of the SQL Scripts for SQL workshop component.

    The key word in your question is 'application '. SQL * more and Developer SQL are applications that allow users to run SQL scripts on the desktop. Scripts SQL is an APEX integrated application that allows developers to run SQL scripts on the web. However, there is no documented way supported for end users to run SQL scripts in a custom of APEX application that you created. Therefore, rethink your approach. Rather than create an application APEX runs scripts, you must convert the scripts in PL/SQL, APEX packages, pages, components and applications leverage features of the APEX and reports, graphics and interactivity (e.g. exploration links; timed refreshes etc.). This will give you a user experience improved, beyond what is possible using static SQL scripts.

    is 2 - possible to let users choose what database to run these scripts?

    The APEX applications would exist on an instance of the APEX in a database and access other databases using the database links (which can have a performance impact). It would be possible to create a LOV based on the view of the USER_DB_LINKS dictionary and use in a selection set to a global page list to provide a control to set the current context of the database. Region data sources will have to be generated dynamically in the packages of PL/SQL use the links from relevant database based on this value LOV.

Maybe you are looking for