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.

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

  • 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

  • ADF page times out for long running backend procedure

    Dear gurus,
    I have an ADF 10g web page that invokes a long running backend PL/SQL procedure.
    After some time, and while the web page awaits for the completion of the PL/SQL procedure, I get an *'Oops! This page appears broken'* from my browser (either IE or Firefox).
    Does anybody know what setting to use to make my application endure long running backend procedures without timing out ?

    What is the Application Server you are deploying to? In WebLogic for example, there are options to configure the server stuck thread timeout for instance.
    Edited by: Nick Haralabidis on Jun 20, 2011 4:57 PM
    Also, consider trying to figure out the exact exception or error message. For instance, if your are using a software load balancer solution it may be that this layer times out.

  • Long running query--- included steps given by Randolf

    Hi,
    I have done my best to follow Randolf instruction word-by-word and hope to get solution for my
    problem soon. Sometime back I have posted a thread on this problem then got busy with other
    stuff and was not able to follow it. Here I am again with same issue.
    here is link for my previous post
    long running query in database 10gHere is backgroud of my requriemment.
    I am working on Oracle forms 10g which is using package given below. We want to display client information
    with order count basd on different status like Pending, Error, back Order, expedited, std shipping.
    Output will look something like.
    client name   pending    error   backorder   expedited   std shipping
    ABC            24         0       674          6789         78900
    XYZ            35         673    5700           0           798274
    .There are total 40 clients . The long running query are expedited and std shipping.
    When i run package from Oracle Form Developer it takes 3 mintues to run but when I run same query in our application using forms
    (which uses Oracle Application Server) it takes around 1 hour, which is completly unacceptable.
    User wants it be done in less than 1 mintue.
    I have tried combining Pending,error and backorder queries together but as far as I know it will not
    work in Oracle Form as we need a place holder for each status.
    Please dont think it is Forms related question, it is a Performance problem.
    PACKAGE BODY ORDER_COUNT_PKG IS
    PROCEDURE post_query IS
      BEGIN
           BEGIN
                SELECT count(*)
                  INTO :ORDER_STATUS.PENDING
                  FROM orders o
              WHERE o.status = 'P'
                   AND (parent_order_id is null
                    OR  (order_type='G'
                         AND parent_order_id=original_order_number))
                      AND  o.client = :ORDER_STATUS.CLIENT_NUMBER;
         EXCEPTION
           WHEN OTHERS THEN
           NULL;
           END;
             BEGIN
                 SELECT  count(*)
                   INTO  :ORDER_STATUS.ERROR
                   FROM  orders o
                  WHERE  o.status = 'E'
                    AND  (parent_order_id is null
                     OR  (order_type='G'
                           AND parent_order_id=original_order_number))
                       AND  o.client = :ORDER_STATUS.CLIENT_NUMBER;
                EXCEPTION
           WHEN OTHERS THEN
           NULL;     
            END;
           BEGIN
                SELECT count(*)
                  INTO :ORDER_STATUS.BACK_ORDER
                  FROM orders o
              WHERE o.status = 'B'
                   AND (parent_order_id is null
                    OR (order_type='G'
                         AND parent_order_id=original_order_number))
                      AND o.client = :ORDER_STATUS.CLIENT_NUMBER;
          EXCEPTION
           WHEN OTHERS THEN
           NULL;   
         END;
           BEGIN
                SELECT count(*)
                  INTO :ORDER_STATUS.EXPEDITE
                  FROM orders o,shipment_type_methods stm
                 WHERE o.status in ('A','U')
             AND (o.parent_order_id is null
              OR (o.order_type = 'G'
             AND o.parent_order_id = o.original_order_number))
             AND o.client = stm.client
             AND o.shipment_class_code = stm.shipment_class_code
             AND (nvl(o.priority,'1') = '2'
              OR  stm.surcharge_amount <> 0)
                      AND  o.client = :ORDER_STATUS.CLIENT_NUMBER
              GROUP BY  o.client;
              EXCEPTION
           WHEN OTHERS THEN
           NULL;          
         END;           
           BEGIN
                SELECT count(*)
                  INTO :ORDER_STATUS.STD_SHIP
                  FROM  orders o,shipment_type_methods stm
                 WHERE o.status in ('A','U')
             AND  (o.parent_order_id is null
              OR (o.order_type = 'G'
             AND o.parent_order_id = o.original_order_number))
             AND nvl(o.priority,'1') <> '2'
             AND o.client = stm.client
             AND o.shipment_class_code = stm.shipment_class_code
             AND stm.surcharge_amount = 0
                      AND o.client = :ORDER_STATUS.CLIENT_NUMBER
              GROUP BY o.client;
          EXCEPTION
           WHEN OTHERS THEN
           NULL;
           END;
      END post_query;
      END ORDER_COUNT_PKG;one of the query which is taking long time is
    SELECT count(*)
                   FROM  orders o,shipment_type_methods stm
                 WHERE o.status in ('A','U')
             AND  (o.parent_order_id is null
              OR (o.order_type = 'G'
             AND o.parent_order_id = o.original_order_number))
             AND nvl(o.priority,'1') <> '2'
             AND o.client = stm.client
             AND o.shipment_class_code = stm.shipment_class_code
             AND stm.surcharge_amount = 0
               AND o.client = :CLIENT_NUMBER
              GROUP BY o.clientThe version of the database is 10.2.1.0.2
    SQL> alter session force parallel dml;These are the parameters relevant to the optimizer:
    SQL> show parameter user_dump_dest
    NAME                                 TYPE        VALUE
    user_dump_dest                       string      /u01/app/oracle/admin/mcgemqa/
                                                     udump
    SQL> show parameter optimizer
    NAME                                 TYPE        VALUE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      10.2.0.4
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    SQL> show parameter db_file_multi
    NAME                                 TYPE        VALUE
    db_file_multiblock_read_count        integer     16
    SQL> show parameter db_block_size
    NAME                                 TYPE        VALUE
    db_block_size                        integer     8192
    SQL> show parameter cursor_sharing
    NAME                                 TYPE        VALUE
    cursor_sharing                       string      EXACTHere is the output of EXPLAIN PLAN:
    SQL> explain plan for
      2  SELECT count(*)
      3         FROM  orders o,shipment_type_methods stm
      4       WHERE o.status in ('A','U')
      5           AND  (o.parent_order_id is null
      6            OR (o.order_type = 'G'
      7           AND o.parent_order_id = o.original_order_number))
      8           AND nvl(o.priority,'1') <> '2'
      9           AND o.client = stm.client
    10           AND o.shipment_class_code = stm.shipment_class_code
    11           AND stm.surcharge_amount = 0
    12     AND o.client = :CLIENT_NUMBER
    13    GROUP BY o.client
    14  /
    Explained.
    Elapsed: 00:00:00.12
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 559278019
    | Id  | Operation                      | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |                         |     1 |    35 | 46764   (3)| 00:09:22 |
    |   1 |  SORT GROUP BY NOSORT          |                         |     1 |    35 | 46764   (3)| 00:09:22 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID  | ORDERS                  |   175K|  3431K| 25979   (3)| 00:05:12 |
    |   3 |    NESTED LOOPS                |                         | 25300 |   864K| 46764   (3)| 00:09:22 |
    |*  4 |     TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS   |     1 |    15 |     2   (0)| 00:00
    |*  5 |      INDEX RANGE SCAN          | U_SHIPMENT_TYPE_METHODS |     2 |       |     1   (0)| 00:00:01 |
    |*  6 |     INDEX RANGE SCAN           | ORDERS_ORDER_DATE       |   176K|       |  2371   (8)| 00:00:29 |
    Predicate Information (identified by operation id):
       2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
                  "O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
                  AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
       4 - filter("STM"."SURCHARGE_AMOUNT"=0)
       5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
       6 - access("O"."CLIENT"=:CLIENT_NUMBER)
           filter("O"."STATUS"='A' OR "O"."STATUS"='U')
    24 rows selected.
    Elapsed: 00:00:00.86
    SQL> rollback;
    Rollback complete.
    Elapsed: 00:00:00.07Here is the output of SQL*Plus AUTOTRACE including the TIMING information:
    SQL> SELECT count(*)
      2         FROM  orders o,shipment_type_methods stm
      3       WHERE o.status in ('A','U')
      4           AND  (o.parent_order_id is null
      5            OR (o.order_type = 'G'
      6           AND o.parent_order_id = o.original_order_number))
      7           AND nvl(o.priority,'1') <> '2'
      8           AND o.client = stm.client
      9           AND o.shipment_class_code = stm.shipment_class_code
    10           AND stm.surcharge_amount = 0
    11     AND o.client = :CLIENT_NUMBER
    12    GROUP BY o.client
    13  /
    Elapsed: 00:00:03.09
    Execution Plan
    Plan hash value: 559278019
    | Id  | Operation                      | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |                         |     1 |    35 | 46764   (3)| 00:09:22 |
    |   1 |  SORT GROUP BY NOSORT          |                         |     1 |    35 | 46764   (3)| 00:09:22 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID  | ORDERS                  |   175K|  3431K| 25979   (3)| 00:05:12 |
    |   3 |    NESTED LOOPS                |                         | 25300 |   864K| 46764   (3)| 00:09:22 |
    |*  4 |     TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS   |     1 |    15 |     2   (0)| 00:00
    |*  5 |      INDEX RANGE SCAN          | U_SHIPMENT_TYPE_METHODS |     2 |       |     1   (0)| 00:00:01 |
    |*  6 |     INDEX RANGE SCAN           | ORDERS_ORDER_DATE       |   176K|       |  2371   (8)| 00:00:29 |
    Predicate Information (identified by operation id):
       2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
                  "O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
                  AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
       4 - filter("STM"."SURCHARGE_AMOUNT"=0)
       5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
       6 - access("O"."CLIENT"=:CLIENT_NUMBER)
           filter("O"."STATUS"='A' OR "O"."STATUS"='U')
    Statistics
             55  recursive calls
              0  db block gets
           7045  consistent gets
              0  physical reads
              0  redo size
            206  bytes sent via SQL*Net to client
            238  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> disconnect
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> The TKPROF output for this statement looks like the following:
    SELECT count(*)
           FROM  orders o,shipment_type_methods stm
         WHERE o.status in ('A','U')
             AND  (o.parent_order_id is null
              OR (o.order_type = 'G'
             AND o.parent_order_id = o.original_order_number))
             AND nvl(o.priority,'1') <> '2'
             AND o.client = stm.client
             AND o.shipment_class_code = stm.shipment_class_code
             AND stm.surcharge_amount = 0
       AND o.client = :CLIENT_NUMBER
      GROUP BY o.client
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute      1      0.04       0.04          0          0          0           0
    Fetch        2      2.96       2.91          0       7039          0           1
    total        4      3.01       2.95          0       7039          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 95 
    Rows     Row Source Operation
          1  SORT GROUP BY NOSORT (cr=7039 pr=0 pw=0 time=2913701 us)
         91   TABLE ACCESS BY INDEX ROWID ORDERS (cr=7039 pr=0 pw=0 time=261997906 us)
         93    NESTED LOOPS  (cr=6976 pr=0 pw=0 time=20740 us)
          1     TABLE ACCESS BY INDEX ROWID SHIPMENT_TYPE_METHODS (cr=2 pr=0 pw=0 time=208 us)
          3      INDEX RANGE SCAN U_SHIPMENT_TYPE_METHODS (cr=1 pr=0 pw=0 time=88 us)(object id 81957)
         91     INDEX RANGE SCAN ORDERS_ORDER_DATE (cr=6974 pr=0 pw=0 time=70 us)(object id 81547)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2        0.02          0.02
    ********************************************************************************The DBMS_XPLAN.DISPLAY_CURSOR output:
    SQL> variable CLIENT_NUMBER varchar2(20)
    SQL> exec :CLIENT_NUMBER := '14'
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.06
    SQL> SELECT /*+ gather_plan_statistics */ count(*)
      2         FROM  orders o,shipment_type_methods stm
      3       WHERE o.status in ('A','U')
      4           AND  (o.parent_order_id is null
      5            OR (o.order_type = 'G'
      6           AND o.parent_order_id = o.original_order_number))
      7           AND nvl(o.priority,'1') <> '2'
      8           AND o.client = stm.client
      9           AND o.shipment_class_code = stm.shipment_class_code
    10           AND stm.surcharge_amount = 0
    11     AND o.client = :CLIENT_NUMBER
    12    GROUP BY o.client
    13  /
      COUNT(*)
            91
    Elapsed: 00:00:02.85
    SQL> set termout on
    SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
    PLAN_TABLE_OUTPUT
    SQL_ID  4nfj368y8w6a3, child number 0
    SELECT /*+ gather_plan_statistics */ count(*)        FROM  orders o,shipment_type_methods stm      WHERE
    o.status in ('A','U')          AND  (o.parent_order_id is null           OR (o.order_type = 'G'
    AND o.parent_order_id = o.original_order_number))          AND nvl(o.priority,'1') <> '2'          AND
    o.client = stm.client          AND o.shipment_class_code = stm.shipment_class_code          AND
    stm.surcharge_amount = 0    AND o.client = :CLIENT_NUMBER   GROUP BY o.client
    Plan hash value: 559278019
    | Id  | Operation                      | Name                    | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |   1 |  SORT GROUP BY NOSORT          |                         |      1 |      1 |      1 |00:00:02.63 |    7039 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID  | ORDERS                  |      1 |    175K|     91 |00:03:56.87 |    7039 |
    |   3 |    NESTED LOOPS                |                         |      1 |  25300 |     93 |00:00:00.02 |    6976 |
    |*  4 |     TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS   |      1 |      1 |      1 |00:00:00.01 |       2 |
    |*  5 |      INDEX RANGE SCAN          | U_SHIPMENT_TYPE_METHODS |      1 |      2 |      3 |00:00:00.01 |       1 |
    |*  6 |     INDEX RANGE SCAN           | ORDERS_ORDER_DATE       |      1 |    176K|     91 |00:00:00.01 |    6974 |
    Predicate Information (identified by operation id):
       2 - filter((("O"."PARENT_ORDER_ID" IS NULL OR ("O"."ORDER_TYPE"='G' AND
                  "O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER"))) AND NVL("O"."PRIORITY",'1')<>'
                  "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE"))
       4 - filter("STM"."SURCHARGE_AMOUNT"=0)
       5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
       6 - access("O"."CLIENT"=:CLIENT_NUMBER)
           filter(("O"."STATUS"='A' OR "O"."STATUS"='U'))
    32 rows selected.
    Elapsed: 00:00:01.30
    SQL> I'm looking forward for suggestions how to improve the performance of this statement.
    Thanks
    Sandy

    Please find explain plan for No hint
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 559278019
    | Id  | Operation                      | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |                         |     1 |    35 | 46764   (3)| 00:09:22 |
    |   1 |  SORT GROUP BY NOSORT          |                         |     1 |    35 | 46764   (3)| 00:09:22 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID  | ORDERS                  |   175K|  3431K| 25979   (3)| 00:05:12 |
    |   3 |    NESTED LOOPS                |                         | 25300 |   864K| 46764   (3)| 00:09:22 |
    |*  4 |     TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS   |     1 |    15 |     2   (0)| 00:00
    |*  5 |      INDEX RANGE SCAN          | U_SHIPMENT_TYPE_METHODS |     2 |       |     1   (0)| 00:00:01 |
    |*  6 |     INDEX RANGE SCAN           | ORDERS_ORDER_DATE       |   176K|       |  2371   (8)| 00:00:29 |
    Predicate Information (identified by operation id):
       2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
                  "O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
                  AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
       4 - filter("STM"."SURCHARGE_AMOUNT"=0)
       5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
       6 - access("O"."CLIENT"=:CLIENT_NUMBER)
           filter("O"."STATUS"='A' OR "O"."STATUS"='U')
    24 rows selected.
    Elapsed: 00:00:00.86Explain Plan for Parallel Hint
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 559278019
    | Id  | Operation                      | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |                         |     1 |    35 | 46764   (3)| 00:09:22 |
    |   1 |  SORT GROUP BY NOSORT          |                         |     1 |    35 | 46764   (3)| 00:09:22 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID  | ORDERS                  |   175K|  3431K| 25979   (3)| 00:05:12 |
    |   3 |    NESTED LOOPS                |                         | 25300 |   864K| 46764   (3)| 00:09:22 |
    |*  4 |     TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS   |     1 |    15 |     2   (0)| 00:00
    |*  5 |      INDEX RANGE SCAN          | U_SHIPMENT_TYPE_METHODS |     2 |       |     1   (0)| 00:00:01 |
    |*  6 |     INDEX RANGE SCAN           | ORDERS_ORDER_DATE       |   176K|       |  2371   (8)| 00:00:29 |
    Predicate Information (identified by operation id):
       2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
                  "O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
                  AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
       4 - filter("STM"."SURCHARGE_AMOUNT"=0)
       5 - access("STM"."CLIENT"='14')
       6 - access("O"."CLIENT"='14')
           filter("O"."STATUS"='A' OR "O"."STATUS"='U')
    24 rows selected.
    Elapsed: 00:00:08.92Explain Plan for USE_Hash hint
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1465232248
    | Id  | Operation                     | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT              |                         |     1 |    35 | 46786   (3)| 00:09:22 |
    |   1 |  SORT GROUP BY NOSORT         |                         |     1 |    35 | 46786   (3)| 00:09:22 |
    |*  2 |   HASH JOIN                   |                         | 25300 |   864K| 46786   (3)| 00:09:22 |
    |*  3 |    TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS   |     1 |    15 |     2   (0)| 00:00:0
    |*  4 |     INDEX RANGE SCAN          | U_SHIPMENT_TYPE_METHODS |     2 |       |     1   (0)| 00:00:01 |
    |*  5 |    TABLE ACCESS BY INDEX ROWID| ORDERS                  |   175K|  3431K| 46763   (3)| 00:09:22 |
    |*  6 |     INDEX RANGE SCAN          | ORDERS_ORDER_DATE       |   176K|       |  4268   (8)| 00:00:52 |
    Predicate Information (identified by operation id):
       2 - access("O"."CLIENT"="STM"."CLIENT" AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_COD
                  E")
       3 - filter("STM"."SURCHARGE_AMOUNT"=0)
       4 - access("STM"."CLIENT"='14')
       5 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
                  "O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
       6 - access("O"."CLIENT"='14')
           filter("O"."STATUS"='A' OR "O"."STATUS"='U')
    25 rows selected.
    Elapsed: 00:00:01.09
    SQL> Thanks
    Sandy

  • SQL Developer Locking up/Unable to Cancel long Running tasks

    I have had the same problem with a number of versions of SQL Developer (and version 3.2.09). It occurs when trying to cancel a long-running PL-SQL Function or procedure that has been started by 'Run' in SQL Developer.
    Select Terminate in Run Manager does not stop the job. Nor does trying to exit SQLDeveloper; it asks whether I want to kill the job; then doesn't kill it and doesn't exit either.
    Trying to save modifications to anything the process depends on results in SQL Developer locking for ~20 minutes.
    I have to resort to getting a DBA to manually kill the process at the server.
    Is there any possiblity of a workaround or a way of making the PL/SQL not lock so it can be terminated please?
    Thanks

    I have had the same problem with a number of versions of SQL Developer (and version 3.2.09). It occurs when trying to cancel a long-running PL-SQL Function or procedure that has been started by 'Run' in SQL Developer.
    Select Terminate in Run Manager does not stop the job. Nor does trying to exit SQLDeveloper; it asks whether I want to kill the job; then doesn't kill it and doesn't exit either.
    Trying to save modifications to anything the process depends on results in SQL Developer locking for ~20 minutes.
    I have to resort to getting a DBA to manually kill the process at the server.
    Is there any possiblity of a workaround or a way of making the PL/SQL not lock so it can be terminated please?
    Thanks

  • How can i cancel long running queries (red x doesnt work)

    hi there
    i am trying to work with some long running queries - it would be very nice to be able to cancel them (like toads cancel button)
    I have tried the red X in the circle but it doesnt seem to work - it appears to have cancelled it (the cylon-eye style comfort bar stops ocillating) but if i try to use the connection again, or disconnect or open another connection it says:
    "connection currently busy. Try again?"
    i have tried this in the latest release vanilla & the latest release plus patch 2
    thanks
    Martin

    Good news that this will be improved. Can't resist to post this Link: [plsql forum thread about start/stop.. | http://forums.oracle.com/forums/thread.jspa?forumID=75&threadID=927697]
    I have experienced the same and also noted that it feels better to execute stored procedures in sqldeveloper
    - by editing
    - compiling (might hang if already busy)
    - run from the same dialog just to get the the cylon's eye for emergency stops (which waits .... ) meanwhile jump to apex to fiddle with small table triggering exception to stop the procedure.
    If stored procedure is executed from the list via 'right mouse click'-style then you see in the log-region "connecting to databse ... ." but no method to stop nor cancel or cylon's eye is well hidden.
    When such "busy" is running I also noted that the database-connection right mouse click has greyed/inactivated the selections "connect/disconnect" so the next logical step for stopping via "disconnect" is out of the question.
    I think this also boils down also to question whether the user has rights to see gv$session and be able to drop/stop busy/jamming sessions. E.g. public synonyms listing has small icons with mystic red :)
    /paavo
    Java(TM) Platform     1.6.0_14
    Oracle IDE     1.5.4.59.40

  • Cancel long running queries

    Hi Folks,
    Is it possible to submit a SELECT statment using OraSqlStmt object and retrieve the data so generated?
    I want to submit a long-running SELECT query against Oracle, and have the option to cancel the query.
    I can submit the query asynchronously NONBLK option of OraSqlStmt and then be able to cancel it. However, I also want to display the dataset returned by the query. But I think it is not possible to create a dataset / recordset or dynaset using OraSqlStmt.
    THe question is:
    How can I submit a long running Select query, be able to cancel it and if the query is not cancelled then be able to display the records in a grid? I am using VB6.
    Thanks

    Good news that this will be improved. Can't resist to post this Link: [plsql forum thread about start/stop.. | http://forums.oracle.com/forums/thread.jspa?forumID=75&threadID=927697]
    I have experienced the same and also noted that it feels better to execute stored procedures in sqldeveloper
    - by editing
    - compiling (might hang if already busy)
    - run from the same dialog just to get the the cylon's eye for emergency stops (which waits .... ) meanwhile jump to apex to fiddle with small table triggering exception to stop the procedure.
    If stored procedure is executed from the list via 'right mouse click'-style then you see in the log-region "connecting to databse ... ." but no method to stop nor cancel or cylon's eye is well hidden.
    When such "busy" is running I also noted that the database-connection right mouse click has greyed/inactivated the selections "connect/disconnect" so the next logical step for stopping via "disconnect" is out of the question.
    I think this also boils down also to question whether the user has rights to see gv$session and be able to drop/stop busy/jamming sessions. E.g. public synonyms listing has small icons with mystic red :)
    /paavo
    Java(TM) Platform     1.6.0_14
    Oracle IDE     1.5.4.59.40

  • Long running SNP heuristic in the background

    Dear Experts,
    In SCM 5.0, randomly we encounted an issue where running SNP heuristic takes a long time to run and never completed...usually, this will takes less than couple hours to complete.
    I checked with Basis and they confirmed the sytem operates normally.  Can you advise what would caused the long running issue and how I can prevent it.
    Thanks,
    Tom

    Dear Tom,
    1. It will be useful to run Low level code determination procedure before running the SNP heuristcis to improve the performance.
    2. Secondly, I hope you are using parallel processing profiles functionlity. This will certainly help .
    3. We used seperate jobs location specific for SNP heuristics and ran some jobs in parallel with some offset / delayed start
    4. Running SNP heuristics only for the active products always helps, rather than running SNP heuristics for all products ( actvie products , obsoloete codes, ).  One of the way may be to  have  seperate SNP planner codes to seperate out obsolete codes
    I hope these steps may help.
    Regards
    Datta

  • V$session_longops not displaying a long running query

    Hi,
    There is a certain query that runs as a part of a stored procedure which when run takes about 1 and half hours to get completed and there is a hint in this query to use certain indexes on few tables.
    This time was unacceptable as it was much much longer than what it should have taken so I tried to monitor it through v$session_longops using the following query
    select * from v$session_longops where time_remaining > 0
    It shows no rows selected but the query is still running.
    When I changed the hint in the query to use the full table scan on these tables instead of the indexes it began to show up on the v$session_longops and it took like only 15 mins for the procedure execution to get completed.
    My questions are two fold
    1) Why did the first time with the Hint on the indexes not show up on v$session_longops with time_remaining > 0 and why did it show up only when i did a full table scan?
    2) Secondly is'nt a scan on a table faster using indexes if the index has unique values on the columns we are trying to get data from than the Full Table Scans. And if so then why is it behaving differently in this case.
    Thanks a lot in advance for any answers/suggestions

    1. v$session_longops only reports long running operations. The CBO assumes that the index scan is a tiny operation (nested loop joins), hence it is not displaying the query, but when you have a full table scan, the CBO assumes this to be a long operation, and hence it is visible in v$session_longops.
    2. Allow me to quote from
    "http://asktom.oracle.com/pls/ask/f?p=4950:8:17968334624783495563::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:9422487749968"
    "full scans are not evil, indexes are not good"
    "full scans are not evil, indexes are not good"
    "full scans are not evil, indexes are not good"
    Click that link for more information. :)
    The gist of it is, your CBO is smart, and hence generating a better plan than when you force it to use indexes. Yes, the plan has full table scans, but that is not a crime. What you can do is use optimizer parameters - "optimizer_index_cost_adj" to tune for a better performance, but you should not force an index unless you are sure that the index gives you a lower cost.
    You could paste the plan for you queries with and without hints and also paste the optimizer hints - show parameter optimizer.

  • Buffer limit running procedure

    I am having an issue with buffer limits when running procedures. If I set the output limit to unlimited in the Dbms Output tab, I can then open a worksheet and write a piece of sql to run the procedure and the output is spooled to the tab.
    The problem is when I have the procedure open and choose the run option in that window (not the run script option from a worksheet) the limit (default: 20000) appears to come back as the output no longer spools to the Dbms Output tab, it now spools to a log file in the Messages tab.
    Is there a way to increase the output limit on these logs so I can get debug behaviour along with an unlimited output spool? I can always run these procedures from a standalone script but it would be really nice to have the option to run it from the edit procedure window.
    Thanks,
    Daniel

    This works, but I have to put this in to the run window myself, I was hoping for a setting that would stick. I will mark this helpful for now as it now allows me to do what I needed to do. I will upgrade it to correct if I don't get a better solution within a few days.
    Thanks,
    Daniel

  • Call long running process and return immediately

    Hi everyone,
    Here' my problem : I am calling an onDemand application process when clicking on a button. It's a very long running process; and while waiting for the response my browser stops responding (white page).
    So, is there a way to call a process and return immediately to the javascript. The process will set a field to a given value when it finishes. In javascript side, I can then check in a while boucle the value of this field to know if the process has ended.But I dont know how to return just after the application process call ...
    Thanks and best regards,
    Othman

    I presume that you can achieve that by means of a batch job.
    You can use an automatic page reload every X seconds until a certain "flag" (or similar mechanism) changes state and check it in a before header process. In the meanwhile you can display some animated GIF for instance.
    Once the processing is completed you remove the reload timer from the header or you branch to a different page using a programmatic technique like procedure owa_util.redirect_url.
    Bye,
    Flavio
    http://www.oraclequirks.blogspot.com/search/label/Apex

  • HTTP Server Hangs on Long Running Process

    Hi,
    We are having an issue with our production environment where long running processes i.e. > 5 mins will cause the client application to stop responding. We notice that this is only affecting forms which has no activity during the busy period i.e. forms which call a back end DB procedure or function and waits for a response from the DB to say that the process is done.
    Checking on the process itself from the DB shows that the process has completed successfully but somehow there's no response back to the client to say that it's completed. As a result, the client will be in busy status forever.
    We are sure that the issue originates from the HTTP server because when we by-pass the HTTP server i.e. send the request directly to the Apps server, this behaviour is not happening.
    By thew way, we are running on Oracle Forms 11g using Weblogic.
    Changes made so far but to no effect:
    maxBlockTime=1800000 (web.xml)
    keepAlive=Off (httpd.conf)
    Timeout=1800 (httpd.conf)
    FORMS_TIMEOUT=60 (formsweb.cfg)
    heartbeat=4 (formsweb.cfg)
    Session-Timeout=30 (web.xml)
    Can this be related to network configuration? If yes, what are the things to look for?
    Thanks.

    as the response came from the server your httpd service is not getting active for that you
    need to keep the httpd service alive so that the response can be obeyed
    just try this
    keepAlive=On (httpd.conf)
    ..

  • WIJ 20002 error on long running reports

    When trying to run a long running report, an error message is received .
    Quote:
    *"The Web Intelligence Java Report Panel cannot connect to the server. Close
    the report panel and try to connect again or see your BusinessObjects
    administrator. (Error: WIJ 20002)"*
    What happens next is you are advised to "close" (twice) and are then advised to close this window.
    If you select Details on the first error message:
    Server: https://test.i3access.iowa.gov:443/desktoplaunch/InfoView/CrystalEnterprise_Webi/cdzServlet?
    java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 502 for URL: https://test.i3access.iowa.gov:443/desktoplaunch/InfoView/CrystalEnterprise_Webi/cdzServlet
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at com.businessobjects.wp.cpi.CPIConnection.postRequest(CPIConnection.java:437)
         at com.businessobjects.wp.xml.XMLViaHttp.loadScript(XMLViaHttp.java:144)
         at com.businessobjects.wp.xml.XMLViaHttp.getPromptList(XMLViaHttp.java:1284)
         at com.businessobjects.wp.xml.XMLLoader.getPromptList(XMLLoader.java:279)
         at com.businessobjects.wp.om.OMQuery.loadPromptsAndContexts(OMQuery.java:359)
         at com.businessobjects.wp.om.OMQuery.getActiveContextCount(OMQuery.java:384)
         at com.businessobjects.wp.tc.query.TCQueryPropertie.buildQueryContextFromUI(TCQueryPropertie.java:496)
         at com.businessobjects.wp.tc.query.TCQueryTab.buildQueryContextFromUI(TCQueryTab.java:846)
         at com.businessobjects.wp.tc.query.TCQueryTab.modifyQueryProperties(TCQueryTab.java:638)
         at com.businessobjects.wp.tc.query.TCQueryTabManager.modifyQueryTabs(TCQueryTabManager.java:306)
         at com.businessobjects.wp.tc.query.TCQueryPanel.modifyQueryTabs(TCQueryPanel.java:310)
         at com.businessobjects.wp.tc.query.TCQueryPanel.load(TCQueryPanel.java:383)
         at com.businessobjects.wp.tc.TCMainPanel.switchToQueryPanel(TCMainPanel.java:563)
         at com.businessobjects.wp.tc.TCMainPanel.actionPerformed(TCMainPanel.java:506)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at com.jidesoft.plaf.basic.BasicJideButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
         at com.businessobjects.wp.cpi.CPIConnection.postRequest(CPIConnection.java:441)
         at com.businessobjects.wp.xml.XMLViaHttp.loadScript(XMLViaHttp.java:144)
         at com.businessobjects.wp.xml.XMLViaHttp.getPromptList(XMLViaHttp.java:1284)
         at com.businessobjects.wp.xml.XMLLoader.getPromptList(XMLLoader.java:279)
         at com.businessobjects.wp.om.OMQuery.loadPromptsAndContexts(OMQuery.java:359)
         at com.businessobjects.wp.om.OMQuery.getActiveContextCount(OMQuery.java:384)
         at com.businessobjects.wp.tc.query.TCQueryPropertie.buildQueryContextFromUI(TCQueryPropertie.java:496)
         at com.businessobjects.wp.tc.query.TCQueryTab.buildQueryContextFromUI(TCQueryTab.java:846)
         at com.businessobjects.wp.tc.query.TCQueryTab.modifyQueryProperties(TCQueryTab.java:638)
         at com.businessobjects.wp.tc.query.TCQueryTabManager.modifyQueryTabs(TCQueryTabManager.java:306)
         at com.businessobjects.wp.tc.query.TCQueryPanel.modifyQueryTabs(TCQueryPanel.java:310)
         at com.businessobjects.wp.tc.query.TCQueryPanel.load(TCQueryPanel.java:383)
         at com.businessobjects.wp.tc.TCMainPanel.switchToQueryPanel(TCMainPanel.java:563)
         at com.businessobjects.wp.tc.TCMainPanel.actionPerformed(TCMainPanel.java:506)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at com.jidesoft.plaf.basic.BasicJideButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Please let me know what the solution is.

    Matt,
    A namesake of yours is my client for this issue.
    Coming to the problem, the customer says there is proxy configured between HTTP server and WebSphere. This proxy server times out for long running reports. If the HTTPServer is bypassed, things work fine.
    A colleague of mine opened a case with BOBJ. I can get you the case# if you need it. We got this reply:
    From: Takano, Hitomi
    Sent: Tuesday, November 04, 2008 10:26 AM
    Hi Matt,
    I was away for the last two days, so I couldn't reply to you sooner.
    Extending the timeout setting from Webi and Infoview in BOXI R2 will not
    make the long running reports work as your proxy setting at the lower
    layer than BOXI just allows 5 minutes and after that the connection will
    be cancelled by the proxy. I'm not sure why this setting was effective
    for https only or timeout out after 2 min. This is out of scope of BOXI
    R2 and your network admin would be the best person to handle. You were
    getting 502 error in Java Report Panel. I googled with "502 error and
    ProxyTimeout", and I got the some articles returned which say  when
    backend doesn't answer on requests(because it timed out), it returns to
    a client an error 502.
    I'll close this thread as the n/w admin at the client are working things out.
    Thanks for your support.

  • 1st gen iPod Touch, old app no longer runs

    I have a first generation iPod Touch, version 3.1.3.  About a year ago I bought an app, "Converter Plus (Universal)", and it worked fine until recently when I received notice of an update.  There were a few app updates and all loaded successfully except the Converter Plus (Universal) which gave me an error message that the software I have does not support the updated app.  I understand and accept that my old iPod Touch does not support most (almost all) new apps.  The problem, however, is that the old Converter Plus (Universal) app that worked fine for a year no longer runs.  I try to open it, the initial screen pops up but shuts down right away.  I can only assume that when the recent update was attempted but failed it somehow messed up the old app.  Is there any way to restore the old version of the app so I can go back to using it?  The app only cost $1.99 so it is hardly the end of the world if I cannot use it any more, but I am worried all my other older apps (some of which receive regular updates) might also stop working and that just seems wrong to me.  Feels like I am being robbed.  Thanks for any suggestions.

    Try:
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Try deleting the version of that app that is in your iTunes library. Then do the following:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    Then delete the app from your iPod and sync the app back to your iPod and see if it works.
    - Next try restoring from backup. Make sure that all the apps that are compatible with 3.1.3 are in your iTunes library so they can be synced back as part of the restore from backup.
    - Last, restore to factory settings/new iPod and sync your media to the iPod.

Maybe you are looking for

  • Some digits not working

    I got an used iPhone 3GS and found after few days the digits (6,7,8) not working. Also the main main menu button at the bottom does not work properly. /it seemd to work few days back. But now I cannot got back to "Home" screen using that button. Appr

  • Delimited output of a select query

    Hi, How to write comma delimited output of select query from within a PL/SQL stored procedure to a file. for example select a | | ',' | | b from test3 I know it can be done at SQL prompt using spool command, but don't know how it can be done from wit

  • Help please! error code:  a valid dvd drive could not be found  [-70012]

    Hi, Although I am able to play cds and bootable discs, I am unable to play dvds on my LaCie d2 DVD-RW Firewire Drive. I get an error code: a valid dvd drive could not be found -70012 Is anyone able to help? I did see one other post listed with this e

  • Moving Stock Directly to a Fixed Bin using a Special Movement Indicator

    I am trying to set up moving stocks directly to fixed bin using special movement indicator. Found the below in SAP documentation: ========== Each time a goods receipt is posted for material ABC, you want to move the material directly to storage bin F

  • How to send picture by bluetooth

    How could I send picture stored in my iPhone4 to hand free car set.