How to troubleshoot long running procedure

Hi expert,
I have a store procedure running for a few days. I have used same procedure well in another oracle system. I checked system, this procedure is hung up when inserting data into a table inside. could you please tell me how to find out why this procedure keep running forever?
Many Thanks,

>
I have a store procedure running for a few days. I have used same procedure well in another oracle system. I checked system, this procedure is hung up when inserting data into a table inside. could you please tell me how to find out why this procedure keep running forever?
>
And is that the SAME procedure that, in this thread, you claimed you recompiled successfully even though it was still running and SB92075 told you that you couldn't?
why can compiling procedure while inserting table is still in progress.
Post the relevant information from V$SESSION_LONGOPS
>
V$SESSION_LONGOPS
V$SESSION_LONGOPS displays the status of various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering, and query execution, and more operations are added for every Oracle release.
>
http://docs.oracle.com/cd/B28359_01/server.111/b28320/dynviews_3021.htm

Similar Messages

  • Creating wrapper procedures for Long running procedures

    In SQL server, we can create a wrapper procedure to call long running procedure. Wrapper procedure calls long running procedure and returns to its calling application and give message "your request has been received and being processed. result will sent to your email-id." So user need not wait for complete execution for his request. From long running stored procedure we can send email to user stating all execution result he wants.
    Is there any way to implement it in Oracle9i? Or any other technique to call such long running procedures asynchronously through wrapper procedure sothat user need not to wait and also avoid "request time out" error.

    This question would be better off posed in the Oracle Data Provider for .NET forum.
    Christian

  • In forms how to cancel long running process or query in 10g

    We have application which is hosted on 10g AS. Some forms has lot of processing to be done and sometimes user wants to cancel the processing in between maybe because he wants to change some value and refire processing.
    Based on the search on net 'Esc' key was used in earlier version of forms to function as User requested Cancel operation. How can same be done in 10g. Do we have to do anything in fmrweb.res for this. Is there some setting to be done in forms or in AS for this functionality.
    Does this matter on whether JInitiator is used or JPI is used for running the application?
    Edited by: suresh_mathew on May 21, 2013 1:36 AM

    Hi,
    Exit can be used to cancel query mode i.e. in case you go into query mode by Exit you can cancel query mode. Suppose you went into query mode and you have fired query which will take some time to fetch how can I abort it.
    In earlier version of form there was 'Cancel' facility wherein if triggered it used to fire an error message 'Ora--01013 user requested cancel of current operation"
    With this facility you can abort any query which is executing or any long running process which forms is currently performing.
    fmrweb.res would have entry like
    27 : 0 : "Esc" : 1001 : "Cancel"
    The above entry I picked from OPN
    Java Function Numbers And Key Mappings For Forms Deployed Over Web [ID 66534.1]
    Unfortunately this is not working for us even if I put this in frmweb.res of 10g AS
    Basically I want ability to Abort/Cancel a long running process be it query execution or standard process triggered in the form.
    Any advise or help is highly appreciated.
    Suresh

  • Long running procedure

    Hi all.
    I have one problem with OracleCommand
    When I try to execute long running command, ASP.Net stoping work
    ocom.Parameters.Add("i_map",OracleDbType.Int32,1,System.Data.ParameterDirection.Input);
    ocom.ExecuteReader(); //at this staitment ASP.Net become frosen
    ocom.Transaction.Commit();
    I sure that Oracle finish working whis procedure. (Testing in PL/SQL developer)
    I using Oracle 9.2.0.6.0
    ODP.Net 9.2.0.4.01
    ConnectionString is "user=...; password=...; datasource=...; polling=false; enlist=false"
    Any ideas

    No, you don't want to use ExecuteReader unless you'll get back a set of records. ExecuteNonQuery is the one you want. If you expect a function's return value you need to set up a parameter for that, with the appropriate direction. The same is true of the output parameter. If you have one input param, one return param, and one output param, you should set up 3 different parameters.
    After it executes you'll have to read the value of the return and output parameters. Please check the ODP samples.

  • How to Handle Long running alerts in process chain...Urgent!!!

    Hi All,
    I am trying to find ways for handling long running alerts in process chains.
    I need to be sending out mails if the processes are running for longer than a threshold value.
    I did check this post:
    Re: email notification in process chain
    Appreciate if anyone can forward the code from this post or suggest me other ways of handling these long running alerts.
    My email id is [email protected]
    Thanks and Regards
    Pavana.

    Hi Ravi,
    Thanks for your reply. I do know that i will need a custom program.
    I need to be sending out mails when there is a failure and also when process are running longer than a threshold.
    Please do forward any code you have for such a custom program.
    Expecting some help from the ever giving SDN forum.
    Thanks and Regards
    Pavana
    Message was edited by:
            pav ana

  • How to Cancel Long Running Report

    Hello
    I'm looking for a way to cancel the printing of a long running report programatically? I'm using the CrystalDecisions.CrystalReports.Engine.ReportDocument() class.
    Thanks for your help

    Hi Syed,
    The old viewer was COM based and the new viewer is .NET. CR has the ability if the DB server supports Async communication. Most DB's don't so it wasn't of much use. For those that did the functionality was through custom coding within the Designer only. Async would allow CR to send a stop processing command to the DB server. If the server did not have the ability then CR can only wait for the data to start coming back before stopping the viewer from updating.
    In any event I don't believe the Windows Viewer in .NET has the ability but I will suggest it to the Product group to add the ability in some future version.
    Thank you
    Don

  • How to handle long running Processes in J2EE

    Hi all,
    we want to design something like a process engine on our application server. It should be possible to start processes asynchronous, so we think what we need is a message driven bean to start processes.
    The problem is that there are different states while running the process and it should be possibe to request the current state at the running process. But how we get access to the process after its once started over the stateless message driven bean?
    I hope you can understand the problem and maybe have a solution.
    Thanks & regards
    Rene G.

    You are totally right, but i think my problem is not to design a good software application, my problem is to design this in j2ee. I have not so much j2ee experience in this way. Normally to solve this problem i would think about something like a container which contains one thread for each process. But i read that it is forbidden in j2ee to have your own thread management, so this seems to be a bad solution in j2ee, not at all.
    I hope you understand me a little better now and i hope you don't think that i only want to utilize your knowledge to have less work by myself. I think this is a kind of j2ee specific question, which can be ask in a forum like this, isn't it?
    Thanks & regards
    Rene G.

  • How to cancel long running query by client

    Hi,
    I have the following problem:
    The user calls a service function (business logic) by an application client. Inside the function call an SQL-Query is generated and started on the database (JDBC). Depending on comlexity of the query or search parameter (e.g. search for chemical structures with SYMYX or Accord) the statement is running very long. In this case the user would like to cancle the search by pressing a button in the client application.
    Using preparedStatements there is a cancle method. Because the preparedStatement is inside the called business logic function the preparedStatement is not accessible fom the client or other service methods the normal way. If I understand this correct, I have to make all started preparedStatements public inside my service and then try to access the correct statement by an additional service call (other thread). This sounds a bit like a hack.
    Has anyone this constellation running or is there an other way?
    I would be happy about any hints or suggestions.
    Thanks, Antje.

    Best to post this in the Java > SQL/JDBC Forum

  • How to kill long running package?

    Hi,
    Oracle version : 11.0.1.7.0
    OS: IBM-AIX
    I have executed health check package "DBMS_HM.RUN_CHECK" But my Database performance badly degraded. I wish to end the execution of the package.
    How can i kill it?
    Thanks
    KSG

    -- show PROCESS id for all the active sessions
    select p.spid,s.sid,s.serial#,s.username,s.status,s.client_identifier,s.last_call_et,p.program,p.terminal,logon_time,module,s.osuser
    from V$process p,V$session s
    where s.paddr = p.addr and s.status = 'ACTIVE' and s.username not like '%SYS%';
    Find out the session and kill the session.
    alter system kill session 'sid,serial#';
    alter system kill session '32,87568';
    Regards
    Asif kabir

  • Long running transactions.

    Hi all,
    In real world systems, how efficient are long running flat transactions in ejb 2.0 since the transactions tends to lock several tables that are part of the transaction.
    Could any one explain in detail or direct to any websites that share the real time experiences with transactions in ejb enviornment.
    Thanks in advance.

    Long run transaction are real performance killers, avoid them if you can.
    It's actually quite easy (and sensible) to break down long transactions into smaller transactions with a little common-sense.
    For example, funds transfer. Say you want to transfer money from one account to another account from country A (which is only open on Tuesdays) to country B (only open on Fridays).
    Option A: Start a long running transaction on Tuesday, commit it on Friday.
    The resources used to do this are very much wasted - and will cause performance degradation.
    Option B: Transfer the funds from Country A to Country C (which is open Tuesday and Friday) - in one transaction on Tuesday. Transfer funds from Country C to country B in a second transaction on Friday. If C to B fails, transfer the funds back - if it succeeds inform A of the success. It's more complex, but there's no free lunch. (This is how real banks do it - ever got a refund from the bank? Well, no, but you know what I mean; it's also why it takes five days for a cheque to clear etc etc).
    This is only a narrative - but there are very few cases where this cannot work in a real transaction.

  • LONG running qurries in oracle database

    HI,
    How to check LONG running qurries in oracle database ? and also can you please tell me how to check current runnning quries in DB.
    Thanks,
    Shyamu.A.

    you mean long ops...
    SELECT sid, to_char(start_time,'hh24:mi:ss') stime,
    message,( sofar/totalwork)* 100 percent
    FROM v$session_longops
    WHERE sofar/totalwork < 1if you want locked objects
    select
      object_name,
      object_type,
      session_id,
      type,           -- Type or system/user lock
      lmode,         -- lock mode in which session holds lock
      request,
      block,
      ctime           -- Time since current mode was granted
    from
      v$locked_object, all_objects, v$lock
    where
      v$locked_object.object_id = all_objects.object_id AND
      v$lock.id1 = all_objects.object_id AND
      v$lock.sid = v$locked_object.session_id
    order by
      session_id, ctime desc, object_name
    /Query for currently running queries more than 60 secs...
    select s.username,s.sid,s.serial#,s.last_call_et/60 mins_running,q.sql_text from v$session s
    join v$sqltext_with_newlines q
    on s.sql_address = q.address
    where status='ACTIVE'
    and type <>'BACKGROUND'
    and last_call_et> 60
    order by sid,serial#,q.piece

  • Ccms monitoring - Long running job

    I checked in CMMS monitoring (RZ20) version ECC 6.0, there is no option to monitor long running background job.
    How to monitor long running background job using transaction RZ20?

    Hi,
    Check this [link|Re: How to monitor long running background job.;
    Thanks
    Sunny

  • I am running on OSX 10.10.1 and have a 2009 imac intel and I am having severe latency issues.  I am not familiar with macs as this is my home computer used by other family members.  Any help on how to troubleshoot why such latency issues?

    I am running on OSX 10.10.1 and have a 2009 imac intel and I am having severe latency issues.  I am not familiar with macs as this is my home computer used by other family members.  Any help on how to troubleshoot why such latency issues?

    When you see a beachball cursor or the slowness is especially bad, note the exact time: hour, minute, second.  
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
    Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Re:How to determine the long running jobs in a patch

    Hi ,
    How to determine the long running jobs in a patch .
    Regards

    Hi,
    Check the below MY ORACLE SUPPORT note:
    Note.252422.1 .... Check Completed Long Running Jobs In Oracle Apps.
    Best regards,
    Rafi

  • How run Procedure in SQL Developer?

    I need run procedure in SQL Developer with parameter : 2009
    create or replace PROCEDURE "update_table" (ff_year in varchar2) AS
    CURSOR c_update IS
    select DISTINCT P.mafew name, u.frew nameone, t.greddf, .........
    I click green button RUN and have new window Run PL/SQL. Where in this script I need to print 2009?
    DECLARE
    FF_YEAR VARCHAR2(200);
    BEGIN
    FF_YEAR := NULL;
    update_table(
    FF_YEAR => FF_YEAR
    END;

    Hi,
    user10886774 wrote:
    Thanks all!
    I can run the procedure like 1 or 2 example? Is it right?
    1 like Run Script
    EXEC "UPDATE_TABLE" ('2009');
    2 click RUN on UPDATE_TABLE procedure
    DECLARE
    FF_YEAR VARCHAR2(200);
    BEGIN
    FF_YEAR := '2009';
    UPDATE_TABLE(
    FF_YEAR => FF_YEAR
    END;
    What is the name of the procedure?
    Is it update_tabe (all small letters)? If so, you must reference it as "update_table" (all small letters, inside double-quotes).
    Is it UPDATE_TABLE (all capital letters)? If so, you have the choice of referencing it as "UPDATE_TABLE" (all capital letters, inside double-quotes) or as update_table, or Update_Table, or UPDATE_TABLE, or uPdAtE_taBle, or ... (any kind of letters, without quotes).
    How about commit after?How about it?
    What is the question?
    If you want to commit, say COMMIT or click on the COMMIT icon.

Maybe you are looking for