Long running statement including function

Hello expert,
I have a long running statement and corresponding function as follows:
select
pp.policy_premium_pk,
pp.policy_fk,
pp.policy_term_fk,
pp.risk_fk,
pp.coverage_fk,
pp.transaction_log_fk,
pp.coverage_component_code,
hiroc_rpt_user.hiroc_get_delta_amount(pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code),
pp.rate_period_from_date
from proddw_mart.rmv_policy_premium pp
where pp.rate_period_type_code = 'TERM_COVG'
and pp.coverage_component_code <> 'NETPREM'
-- and pp.premium_amount <> 0
-- *** Following line is included for faster performance
and hiroc_rpt_user.hiroc_get_delta_amount(pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code) != 0
group by pp.policy_premium_pk,
pp.policy_premium_pk,
pp.policy_fk,
pp.policy_term_fk,
pp.risk_fk,
pp.coverage_fk,
pp.transaction_log_fk,
pp.coverage_component_code,
pp.rate_period_from_date;
CREATE OR REPLACE FUNCTION HIROC_RPT_USER."HIROC_GET_DELTA_AMOUNT" (
p_policy_fk IN NUMBER,
p_policy_term_history_fk IN NUMBER,
p_risk_fk IN NUMBER,
p_coverage_fk IN NUMBER,
p_transaction_log_fk IN NUMBER,
p_comp_code IN VARCHAR2)
RETURN NUMBER
IS
v_prev_trlog_fk NUMBER;
v_delta NUMBER;
v_parm VARCHAR2(1000);
v_msg VARCHAR2(200);
comma VARCHAR2(1) := ',';
v_src VARCHAR2(100) := 'Get_Delta_Amount';
BEGIN
SELECT nvl(MAX(pp.transaction_log_fk), -1)
INTO v_prev_trlog_fk
FROM proddw_mart.rmv_Policy_Premium pp
WHERE pp.coverage_fk = p_coverage_fk
AND pp.policy_term_fk = p_policy_term_history_fk
AND pp.transaction_log_fk+0 < p_transaction_log_fk
AND pp.coverage_component_code = p_comp_code
AND pp.rate_period_type_code = 'TERM_COVG';
SELECT nvl(SUM(decode(pp.transaction_log_fk, p_transaction_log_fk, premium_amount, 0)), 0) -
nvl(SUM(decode(pp.transaction_log_fk, p_transaction_log_fk, 0, pp.premium_amount)), 0)
INTO v_delta
FROM proddw_mart.rmv_Policy_Premium pp
WHERE pp.coverage_fk = p_coverage_fk
AND pp.policy_term_fk = p_policy_term_history_fk
AND pp.transaction_log_fk+0 IN (p_transaction_log_fk, v_prev_trlog_fk)
AND pp.rate_period_type_code = 'TERM_COVG'
AND INSTR(p_comp_code, pp.coverage_component_code) > 0;
RETURN v_delta;
EXCEPTION
WHEN NO_DATA_FOUND THEN
return 0;
WHEN OTHERS THEN
return 0;
END;
and it execution plan is as follows:
PLAN_TABLE_OUTPUT
Plan hash value: 319541564
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 92525 | 5511K| | 17417 (4)| 00:03:30 |
| 1 | HASH GROUP BY | | 92525 | 5511K| 14M| 17417 (4)| 00:03:30 |
|* 2 | MAT_VIEW ACCESS FULL| RMV_POLICY_PREMIUM | 92525 | 5511K| | 16045 (4)| 00:03:13 |
Predicate Information (identified by operation id):
2 - filter("PP"."RATE_PERIOD_TYPE_CODE"='TERM_COVG' AND
"PP"."COVERAGE_COMPONENT_CODE"<>'NETPREM' AND
"HIROC_RPT_USER"."HIROC_GET_DELTA_AMOUNT"("PP"."POLICY_FK","PP"."POLICY_TERM_FK","PP"."RISK_
FK","PP"."COVERAGE_FK","PP"."TRANSACTION_LOG_FK","PP"."COVERAGE_COMPONENT_CODE")<>0)

As the first (warming up) step you could rewrite your function to do it's task with a single select
CREATE OR REPLACE FUNCTION
HIROC_RPT_USER."HIROC_GET_DELTA_AMOUNT" (p_policy_fk IN NUMBER,  /* not used */
                                         p_policy_term_history_fk IN NUMBER,
                                         p_risk_fk IN NUMBER,    /* not used */
                                         p_coverage_fk IN NUMBER,
                                         p_transaction_log_fk IN NUMBER,
                                         p_comp_code IN VARCHAR2
  RETURN NUMBER
  IS
  v_prev_trlog_fk NUMBER;
  v_delta NUMBER;
BEGIN
  SELECT nvl(MAX(pp.transaction_log_fk), -1)
    INTO v_prev_trlog_fk
    FROM proddw_mart.rmv_Policy_Premium pp
   WHERE pp.coverage_fk = p_coverage_fk
     AND pp.policy_term_fk = p_policy_term_history_fk
     AND pp.transaction_log_fk+0 < p_transaction_log_fk
     AND pp.coverage_component_code = p_comp_code
     AND pp.rate_period_type_code = 'TERM_COVG';
  SELECT nvl(SUM(decode(pp.transaction_log_fk, p_transaction_log_fk, premium_amount, 0)), 0) -
         nvl(SUM(decode(pp.transaction_log_fk, p_transaction_log_fk, 0, pp.premium_amount)), 0)
    INTO v_delta
    FROM proddw_mart.rmv_Policy_Premium pp
   WHERE pp.coverage_fk = p_coverage_fk
     AND pp.policy_term_fk = p_policy_term_history_fk
     AND pp.transaction_log_fk+0 IN (p_transaction_log_fk, v_prev_trlog_fk)
     AND pp.rate_period_type_code = 'TERM_COVG'
     AND INSTR(p_comp_code, pp.coverage_component_code) > 0;
  select nvl(sum(case transaction_log_fk when p_transaction_log_fk
                                         then premium_amount
                                         else -premium_amount
                 end
             0
    into v_delta
    from proddw_mart.rmv_Policy_Premium
   where coverage_fk = p_coverage_fk
     and policy_term_fk = p_policy_term_history_fk
     and instr(p_comp_code,coverage_component_code) > 0
     and rate_period_type_code = 'TERM_COVG'
     and transaction_log_fk in (select p_transaction_log_fk,nvl(max(transaction_log_fk),-1)
                                   from proddw_mart.rmv_Policy_Premium
                                  where coverage_fk = p_coverage_fk
                                    and policy_term_fk = p_policy_term_history_fk
                                    and transaction_log_fk < p_transaction_log_fk
                                    and coverage_component_code = p_comp_code
                                    and rate_period_type_code = 'TERM_COVG'
  RETURN v_delta;
EXCEPTION
  WHEN NO_DATA_FOUND THEN return 0;
  WHEN OTHERS THEN return 0;
END;in the next step you could get rid of the function call:
something along the lines of
select pp.policy_premium_pk,
       pp.policy_fk,
       pp.policy_term_fk,
       pp.risk_fk,
       pp.coverage_fk,
       pp.transaction_log_fk,
       pp.coverage_component_code,
       nvl(sum(case f.transaction_log_fk when pp.transaction_log_fk
                                         then f.premium_amount
                                         else -f.premium_amount
               end
           0
          ) premium_amount,
       pp.rate_period_from_date
  from proddw_mart.rmv_policy_premium pp,
       (select p.premium_amount,
               p.policy_term_fk,
               p.coverage_fk,
               p.transaction_log_fk,
               p.coverage_component_code
          from proddw_mart.rmv_Policy_Premium p
         where p.rate_period_type_code = 'TERM_COVG'
           and instr('NETPREM',coverage_component_code) > 0
       ) f
where pp.rate_period_type_code = 'TERM_COVG'
   and pp.coverage_component_code = 'NETPREM'
   and pp.policy_term_fk = f.policy_term_fk
   and pp.coverage_fk = f.coverage_fk
   and (
        pp.transaction_log_fk = f.transaction_log_fk
    or
        pp.transaction_log_fk = (select nvl(max(transaction_log_fk),-1)
                                   from proddw_mart.rmv_Policy_Premium
                                  where rate_period_type_code = 'TERM_COVG'
                                    and coverage_component_code = 'NETPREM'
                                    and policy_term_fk = pp.policy_term_fk
                                    and coverage_fk = pp.coverage_fk
                                    and transaction_log_fk < pp.transaction_log_fk
group by pp.policy_premium_pk,
          pp.policy_premium_pk,
          pp.policy_fk,
          pp.policy_term_fk,
          pp.risk_fk,
          pp.coverage_fk,
          pp.transaction_log_fk,
          pp.coverage_component_code,
          pp.rate_period_from_dateRegards
Etbin

Similar Messages

  • Cancel long running statement in Oracle Lite (OLITE_10.3.0.3.0 olite40.jar)

    On JDBC statement, there is the method 'cancel' to instruct the database to cancel an executing statement. This works fine on Oracle server database, but not on Oracle lite database. The method call 'cancel' just blocks and the running statement is never interrupted.
    The example I tried is very simple. There is a thread started which executes a long running statement. I noticed, that when moving the cursor forward by calling rs.next(), it just blocks. That would be ok, if the statement could be canceled from within the main thread by stmt.cancel. But this call blocks as well with no implact on the running statement. Why is that? Do I miss something or is it not possible to cancel a long running statements in Oracle Lite?
    In the following my code snipped:
    public class CancelStatement {
         private static final String PATH_DB = "XX";
         private static final String PATH_LIB = "XX";
         private static final String CON_STRING = "jdbc:polite:whatever;DataDirectory=" + PATH_DB + ";Database=XX;IsolationLevel=Read Committed;Autocommit=Off;CursorType=Forward Only";
         private static final String USER = "XX";
         private static final String PASSWORD = "XX";
         public static void main(String args[]) throws Exception {
              System.setProperty("java.library.path", PATH_LIB);
              Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
              Connection con = DriverManager.getConnection(CON_STRING, USER, PASSWORD);
              Statement stmt = con.createStatement();
              Thread thread = new Thread(new LongStatementRunnable(con, stmt));
              thread.start();
              Thread.sleep(3000);
              // stop long running statement
              System.out.println("cancel long running statement");
              stmt.cancel(); // XXX does not work, as call is blocked until out of memory
              System.out.println("statement canceled");
         private static class LongStatementRunnable implements Runnable {
              private Connection con;
              private Statement stmt;
              public LongStatementRunnable(Connection con, Statement stmt) {
                   this.con = con;
                   this.stmt = stmt;
              @Override
              public void run() {
                   try {
                        System.out.println("start long running statement...");
                        // execute long running statement
                        ResultSet rs = stmt.executeQuery("SELECT * FROM PERSON P1, PERSON P2");
                        while (rs.next()) { // here the execution gets blocked
                             System.out.println("row"); // is never entered
                        rs.close();
                        stmt.close();
                        con.close();
                        System.out.println("long running statement finished...");
                   } catch (Exception e) {
                        e.printStackTrace();
    }I would be very glad if you could help me.
    Thanks a lot
    Daniel
    Edited by: 861793 on 26.05.2011 14:29

    Unfortunately Oracle Lite doesn't have this option. You can call your statement from a second thread as you have done, but you won't be able to kill or cancel this operation. The only way to get fix this is by rebooting. You can use process explorer to find the dll process that is executing the SQL, but the tables will be locked and sync would be locked as well until the process is finished running in shared memory.

  • Long running statement

    Hi,
    Is there any way to find out the long running statement from the previous night batch program?
    Thanks

    Another method is by using OEM.
    1) Click on the performance tab, switch to historical selection from the drop down View Data on top right corner.
    2) Scroll down to Additional Monitoring Links and select Period SQL. Use the selector at bottom of top graph to the spike in activity. Again the heavy SQL will show.
    3) Click the SQL in question by examining CPU and elapsed times. Use the plan hash value to select from v$sql or v$sqltext if required. Check the SQL plan and tuning information if available.
    4) From 2 above you an also schedule SQL Tuning or SQL Access advisor.

  • 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

  • How to analysis long time running statement

    Hi expert,
    please check following statement, it ran for a long time recent days, will you please instruct how to do analysis to find out the root cause for its long running. in it, function hiroc_get_delta_amount and large table rmv_policy_premium have caused this long runing time, but I still want to get more fault information from system side.
    select
    pp.policy_premium_pk,
    pp.policy_fk,
    pp.policy_term_fk,
    pp.risk_fk,
    pp.coverage_fk,
    pp.transaction_log_fk,
    pp.coverage_component_code,
    hiroc_rpt_user.hiroc_get_delta_amount(pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code),
    pp.rate_period_from_date
    from proddw_mart.rmv_policy_premium pp
    where pp.rate_period_type_code = 'TERM_COVG'
    and pp.coverage_component_code <> 'NETPREM'
    -- and pp.premium_amount <> 0
    -- *** Following line is included for faster performance
    and hiroc_rpt_user.hiroc_get_delta_amount(pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code) != 0
    group by pp.policy_premium_pk,
    pp.policy_premium_pk,
    pp.policy_fk,
    pp.policy_term_fk,
    pp.risk_fk,
    pp.coverage_fk,
    pp.transaction_log_fk,
    pp.coverage_component_code,
    pp.rate_period_from_date
    Many Thanks,

    843178 wrote:
    -- *** Following line is included for faster performance
    and hiroc_rpt_user.hiroc_get_delta_amount(pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code) != 0 That's an intersting piece of code.
    Apparently, by adding a user defined function into a query, that's going to improve performance according to the comment.
    In truth, it's going to add context switching and slow the query down.
    As well as posting the information required (as detailed by the FAQ posts), you will also need to ensure you provide detials of what that function does. If the functionality can be done in SQL rather than a PL/SQL function, then that will certainly improve things.

  • 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

  • When the apple review team review our app,they point out that our  app uses a background mode but does not include functionality that requires that mode to run persistently.but in fact,when the app in background ,the app need data update to make the

    when the apple review team review our app,they point out that our  app uses a background mode but does not include functionality that requires that mode to run persistently。but in fact,when the app in background ,the app need data update to make the function of  trajectory replay come ture。in fact, we have added function when the app  is in background mode。we have point out the point to them by email。but they still have question on the background mode,we are confused,does anyone can help me,i still don't know why do review team can't find the data update when  the app is in background and how do i modify the app,or what is the really problem they refered,do i misunderstand them?
    the blow is the content of the review team email:
    We found that your app uses a background mode but does not include functionality that requires that mode to run persistently. This behavior is not in compliance with the App Store Review Guidelines.
    We noticed your app declares support for location in the UIBackgroundModes key in your Info.plist but does not include features that require persistent location.
    It would be appropriate to add features that require persistent use of real-time location updates while the app is in the background or remove the "location" setting from the UIBackgroundModes key. If your application does not require persistent, real-time location updates, we recommend using the significant-change location service or the region monitoring location service.
    For more information on these options, please see the "Starting the Significant-Change Location Service" and "Monitoring Shape-Based Regions" sections in the Location Awareness Programming Guide.
    If you choose to add features that use the Location Background Mode, please include the following battery use disclaimer in your Application Description:
    "Continued use of GPS running in the background can dramatically decrease battery life."
    Additionally, at your earliest opportunity, please review the following question/s and provide as detailed information as you can in response. The more information you can provide upfront, the sooner we can complete your review.
    We are unable to access the app in use in "http://www.wayding.com/waydingweb/article/12/139". Please provide us a valid demo video to show your app in use.
    For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:
    - complete details of your rejection issue(s)
    - screenshots
    - steps to reproduce the issue(s)
    - symbolicated crash logs - if your issue results in a crash log
    If you have difficulty reproducing a reported issue, please try testing the workflow as described in <https://developer.apple.com/library/ios/qa/qa1764/>Technical Q&A QA1764: How to reproduce a crash or bug that only App Review or users are seeing.

    Unfortunately, these forums here are all user to user; you might try the developer forums or get in touch with the team that you are working with.

  • Hello.  I just upgraded to Lion OS X 10.7.3.  I was previously running 10.5.7 which included the ENTOURAGE application.  how do I retrieve needed information from this application that no longer runs on this new system?

    Hello.  I just upgraded to Lion OS X 10.7.3.  I was previously running 10.5.7 which included the ENTOURAGE application.  how do I retrieve needed information from this application that no longer runs on this new system?

    The file you'll be looking for that has most of what you're looking for - messages, address book, etc. is the Entourage Database.  The verison of Microsoft Office I run (on Lion) is Office 2008.  By default the Entourage Database for this verison is at user/Documents/Microsoft User Data/Office 2008 Identities/Main Identity/Database.  That folder (Main Identitty) also has your rules, signatures, and such.  You'll have to recover this file from whatever backup you have.  If you have a different version of Entourage, the file location will be a little diffferent.
    Good luck
    srb

  • Long running select statement and v$session_longops

    Oracle Version: 10.2.0.4
    I've a long running sql query that takes the estimated 6 minutes to complete and return the result.
    While it's running I'd like to observe it into the view v$session_longops.
    I altered the session that runs the query with
      ALTER SESSION SET timed_statistics=TRUE;The tables it queries have gathered statistics on them.
    However I don't see any rows in the view v$session_longops for the respective SID and serial#. Why is that? What am I missing?
    Thank you!

    Hi,
    Now I understand what you all meant by "loops" here .. Yes, the query does nested loops as one can see from the execution plan. So it could be the reason
    SELECT STATEMENT, GOAL = ALL_ROWS                                  
    SORT GROUP BY                                                             
      CONCATENATION                              
       TABLE ACCESS BY LOCAL INDEX ROWID     TABLE_1
        NESTED LOOPS                                                   
         NESTED LOOPS
          TABLE ACCESS BY GLOBAL INDEX ROWID     TABLE_2      
           INDEX RANGE SCAN                           IPK_t2_CDATE                               
          TABLE ACCESS BY INDEX ROWID     TABLE_3
           INDEX RANGE SCAN                     IPK_T3                            
         PARTITION RANGE ALL                                                 
          INDEX RANGE SCAN     IRGP_REGCODE                        
       TABLE ACCESS BY LOCAL INDEX ROWID     TABLE_1
        NESTED LOOPS                                                  
         NESTED LOOPS          
          TABLE ACCESS BY GLOBAL INDEX ROWID     TABLE_2     
           INDEX RANGE SCAN                       IPK_t2_STATUS          
          TABLE ACCESS BY INDEX ROWID     TABLE_3     
           INDEX RANGE SCAN                       IPK_T3
         PARTITION RANGE SINGLE               
          INDEX RANGE SCAN                     IRGP_REGCODE          

  • SAP work Process goes in run state,Users cannot login developer trace paste

    Hi team,
    We have a system which is at ECC6 release 701 ABAP + java system.
    The work process frequently go in run state and since this is an IDES system, I always restart the system.
    Please help me since i want tio know the root cause for the same.
    The dev trace is as follows, and i beleive its a listener problem by the logs.
    kernel runs with dp version 244000(ext=110000) (@(#) DPLIB-INT-VERSION-244000-UC)
    length of sys_adm_ext is 576 bytes
    SWITCH TRC-HIDE on ***
    ***LOG Q00=> DpSapEnvInit, DPStart (00 199004) [dpxxdisp.c   1287]
         shared lib "dw_xml.dll" version 254 successfully loaded
         shared lib "dw_xtc.dll" version 254 successfully loaded
         shared lib "dw_stl.dll" version 254 successfully loaded
         shared lib "dw_gui.dll" version 254 successfully loaded
         shared lib "dw_mdm.dll" version 254 successfully loaded
    rdisp/softcancel_sequence :  -> 0,5,-1
    use internal message server connection to port 3900
    Mon Dec 13 08:26:23 2010
    WARNING => DpNetCheck: NiHostToAddr(www.doesnotexist0223.qqq.nxst) took 6 seconds
    <EsNT> Using memory model view.
    <EsNT> Memory Reset disabled as NT default
    <ES> 127 blocks reserved for free list.
    ES initialized.
    mm.dump: set maximum dump mem to 96 MB
    Mon Dec 13 08:26:29 2010
    J2EE server info
      start = TRUE
      state = STARTED
      pid = 200040
      argv[0] = D:\usr\sap\BI7\DVEBMGS00\exe\jcontrol.EXE
      argv[1] = D:\usr\sap\BI7\DVEBMGS00\exe\jcontrol.EXE
      argv[2] = pf=D:\usr\sap\BI7\SYS\profile\BI7_DVEBMGS00_q4de3gsy203
      argv[3] = -DSAPSTART=1
      argv[4] = -DCONNECT_PORT=65000
      argv[5] = -DSAPSYSTEM=00
      argv[6] = -DSAPSYSTEMNAME=BI7
      argv[7] = -DSAPMYNAME=q4de3gsy203_BI7_00
      argv[8] = -DSAPPROFILE=D:\usr\sap\BI7\SYS\profile\BI7_DVEBMGS00_q4de3gsy203
      argv[9] = -DFRFC_FALLBACK=ON
      argv[10] = -DFRFC_FALLBACK_HOST=localhost
      start_lazy = 0
      start_control = SAP J2EE startup framework
    DpJ2eeStart: j2ee state = STARTED
    rdisp/http_min_wait_dia_wp : 1 -> 1
    ***LOG CPS=> DpLoopInit, ICU ( 3.0 3.0 4.0.1) [dpxxdisp.c   1694]
    ***LOG Q0K=> DpMsAttach, mscon ( q4de3gsy203) [dpxxdisp.c   12697]
    DpStartStopMsg: send start message (myname is >q4de3gsy203_BI7_00                      <)
    DpStartStopMsg: start msg sent
    CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
    CCMS: start to initalize 3.X shared alert area (first segment).
    DpMsgAdmin: Set release to 7000, patchlevel 0
    MBUF state PREPARED
    MBUF component UP
    DpMBufHwIdSet: set Hardware-ID
    ***LOG Q1C=> DpMBufHwIdSet [dpxxmbuf.c   1050]
    DpMsgAdmin: Set patchno for this platform to 254
    Release check o.K.
    DpJ2eeLogin: j2ee state = CONNECTED
    Mon Dec 13 08:27:09 2010
    my types changed after wp death/restart 0xbf --> 0xbd
    my types changed after wp death/restart 0xbd --> 0xb5
    my types changed after wp death/restart 0xb5 --> 0x95
    Mon Dec 13 08:27:29 2010
    ERROR => DpWPCheck: W1 (pid 199044) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W4 (pid 199912) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W6 (pid 192420) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W8 (pid 199528) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W9 (pid 198860) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W10 (pid 199664) died (severity=0, status=0) [dpxxdisp.c   15841]
    my types changed after wp death/restart 0x95 --> 0x85
    ERROR => DpWPCheck: W12 (pid 200036) died (severity=0, status=0) [dpxxdisp.c   15841]
    Mon Dec 13 08:27:43 2010
    ***LOG Q0I=> NiIRead: recv (10054: WSAECONNRESET: Connection reset by peer) [nixxi.cpp 4424]
    ERROR => NiIRead: SiRecv failed for hdl 6 / sock 316
        (SI_ECONN_BROKEN/10054; I4; ST; 127.0.0.1:4882) [nixxi.cpp    4424]
    ERROR => DpJ2eeMsgProcess: NiRead failed (NIECONN_BROKEN) [dpxxj2ee.c   1212]
    DpJ2eeMsgProcess: j2ee state = CONNECTED (NIECONN_BROKEN)
    Mon Dec 13 08:27:49 2010
    ERROR => DpWPCheck: W0 (pid 200632) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W1 (pid 199044) died (severity=0, status=0) [dpxxdisp.c   15841]
    my types changed after wp death/restart 0x85 --> 0x84
    ERROR => DpWPCheck: W3 (pid 93796) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W4 (pid 199912) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W5 (pid 200484) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W6 (pid 192420) died (severity=0, status=0) [dpxxdisp.c   15841]
    my types changed after wp death/restart 0x84 --> 0x80
    ERROR => DpWPCheck: W8 (pid 199528) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W9 (pid 198860) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W10 (pid 199664) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W11 (pid 199720) died (severity=0, status=0) [dpxxdisp.c   15841]
    ERROR => DpWPCheck: W12 (pid 200036) died (severity=0, status=0) [dpxxdisp.c   15841]
    DP_FATAL_ERROR => DpWPCheck: no more work processes
    DISPATCHER EMERGENCY SHUTDOWN ***
    increase tracelevel of WPs
    NiWait: sleep (10000ms) ...
    NiISelect: timeout 10000ms
    NiISelect: maximum fd=493
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Dec 13 08:27:59 2010
    NiISelect: TIMEOUT occured (10000ms)
    dump system status
    Workprocess Table (long)               Mon Dec 13 07:27:59 2010
    ========================
    No Ty. Pid      Status  Cause Start Err Sem CPU    Time  Program          Cl  User         Action                    Table
    0 DIA   200632 Ended         no      2   0        0                                                                         
    1 DIA   199044 Ended         no      3   0        0                                                                         
    2 DIA   200280 Ended         no      1   0        0                                                                         
    3 DIA    93796 Ended         no      2   0        0                                                                         
    4 DIA   199912 Ended         no      3   0        0                                                                         
    5 DIA   200484 Ended         no      2   0        0                                                                         
    6 UPD   192420 Ended         no      3   0        0                                                                         
    7 ENQ   199792 Ended         no      1   0        0                                                                         
    8 BTC   199528 Ended         no      3   0        0                                                                         
    9 BTC   198860 Ended         no      3   0        0                                                                         
    10 BTC   199664 Ended         no      3   0        0                                                                         
    11 SPO   199720 Ended         no      2   0        0                                                                         
    12 UP2   200036 Ended         no      3   0        0                                                                         
    Dispatcher Queue Statistics               Mon Dec 13 07:27:59 2010
    Switch off Shared memory profiling
    ShmProtect( 57, 3 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RW
    ShmProtect( 57, 1 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RD
    DpWakeUpWps: wake up all wp's
    Stop work processes
    Stop gateway
    killing process (184860) (SOFT_KILL)
    Stop icman
    killing process (190124) (SOFT_KILL)
    Terminate gui connections
    wait for end of work processes
    wait for end of gateway
    [DpProcDied] Process lives  (PID:184860  HANDLE:440)
    waiting for termination of gateway ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=493
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Dec 13 08:28:05 2010
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process died  (PID:184860  HANDLE:440)
    wait for end of icman
    [DpProcDied] Process lives  (PID:190124  HANDLE:448)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=493
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Dec 13 08:28:06 2010
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:190124  HANDLE:448)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=493
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Dec 13 08:28:07 2010
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:190124  HANDLE:448)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=493
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Dec 13 08:28:08 2010
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:190124  HANDLE:448)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=493
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Dec 13 08:28:09 2010
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process died  (PID:190124  HANDLE:448)
    [DpProcDied] Process died  (PID:200040  HANDLE:424)
    DpStartStopMsg: send stop message (myname is >q4de3gsy203_BI7_00                      <)
    AdGetSelfIdentRecord: >                                                                           <
    AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 4 (AD_STARTSTOP), ser 0, ex 0, errno 0
    DpConvertRequest: net size = 189 bytes
    NiBufSend starting
    NiIWrite: hdl 3 sent data (wrt=562,pac=1,MESG_IO)
    MsINiWrite: sent 562 bytes
    send msg (len 110+452) to name                    -, type 4, key -
    DpStartStopMsg: stop msg sent
    NiIRead: hdl 3 received data (rcd=274,pac=1,MESG_IO)
    server
    NiIRead: hdl 3 recv would block (errno=EAGAIN)
    NiIRead: read for hdl 3 timed out (0ms)
    DpHalt: no more messages from the message server
    DpHalt: send keepalive to synchronize with the message server
    NiBufReceive starting
    MsINiRead: received 114 bytes
    MSG received, len 110+4, flag 3, from MSG_SERVER          , typ 0, key -
    Received 4 bytes from MSG_SERVER                             
    Received opcode MS_NOOP from msg_server, reply MSOP_OK
    MsOpReceive: ok
    MsSendKeepalive : keepalive sent to message server
    NiIRead: hdl 3 recv would block (errno=EAGAIN)
    Mon Dec 13 08:28:10 2010
    NiIPeek: peek for hdl 3 timed out (r; 1000ms)
    NiIRead: read for hdl 3 timed out (1000ms)
    DpHalt: no more messages from the message server
    DpHalt: sync with message server o.k.
    detach from message server
    ***LOG Q0M=> DpMsDetach, ms_detach () [dpxxdisp.c   13043]
    NiBufSend starting
    NiIWrite: hdl 3 sent data (wrt=110,pac=1,MESG_IO)
    MsINiWrite: sent 110 bytes
    MsIDetach: send logout to msg_server
    MsIDetach: call exit function
    DpMsShutdownHook called
    NiBufISelUpdate: new MODE -- (r-) for hdl 3 in set0
    SiSelNSet: set events of sock 368 to: ---
    NiBufISelRemove: remove hdl 3 from set0
    SiSelNRemove: removed sock 368 (pos=3)
    SiSelNRemove: removed sock 368
    NiSelIRemove: removed hdl 3
    MBUF state OFF
    AdGetSelfIdentRecord: >                                                                           <
    AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
    blks_in_queue/wp_ca_blk_no/wp_max_no = 1/300/13
    LOCK WP ca_blk 1
    make DISP owner of wp_ca_blk 1
    DpSemRq: key: 2, units: 1, timeout: -1
    DpSemRel: key: 2, units: 1
    DpRqPutIntoQueue: put request into queue (reqtype 1, prio LOW, rq_id 15)
    MBUF component DOWN
    NiICloseHandle: shutdown and close hdl 3 / sock 368
    NiBufIClose: clear extension for hdl 3
    MsIDetach: detach MS-system
    cleanup EM
    EsCleanup ....
    EmCleanup() -> 0
    Es2Cleanup: Cleanup ES2
    ***LOG Q05=> DpHalt, DPStop ( 199004) [dpxxdisp.c   11230]
    Good Bye .....
    Please revert if you need more information.
    Regards,
    Prasad Shetty

    HI Juan,
    trace file for dev_w0 as asked
    C  Starting user session: OCISessionBegin(con_hdl=0, usr=SAPSR3/<pwd>, svchp=0000000013FB7748, srvhp=0000000013FB9B78, usrhp=0000000013EA1EC8)
    C  Now 'SAPSR3/<pwd>@BI7' is connected: con_hdl=0, nls_hdl=0, session_id=65.
    C  Database NLS settings: AMERICAN_AMERICA.UTF8
    C  DB instance BI7 is running on Q4DE3GSY203 with ORACLE version 10.2.0.2.0 since DEC 13, 2010, 08:38:55
    B  Connection 0 opened (DBSL handle 0)
    B  Wp  Hdl ConName                        ConId     ConState     TX  HC  PRM RCT FRC TIM MAX OPT Date     Time   DBHost                       
    B  000 000 R/3                            000000000 ACTIVE       NO  NO  YES NO  NO  000 255 255 20101213 083926 Q4DE3GSY203                  
    C  build_stmt: reallocating stmt buffer: 256 -> 2000 characters
    M  db_connect o.k.
    M  ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip,.uue,.bz2,.iso,.sda,.sar,.gif,*.png

    I Mon Dec 13 08:40:14 2010
    I  MtxInit: 0 0 0
    M  SHM_PRES_BUF               (addr: 0000000015860050, size: 4400000)
    M  SHM_ROLL_AREA          (addr: 000007FFEA010050, size: 61440000)
    M  SHM_PAGING_AREA          (addr: 0000000015CA0050, size: 32768000)
    M  SHM_ROLL_ADM               (addr: 0000000017BF0050, size: 633840)
    M  SHM_PAGING_ADM          (addr: 0000000017C90050, size: 525344)
    M  ThCreateNoBuffer          allocated 544152 bytes for 1000 entries at 0000000017D20050
    M  ThCreateNoBuffer          index size: 3000 elems
    M  ThCreateVBAdm          allocated 12176 bytes (50 server) at 000000000B490050
    X  EmInit: MmSetImplementation( 2 ).
    X  MM global diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation view
    X  ES initialized.
    X  mm.dump: set maximum dump mem to 96 MB
    M  Deactivate statistics hyper index locking
    B  dbntab: NTAB buffers attached
    B  dbntab: Buffer FTAB(hash header)  (addr: 0000000017E400E0, size: 584)
    B  dbntab: Buffer FTAB(anchor array) (addr: 0000000017E40330, size: 320072)
    B  dbntab: Buffer FTAB(item array)   (addr: 0000000017E8E580, size: 1280000)
    B  dbntab: Buffer FTAB(data area)    (addr: 0000000017FC6D80, size: 30720000)
    B  dbntab: Buffer IREC(hash header)  (addr: 0000000019D200E0, size: 584)
    B  dbntab: Buffer IREC(anchor array) (addr: 0000000019D20330, size: 320072)
    B  dbntab: Buffer IREC(item array)   (addr: 0000000019D6E580, size: 320000)
    B  dbntab: Buffer IREC(data area)    (addr: 0000000019DBC780, size: 6144000)
    B  dbntab: Buffer STAB(hash header)  (addr: 000000001A3A00E0, size: 584)
    B  dbntab: Buffer STAB(anchor array) (addr: 000000001A3A0330, size: 320072)
    B  dbntab: Buffer STAB(item array)   (addr: 000000001A3EE580, size: 320000)
    B  dbntab: Buffer STAB(data area)    (addr: 000000001A43C780, size: 3072000)
    B  dbntab: Buffer TTAB(hash header)  (addr: 000000001A7300E0, size: 1944)
    B  dbntab: Buffer TTAB(anchor array) (addr: 000000001A730880, size: 320072)
    B  dbntab: Buffer TTAB(item array)   (addr: 000000001A77EAD0, size: 800000)
    B  dbntab: Buffer TTAB(data area)    (addr: 000000001A841FD0, size: 5840000)
    B  db_con_shm_ini:  WP_ID = 0, WP_CNT = 13, CON_ID = -1
    B  dbstat: TABSTAT buffer attached (addr: 000000001ADE9FB0)
    B  dbtbxbuf: Buffer TABL  (addr: 000000001D7D0160, size: 30000000, end: 000000001F46C4E0)
    B  dbtbxbuf: Buffer TABLP (addr: 000000001F470160, size: 10240000, end: 000000001FE34160)
    B  dbexpbuf: Buffer EIBUF (addr: 000000001FE40170, size: 4194304, end: 0000000020240170)
    B  dbexpbuf: Buffer ESM   (addr: 0000000020250170, size: 4194304, end: 0000000020650170)
    B  dbexpbuf: Buffer CUA   (addr: 0000000020660170, size: 3072000, end: 000000002094E170)
    B  dbexpbuf: Buffer OTR   (addr: 0000000020950170, size: 4194304, end: 0000000020D50170)
    B  dbcalbuf: Buffer CALE  (addr: 0000000020D60050, size: 500000, end: 0000000020DDA170)
    M  CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
    S  *** init spool environment
    S  TSPEVJOB updates inside critical section: event_update_nocsec = 0
    S  initialize debug system
    T  Stack direction is downwards.
    T  debug control: prepare exclude for printer trace
    T  new memory block 00000000141756E0
    S  spool kernel/ddic check: Ok
    S  using table TSP02FX for frontend printing
    S  1 spool work process(es) found
    S  frontend print via spool service enabled
    S  printer list size is 150
    S  printer type list size is 50
    S  queue size (profile)   = 300
    S  hostspool list size = 3000
    S  option list size is 30
    S      intervals: query=50, rescan=1800, global=300 info=120
    S      processing queue enabled
    S  creating spool memory service RSPO-RCLOCKS at 000000002A0700D0
    S  doing lock recovery
    S  setting server cache root
    S  using server cache size 100 (prof=100)
    S  creating spool memory service RSPO-SERVERCACHE at 000000002A0704F0
    S    using messages for server info
    B  dbtran INFO (init_connection '<DEFAULT>' [ORACLE:700.08]):
    B   max_blocking_factor =   5,  max_in_blocking_factor      =   5,
    B   min_blocking_factor =   5,  min_in_blocking_factor      =   5,
    B   prefer_union_all    =   0,  prefer_join                 =   0,
    B   prefer_fix_blocking =   0,  prefer_in_itab_opt          =   1,
    B   convert AVG         =   0,  alias table FUPD            =   0,
    B   escape_as_literal   =   1,  opt GE LE to BETWEEN        =   0,
    B   select *            =0x0f,  character encoding          = STD / <none>:-,
    B   use_hints           = abap->1, dbif->0x1, upto->2147483647, rule_in->0,
    B                         rule_fae->0, concat_fae->0, concat_fae_or->0

    S Mon Dec 13 08:40:15 2010
    S  size of spec char cache entry: 297032 bytes (timeout 100 sec)
    S  size of open spool request entry: 2512 bytes
    S  immediate print option for implicitely closed spool requests is disabled
    A  **GENER Trace switched on ***

    A  -PXA--
    A  PXA INITIALIZATION
    A  PXA: Locked PXA-Semaphore.
    A  System page size: 4kb, total admin_size: 20564kb, dir_size: 20472kb.
    A  Attached to PXA (address 000007FFEDAB0050, size 300000K)
    A  abap/pxa = shared protect gen_remote
    A  PXA INITIALIZATION FINISHED
    A  -PXA--

    A  ABAP ShmAdm attached (addr=000007FF4FEEA000 leng=20955136 end=000007FF512E6000)
    A  >> Shm MMADM area (addr=000007FF50392E80 leng=247168 end=000007FF503CF400)
    A  >> Shm MMDAT area (addr=000007FF503D0000 leng=15818752 end=000007FF512E6000)
    A  RFC Destination> destination q4de3gsy203_BI7_00 host q4de3gsy203 system BI7 systnr 0 (q4de3gsy203_BI7_00)
    A  RFC Options> H=q4de3gsy203,S=00,d=2,
    A  RFC FRFC> fallback activ but this is not a central instance.
    A   
    A  RFC rfc/signon_error_log = -1
    A  RFC rfc/dump_connection_info = 0
    A  RFC rfc/dump_client_info = 0
    A  RFC rfc/cp_convert/ignore_error = 1
    A  RFC rfc/cp_convert/conversion_char = 23
    A  RFC rfc/wan_compress/threshold = 251
    A  RFC rfc/recorder_pcs not set, use defaule value: 2
    A  RFC rfc/delta_trc_level not set, use default value: 0
    A  RFC rfc/no_uuid_check not set, use default value: 0
    A  RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
    A  RFC Method> initialize RemObjDriver for ABAP Objects
    M  ThrCreateShObjects          allocated 27042 bytes at 000000002A9E0050

    N Mon Dec 13 08:40:16 2010
    N  SsfSapSecin: putenv(SECUDIR=D:\usr\sap\BI7\DVEBMGS00\sec): ok

    N  =================================================
    N  === SSF INITIALIZATION:
    N  ===...SSF Security Toolkit name SAPSECULIB .
    N  ===...SSF trace level is 0 .
    N  ===...SSF library is D:\usr\sap\BI7\DVEBMGS00\exe\sapsecu.dll .
    N  ===...SSF hash algorithm is SHA1 .
    N  ===...SSF symmetric encryption algorithm is DES-CBC .
    N  ===...sucessfully completed.
    N  =================================================

    N Mon Dec 13 08:40:17 2010
    N  MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
    N  MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
    M  JrfcVmcRegisterNativesDriver o.k.
    W  =================================================
    W  === ipl_Init() called
    W    ITS Plugin: Path dw_gui
    W    ITS Plugin: Description ITS Plugin - ITS rendering DLL
    W    ITS Plugin: sizeof(SAP_UC) 2
    W    ITS Plugin: Release: 700, [7000.0.254.20050900]
    W    ITS Plugin: Int.version, [33]
    W    ITS Plugin: Feature set: [22]
    W    ===... Calling itsp_Init in external dll ===>
    W  === ipl_Init() returns 0, ITSPE_OK: OK
    W  =================================================
    N  VSI: WP init in ABAP VM completed with rc=0
    E  Profile-Parameter: enque/deque_wait_answer = FALSE
    E  Profile-Parameter: enque/sync_dequeall = 0
    E  Replication is disabled
    E  EnqCcInitialize: local lock table initialization o.k.
    E  EnqId_SuppressIpc: local EnqId initialization o.k.
    E  EnqCcInitialize: local enqueue client init o.k.

    S Mon Dec 13 08:40:19 2010
    S  found spool memory service RSPO-ACTIONS at 000000002A07A230

    A Mon Dec 13 08:40:20 2010
    A  **GENER Trace switched off ***
    M  SosICreateNewAnchorArray: sos_search_anchor_semantics = 1

    C Mon Dec 13 08:40:21 2010
    C  build_stmt: reallocating stmt buffer: 2000 -> 3002 characters
    B  table logging switched on for client '800'

    M Mon Dec 13 08:40:23 2010
    M  SecAudit(RsauShmInit): WP attached to existing shared memory.
    M  SecAudit(RsauShmInit): addr of SCSA........... = 000000000AFC0050
    M  SecAudit(RsauShmInit): addr of RSAUSHM........ = 000000000AFC07C0
    M  SecAudit(RsauShmInit): addr of RSAUSLOTINFO... = 000000000AFC0800
    M  SecAudit(RsauShmInit): addr of RSAUSLOTS...... = 000000000AFC080C
    M  rdisp/rb_cleaned_rfc = 0

    M Mon Dec 13 08:40:27 2010
    M  Deactivate ASTAT hyper index locking

    M Mon Dec 13 08:44:30 2010

    M  *****************************************************************************
    M  *
    M  *  LOCATION    SAP-Gateway on host q4de3gsy203 / sapgw00
    M  *  ERROR       program dbmrfc@sapdb not registered
    M  *
    M  *  TIME        Mon Dec 13 08:44:30 2010
    M  *  RELEASE     700
    M  *  COMPONENT   SAP-Gateway
    M  *  VERSION     2
    M  *  RC          679
    M  *  MODULE      gwr3cpic.c
    M  *  LINE        1835
    M  *  DETAIL      TP dbmrfc@sapdb not registered
    M  *  COUNTER     15
    M  *
    M  *****************************************************************************

    A  RFC 1485  CONVID 21905907
    A   * CMRC=2 DATA=0 STATUS=0 SAPRC=679 ThSAPOCMINIT
    A  RFC> ABAP Programm: SAPLSADC (Transaction: )
    A  RFC> User: RANGUPTA (Client: 001)
    A  RFC> Destination: SAPDB_DBM_DAEMON (handle: 2, , )
    A  RFC SERVER> RFC Server Session (handle: 1, 21904860, {D18C06E0-7859-F141-92A8-005056956B4B})
    A  RFC SERVER> Caller host:
    A  RFC SERVER> Caller transaction code:  (Caller Program: SAPLSADC)
    A  RFC SERVER> Called function module: DBM_CONNECT_PUR
    A  TH VERBOSE LEVEL FULL
    A  ** RABAX: end RX_GET_MESSAGE

    M Mon Dec 13 08:45:54 2010

    M  *****************************************************************************
    M  *
    M  *  LOCATION    SAP-Gateway on host q4de3gsy203 / sapgw00
    M  *  ERROR       program dbmrfc@sapdb not registered
    M  *
    M  *  TIME        Mon Dec 13 08:45:54 2010
    M  *  RELEASE     700
    M  *  COMPONENT   SAP-Gateway
    M  *  VERSION     2
    M  *  RC          679
    M  *  MODULE      gwr3cpic.c
    M  *  LINE        1835
    M  *  DETAIL      TP dbmrfc@sapdb not registered
    M  *  COUNTER     30
    M  *
    M  *****************************************************************************

    A  RFC 1485  CONVID 21998657
    A   * CMRC=2 DATA=0 STATUS=0 SAPRC=679 ThSAPOCMINIT
    A  RFC> ABAP Programm: SAPLSADC (Transaction: )
    A  RFC> User: RANGUPTA (Client: 001)
    A  RFC> Destination: SAPDB_DBM_DAEMON (handle: 2, , )
    A  RFC SERVER> RFC Server Session (handle: 1, 21997642, {038D06E0-8E49-F147-92A8-005056956B4B})
    A  RFC SERVER> Caller host:
    A  RFC SERVER> Caller transaction code:  (Caller Program: SAPLSADC)
    A  RFC SERVER> Called function module: DBM_CONNECT_PUR
    A  TH VERBOSE LEVEL FULL
    A  ** RABAX: end RX_GET_MESSAGE

    M Mon Dec 13 08:48:12 2010

    M  *****************************************************************************
    M  *
    M  *  LOCATION    SAP-Gateway on host q4de3gsy203 / sapgw00
    M  *  ERROR       program dbmrfc@sapdb not registered
    M  *
    M  *  TIME        Mon Dec 13 08:48:12 2010
    M  *  RELEASE     700
    M  *  COMPONENT   SAP-Gateway
    M  *  VERSION     2
    M  *  RC          679
    M  *  MODULE      gwr3cpic.c
    M  *  LINE        1835
    M  *  DETAIL      TP dbmrfc@sapdb not registered
    M  *  COUNTER     45
    M  *
    M  *****************************************************************************

    A  RFC 1485  CONVID 22146986
    A   * CMRC=2 DATA=0 STATUS=0 SAPRC=679 ThSAPOCMINIT
    A  RFC> ABAP Programm: SAPLSADC (Transaction: )
    A  RFC> User: RANGUPTA (Client: 001)
    A  RFC> Destination: SAPDB_DBM_DAEMON (handle: 2, , )
    A  RFC SERVER> RFC Server Session (handle: 1, 22145986, {558D06E0-45BF-F199-92A8-005056956B4B})
    A  RFC SERVER> Caller host:
    A  RFC SERVER> Caller transaction code:  (Caller Program: SAPLSADC)
    A  RFC SERVER> Called function module: DBM_CONNECT_PUR
    A  TH VERBOSE LEVEL FULL
    A  ** RABAX: end RX_GET_MESSAGE

    M Mon Dec 13 08:49:33 2010

    M  *****************************************************************************
    M  *
    M  *  LOCATION    SAP-Gateway on host q4de3gsy203 / sapgw00
    M  *  ERROR       program dbmrfc@sapdb not registered
    M  *
    M  *  TIME        Mon Dec 13 08:49:33 2010
    M  *  RELEASE     700
    M  *  COMPONENT   SAP-Gateway
    M  *  VERSION     2
    M  *  RC          679
    M  *  MODULE      gwr3cpic.c
    M  *  LINE        1835
    M  *  DETAIL      TP dbmrfc@sapdb not registered
    M  *  COUNTER     60
    M  *
    M  *****************************************************************************
    It is a bit large will this do ?
    Regards,
    Prasad

  • How to delay a long running tasks start until display is updated?

    I am having a problem in that a progress bar I want to use to show progress of a long running background process is not showing up for a long time (up to 10 seconds) after the long running process is started. This is in an AIR application and the background process is an external native process, so once it is launched the UI thread is free to run, but the launch of the process can take time.
    Below is the current state of the relevant code.
    In addition to the current format I have also tried using the CREATION_COMPLETE, EXIT_FRAME and RENDER events with the same results.
    If I up the value in setTimeout to 500ms the progress bar displays quickly, but I would prefer to not delay the launch of the background process for no reason.
    If I comment out the loadPorject call the progress bar is displayed instantly.
    Any help is appreciated.
    private function continueLoad(evt:Event):void
         // We are about to start some potentially long running process
         CursorManager.setBusyCursor();
         curPopup = new SyncProgress();
         curPopup.addEventListener(Event.ENTER_FRAME, popupLoadedHandler);
         PopUpManager.addPopUp(curPopup, parentView, true);
         PopUpManager.centerPopUp(curPopup);
         curPopup.stage.invalidate();
    private function popupLoadedHandler(event:Event):void
         curPopup.removeEventListener(Event.ENTER_FRAME, popupLoadedHandler);
         setTimeout(function():void{syncManager.loadProject(mainViewModel.selectedUserItem.id,proj ectFile.nativePath,overwrite);},0);

    DBMS_SCHEDULER is very powerful and can be a bit unwieldy. I tend to use DBMS_SCHEDULER for jobs which are purely 'in the database' i.e. not specifically APEX-related - in addition, I find it's better for stuff that needs to be run regularly without human intervention (some sort of refresh process, daily cleanup etc).
    If you are intending to run this process from APEX as a pseudo "on demand" process (i.e. generated by a user request) and have quite simple requirements (e.g. there's no dependencies on other jobs), it might be worth checking out the apex scheduling API - namely the package APEX_PLSQL_JOB:
    http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/apex_plsql_job.htm#BGBCJIJI
    It generates a unique job number which you can use to reference its progress - plus it's much simpler to use.
    p.s. using DBMS_SCHEDULER, yes the job name has to be unique but you can generate one by either using a sequence or data not likely to be repeated, like the current timestamp.

  • Long running table partitioning job

    Dear HANA grus,
    I've just finished table partitioning jobs for CDPOS(change document item) with 4 partitions by hash with 3 columns.
    Total data volumn is around 340GB and the table size was 32GB !!!!!
    (migration job was done without disabling CD, so currently deleting data on the table with RSCDOK99)
    Before partitioning, the data volumn of the table was around 32GB.
    After partitioning, the size has changed to 25GB.
    It took around One and half hour with exclusive lock as mentioned in the HANA adminitration guide.
    (It is QA DB, so less complaints)
    I thought that I might not can do this in the production DB.
    Does anyone hava any idea for accelerating this task?? (This is the fastest DBMS HANA!!!!)
    Or Do you have any plan for online table partitioning functionality??(To HANA Development team)
    Any comments would be appreciate.
    Cheers,
    - Jason

    Jason,
    looks like we're cross talking here...
    What was your rationale to partition the table in the first place?
           => To reduce deleting time of CDPOS            (As I mentioned it was almost 10% quantity of whole Data volume, So I would like to save deleting time of the table from any pros of partitioning table like partitioning pruning)
    Ok, I see where you're coming from, but did you ever try out if your idea would actually work?
    As deletion of data is heavily related with locating the records to be deleted, creating an index would have probably be the better choice.
    Thinking about it... you want to get rid of 10% of your data and in order to speed the overall process up, you decide to move 100% of the data into sets of 25% of the data - equally holding their 25% share of the 10% records to be deleted.
    The deletion then should run along these 4 sets of 25% of data.
    It's surely me, but where is the speedup potential here?
    How many unloads happened during the re-partitioning?
           => It was fully uploaded in the memory before partitioning the table by myself.(from HANA studio)
    I was actually asking about unloads _during_ the re-partitioning process. Check M_CS_UNLOADS for the time frame in question.
    How do the now longer running SQL statements look like?
           => As i mentioned selecting/deleting increased almost twice.
    That's not what I asked.
    Post the SQL statement text that was taking longer.
    What are the three columns you picked for partitioning?
           => mandant, objectclas, tabname(QA has 2 clients and each of them have nearly same rows of the table)
    Why those? Because these are the primary key?
    I wouldn't be surprised if the SQL statements only refer to e.g. MANDT and TABNAME in the WHERE clause.
    In that case the partition pruning cannot work and all partitions have to be searched.
    How did you come up with 4 partitions? Why not 13, 72 or 213?
           => I thought each partitions' size would be 8GB(32GB/4) if they are divided into same size(just simple thought), and 8GB size is almost same size like other largest top20 tables in the HANA DB.
    Alright, so basically that was arbitrary.
    For the last comment of your reply, most people would do partition for their existing large tables to get any benefit of partitioning(just like me). I think your comment can be applied for the newly inserting data.
    Well, not sure what "most people" would do.
    HASH partitioning a large existing table certainly is not an activity that is just triggered off in a production system. Adding partitions to a range partitions table however happens all the time.
    - Lars

  • Explain for a very long running query

    Dear gurus,
    I have an issue with a long running query which takes around 2 hrs to execute. The tables being used here pertains to 11i, so there is no scope of indexing.
    SELECT peia.expenditure_item_id, DECODE (peia.system_linkage_function, 'ST', 'TIME', 'EXP' ) AS CATEGORY,
    pea.incurred_by_person_id AS employee_id, emp.attribute6 AS q_number, NVL (emp.employee_number, npw_number) AS employee_number, emp.full_name AS employee_name, peia.project_id,
    ppa.segment1, ppa.NAME, func_get_proj_attribute (peia.project_id, NULL, 'PROJECT ENTITY NAME' ) AS project_entity,
    func_get_proj_attribute (peia.project_id, NULL, 'PROJECT MANAGER') AS project_manager,
    DECODE (ppa.distribution_rule, 'WORK/WORK', 'TM', 'WORK/EVENT', 'TM with Milestone' ) AS project_classification,
    ppa.project_type AS funding_type, func_get_proj_attribute(peia.project_id, NULL, 'CUSTOMER GROUP' ) AS customer_group,
    func_get_proj_attribute(peia.project_id, NULL, 'ACCOUNT MANAGER' ) AS account_manager,
    pt.top_task_id, func_get_task_attribute(pt.top_task_id, 'TASK NUMBER' ) AS task_number,
    func_get_task_attribute (pt.top_task_id, 'TASK NAME' ) AS task_name, peia.expenditure_item_date, peia.projfunc_raw_revenue AS func_raw_revenue,
    peia.accrued_revenue AS func_accrued_revenue, peia.projfunc_currency_code,
    DECODE (peia.project_raw_revenue, NULL,
    DECODE (peia.system_linkage_function, 'ST', peia.quantity* NVL (peia.bill_rate, func_get_emp_billrate (pea.incurred_by_person_id, peia.project_id, peia.task_id,
    peia.expenditure_item_date )
    peia.quantity
    peia.project_raw_revenue
    ( peia.accrued_revenue
    / peia.projfunc_raw_revenue
    * peia.project_raw_revenue
    ) AS project_accrued_revenue,
    ppa.project_currency_code,
    NVL(peia.bill_rate, func_get_emp_billrate (pea.incurred_by_person_id, peia.project_id, peia.task_id, peia.expenditure_item_date)
    ) AS bill_rate,
    peia.rev_dist_rejection_code, SYSDATE AS generated_date
    FROM pa_expenditures_all pea
    INNER JOIN (SELECT * FROM per_all_people_f WHERE SYSDATE BETWEEN effective_start_date AND effective_end_date) emp ON NVL(pea.incurred_by_person_id, 61) =emp.person_id
    INNER JOIN (SELECT * FROM pa_expenditure_items_all WHERE billable_flag = 'Y' AND quantity <> 0) peia ON pea.expenditure_id =peia.expenditure_id
    INNER JOIN (SELECT * FROM pa_projects_all WHERE project_status_code = 'APPROVED' AND distribution_rule IN ('WORK/WORK', 'WORK/EVENT')) ppa ON peia.project_id =ppa.project_id
    INNER JOIN pa_tasks pt ON peia.task_id = pt.task_id;
    The explain plan for this is:
    SELECT STATEMENT CHOOSECost: 26,758 Bytes: 53,373,971 Cardinality: 245,963                          
         9 HASH JOIN Cost: 26,758 Bytes: 53,373,971 Cardinality: 245,963                     
              1 TABLE ACCESS FULL TABLE HR.PER_ALL_PEOPLE_F Cost: 67 Bytes: 546,900 Cardinality: 9,115                
              8 HASH JOIN Cost: 26,581 Bytes: 20,174,029 Cardinality: 128,497                
                   2 TABLE ACCESS FULL TABLE PA.PA_TASKS Cost: 596 Bytes: 856,370 Cardinality: 85,637           
                   7 HASH JOIN Cost: 25,691 Bytes: 18,889,059 Cardinality: 128,497           
                        3 TABLE ACCESS FULL TABLE PA.PA_EXPENDITURES_ALL Cost: 1,524 Bytes: 5,220,330 Cardinality: 522,033      
                        6 HASH JOIN Cost: 23,701 Bytes: 17,604,089 Cardinality: 128,497      
                             4 TABLE ACCESS FULL TABLE PA.PA_PROJECTS_ALL Cost: 91 Bytes: 49,059 Cardinality: 621
                             5 TABLE ACCESS FULL TABLE PA.PA_EXPENDITURE_ITEMS_ALL Cost: 23,575 Bytes: 68,913,570 Cardinality: 1,188,165
    Can anyone suggests what can be done to improve this query?
    Thanks in advance
    SA
    Edited by: user593719 on Oct 5, 2010 10:29 AM
    Edited by: user593719 on Oct 5, 2010 10:30 AM

    1) Your inner joins are doing record selections that could be done on the Join's ON clause.
    2) Look at your functions to see if you can get performance improvements using parameterized CURSORs & adding DETERMINISTIC to the definition.
    3) Consider using WITH to first pull your data & then running your functions.
    For example:
    with
    smiths as (
    select *
    from hr.per_all_people_f papf
    where papf.first_name='Smith'
    select *
    from smiths
    where trunc(sysdate) between effective_start_date and effective_end_date;
    In general, pare down your data first. Whatever will restrict your data most, start with selecting that table/view.

  • Long running threads.

    Hello everyone,
    Thanks for your interest in this post. I have a design question on a feature we are currently working on - I have described it below as best as I can. I would be thankful for any direction or guidance from all the good and experienced folks here in this forum :)
    We have a system which receives some input data (say in the form of files or a db update) from external sources. We have a job which wakes up periodically, checks for the presence of new data and then does some parsing/data manipulation. I have posted it below and for the sake of brevity and conciseness kept it simple.
    public class Work{  
        private SomeVar _var;  
        //constructor here  
        public void doWork(){  
             //run job  
    }  Note we have multiple kind of input (so multiple Work classes each of which have different parse logic).
    So far so good.
    We have jdk 1.4 (no java.util.concurrent) and we dont have an option to use a scheduling f/w like quartz
    Its simple enough and we dont have a need for Listeners, dynamic scheduling etc.
    That leaves us with 2 options to implement this
    Option 1
    Create a thread for each kind of job on startup.
    Each thread checks for presence of input data and creates a Work object to process the job.
    public class WorkThread extends Thread{//some common functionality here}
    public class SpecificWorkThread extends WorkThread{  
           private MetaInfo _meta;  
           //constructor  
           public void run(){  
              while(true){  
                    //check for presence of input data  
                    Work _w = new Work();  
                    _w.doWork();  
                    //sleep for some time  
    pulic class Controller{
          psv main(String args[]){
         //for each job{
                 WorkThread t = new SpecificWorkThread();
                 t.start();
             //join on all threads
    }  As you can see this would create (from the main), a long running thread for each job type
    Option 2
    Have the input data check in the controller clas. When there is input data to parse, create a Thread which does the parsing.
    The thread in its run method parses and comes out. So for each parse cycle, a short lived thread is created, somthing like below
    public class WorkController{  
           psv main(String args[]){  
                   while(true){  
                      //check for input condition  
                      new SpecificWorkThread(new Work()).start();  
                     //sleep for sometime  
              public class SpecificWorkThread extends Thread{  
                  private Work _work;  
                  //constructor  
                  public void run(){  
                        _work.doWork();  
            The difference between the two is that while the first creates long running threads per job type, in option(2) a thread is created on demand. Each thread is short lived (it does its job and dies), but then a thread needs to be created every time for a job.
    Both would work and work correctly. What I would like to understand is if the options presented above just a programmer's prefence or is one option better than the other (performance, memory considerations) etc?
    Thanks for your patience in reading this post.
    cheers,
    ram.

    Generally creating a new thread is an expensive process. Well, everything is relative. My laptop can create & run & stop 7,000+ threads per second, test program below, YMMV. If you are dealing with thousands of thread creations per second, pooling may be sensible; if not, premature optimization is the root of all evil, etc.
    public class ThreadSpeed
        public static void main(String args[])
         throws Exception
            System.out.println("Ignore the first few timings.");
            System.out.println("They may include Hotspot compilation time.");
            System.out.println("I hope you are running me with \"java -server\"!");
         for (int n = 0; n < 5; n++)
             doit();
            System.out.println("Did you run me with \"java -server\"?  You should!");
        public static void doit()
         throws Exception
            long start = System.currentTimeMillis();
            for (int n = 0; n < 10000; n++) {
             Thread thread = new Thread(new MyRunnable());
             thread.start();
             thread.join();
            long end = System.currentTimeMillis();
            System.out.println("thread time " + (end - start) + " ms");
        static class MyRunnable
         implements Runnable
         public void run()
    }Edited by: sjasja on Jan 14, 2010 2:20 AM

  • Script to kill long running reports in OBIEE

    Hi
    I have requirement to kill long running reports . I am using OBIEE version 10.1.3.4.0 which has a bug where it is not taking query limits governor and the reports are not getting killed if i am setting that parameter in RPD.
    Oracle support has advised me to upgrade to next version, but for now, i cannot upgrade.
    Can anyone suggest me script to run on obiee app server that can kill long running reports on obiee and database server.
    I have AIX server and all reports run on database with same functional ID that is being used for ETL as well to Analytics database.

    Shikhs17 wrote:
    Hi
    I have requirement to kill long running reports . I am using OBIEE version 10.1.3.4.0 which has a bug where it is not taking query limits governor and the reports are not getting killed if i am setting that parameter in RPD.
    Oracle support has advised me to upgrade to next version, but for now, i cannot upgrade.
    Can anyone suggest me script to run on obiee app server that can kill long running reports on obiee and database server.
    I have AIX server and all reports run on database with same functional ID that is being used for ETL as well to Analytics database.Do you want to enforce the limitation on the database to automatically kill running sessions that run over specific period of time?

Maybe you are looking for

  • System registered in SLD invisible in solution manager configuration

    Hi I have installed Solution Manager EHP1 / Oracle 10g / Win2003 on a VM. I  ran into a issue in the Managed system configuration. The first step in the maanaged system configuration would help us select the satelllite systems which and configured in

  • Office 2010 & LiveCycleDesigner ES 8.2

    I have discovered LiveCycle ES 8.2 is not compatible with Office 2010.  When importing a Word Document into LiveCycle, I receive an error message stating "Word (version XP or onwards) could not be found of the machine".  I clearly have Word on my mac

  • Classpath for remote client

    Hi, Is there a minimum package of classes (.jar, .zip) that are required for remote client application to call EJBs in WL 5.1 container ? My remote application works fine if I include WL_HOME/classes in its classpath. The problem is that WL_HOME/clas

  • How to make client side validations using NWDS

    Hi Frndz..                Am creating UIs using NWDS ,i made tthe validations @ servr side n i have 2 made this validations @ clinet side ,but am not aware how it is???? can anyone help me in this regard. THANKS & REGARDS Rajesh Kumar

  • Arrranging two displays, iBook G4

    Hi all, I want to use my iBook with an external Philips CRT monitor, but Arrange both screens using Display Preferences, i.e. for InDesign CS2, so that the work area of the document is on one screen and the palets on the other. I think I need a graph