DBMS_RESULT_CACHE status

Hi,
Any difference between DBMS_RESULT_CACHE set to Bypass or Disabled?
Thanks

Hi rac100g,
I think what Aman said is right. Because, while disabled it doesnot contain any memory and the cache_size becomes zero. But , while using the Bypass option it contains the old data, but it will not be used and stops writing new data.
Even we can resume back from result cache while using bypass feature, by using below command.
exec DBMS_RESULT_CACHE.BYPASS(FALSE);
And if we want the data to be flushed from result cache then we use the below command.
BEGIN
DBMS_RESULT_CACHE.BYPASS(TRUE);
DBMS_RESULT_CACHE.FLUSH;
END;
Thanks,
Balaji K.

Similar Messages

  • Is result_cache working in Oracle 11.1.0.6.0?

    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for Solaris: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SQL> SELECT dbms_result_cache.status() FROM dual;
    DBMS_RESULT_CACHE.STATUS()
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------ENABLED
    12:31:08 SQL> set autotrace on
    select count(*) from objs;
    12:31:27 SQL>
    COUNT(*)
    69918
    Elapsed: 00:00:01.72
    Execution Plan
    Plan hash value: 386529197
    | Id | Operation | Name | Rows | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 289 (1)| 00:00:04 |
    | 1 | SORT AGGREGATE | | 1 | | |
    | 2 | TABLE ACCESS FULL| OBJS | 80773 | 289 (1)| 00:00:04 |
    Note
    - dynamic sampling used for this statement
    Statistics
    282 recursive calls
    0 db block gets
    1140 consistent gets
    1038 physical reads
    0 redo size
    524 bytes sent via SQL*Net to client
    524 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    5 sorts (memory)
    0 sorts (disk)
    1 rows processed
    12:31:49 SQL> select /*+ result_cache */ count(*) from objs;
    COUNT(*)
    69918
    Elapsed: 00:00:00.03
    Execution Plan
    Plan hash value: 386529197
    | Id | Operation | Name | Rows | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 289 (1)| 00:00:04 |
    | 1 | RESULT CACHE | cnsc9rw3p17364cbg4975pad6y | | | |
    | 2 | SORT AGGREGATE | | 1 | | |
    | 3 | TABLE ACCESS FULL| OBJS | 80773 | 289 (1)| 00:00:04 |
    Result Cache Information (identified by operation id):
    1 - column-count=1; dependencies=(CTSGKOD.OBJS); attributes=(single-row); name="select /*+ result_cache */ count(*) from objs"
    Note
    - dynamic sampling used for this statement
    Statistics
    4 recursive calls
    0 db block gets
    1110 consistent gets
    0 physical reads
    0 redo size
    524 bytes sent via SQL*Net to client
    524 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed
    12:32:06 SQL>
    i see result_cache in execution plan, but why do i see 1110 consistent gets? I expected 0 in consisent gets and physical reads and the query is not executed ...
    Thank You

    Aman,
    lets say i run these statements
    1) exec dbms_result_cache.flush
    2) alter system flush shared_pool;
    3)alter system flush buffer_cache;
    Then i run the query without hint of result_cache
    4) Select count(*) from objs; --> This query is not using result cache, it is running for first time, so physical reads & consistent gets
    5) select count(*) from objs; --> again same query, this time only consistent gets
    6) select /*+ result_cache */ count(*) from objs; -- Lets introduce result_cache now
    Will the above query gets data from buffer cache or will it use result_cache and gets result from memory instead of running query? Or will this 6th statement run same as (5) and prepares ground for usage of result_cache and
    any other queries later can benefit from result_cache?
    Thanks again Aman

  • Enabling result cache

    Hi,
    I am trying to enable result cache feature at Oracle 11g R2 server. I am following the below steps but everytime the cache status is coming DISABLED. Please help me to correct it
    1. I am setting the RESULT_CACHE_MAX_SIZE and RESULT_CACHE_MODE as below. Memory_Target is 1232M, so I chose to allocate 200M for result cache.
    ALTER SYSTEM SET RESULT_CACHE_MODE=FORCE
    System altered.
    ALTER SYSTEM SET RESULT_CACHE_MAX_SIZE=200M
    System altered.2. I am restarting the database
    SHUTDOWN IMMEDIATE
    STARTUP
    3. I am querying the result cache status
    SELECT DBMS_RESULT_CACHE.STATUS FROM DUAL
    STATUS
    DISABLEDI have configured other database servers for cache and its working fine. But i am not able to sort out what is going wrong in above scripts. Please help me if i am missing out some step.
    Thanks

    select * from v$version;you need "Enterprise Edition" http://docs.oracle.com/cd/B28359_01/license.111/b28287/editions.htm
    for EE check this:
    http://psoug.org/reference/dbms_result_cache.html
    http://www.oracle.com/technetwork/articles/datawarehouse/vallath-resultcache-rac-284280.html
    http://www.oracle-developer.net/display.php?id=503

  • Result_cache

    Hi to all!
    I would like to ask about issue of result_cache setting. The doc describing result_cache setting: result_cache_mode is set to 'MANUAL' and parameter result_cache_max_size is set to 0 means the cache is disabled (correct). If we set by issuing ALTER SYSTEM statement to set RESULT_CACHE_MAX_SIZE to a nonzero value but do not restart the database, querying the value of the RESULT_CACHE_MAX_SIZE parameter returns a nonzero value even though the result cache is still disabled(this is on doubt?). The value of RESULT_CACHE_MAX_SIZE is therefore not the most reliable way to determine if the result cache is enabled. You can use the following query instead:
    SELECT dbms_result_cache.status() FROM dual;
    But if I simulated this on database 11g, after setting cache size to nonzero value I have got always from querying status 'ENABLE'. Then cache is enabled not like saying orig doc of 11g. Should someone comment it,if there is something else behind?
    Thanks, JoKo

    Hi Sven,
    I forgot to mention, I made it in SCOPE=BOTH, then persistent. But I have been showing real text from 11g's doc. And more, I have got test for 11g Advanced PL/SQL and there is the same fault telling me result cache is disabled in case when mode 'MANUAL' and size set recently to > 0 if db not restarted. Anyway, thanks a lot, JoKo.

  • Result_cache_max_sizeis 0  after enabling AMM

    I am using. Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production. After enabling AMM, the result_cache_max_size has become 0.
    SELECT dbms_result_cache.status() FROM dual; Returns "BYPASS"
    Following change was done to enable AMM.
    ALTER SYSTEM SET MEMORY_MAX_TARGET = 17000M SCOPE = SPFILE;
    ALTER SYSTEM SET MEMORY_TARGET = 17000M SCOPE = SPFILE;
    ALTER SYSTEM SET SGA_TARGET =0 SCOPE = SPFILE;
    ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0 SCOPE = SPFILE;
    ALTER SYSTEM SET SGA_MAX_SIZE = 0 SCOPE = SPFILE;"
    Note: shared_pool_size is 0.
    I want to under how result_cache_max_size became 0 after moving to AMM. Does this mean result cache feature is disabled?

    result_cache_max_size =0 means it is disabled.

  • Result Cache Oracle 11gR2

    Hi all,
    Currently I have some problems with result cache, or maybe I don't understand this feature properly.
    I'm trying to switch off the bypass mode, and I'm not able to do this:
    SQL> select dbms_result_cache.status from dual;
    STATUS
    BYPASS
    SQL> exec dbms_result_cache.bypass(FALSE);
    PL/SQL procedure successfully completed.
    SQL> select dbms_result_cache.status from dual;
    STATUS
    BYPASS
    SQL> show parameter result
    NAME TYPE VALUE
    client_result_cache_lag big integer 3000
    client_result_cache_size big integer 0
    result_cache_max_result integer 5
    result_cache_max_size big integer 0
    result_cache_mode string MANUAL
    result_cache_remote_expiration integer 0
    SQL> alter system set result_cache_max_size=2M scope=both;
    System altered.
    SQL> show parameter result
    NAME TYPE VALUE
    client_result_cache_lag big integer 3000
    client_result_cache_size big integer 0
    result_cache_max_result integer 5
    result_cache_max_size big integer 0
    result_cache_mode string MANUAL
    result_cache_remote_expiration integer 0
    SQL> alter system set result_cache_max_size=2M scope=spfile;
    System altered.
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 523108352 bytes
    Fixed Size 1337632 bytes
    Variable Size 465569504 bytes
    Database Buffers 50331648 bytes
    Redo Buffers 5869568 bytes
    Database mounted.
    Database opened.
    SQL> show parameter result
    NAME TYPE VALUE
    client_result_cache_lag big integer 3000
    client_result_cache_size big integer 1G
    result_cache_max_result integer 5
    result_cache_max_size big integer 0
    result_cache_mode string MANUAL
    result_cache_remote_expiration integer 0
    SQL> select dbms_result_cache.status from dual;
    STATUS
    BYPASS
    SQL> set serveroutput on;
    SQL> exec dbms_result_cache.memory_report
    R e s u l t C a c h e M e m o r y R e p o r t
    [Parameters]
    Block Size = 1K bytes
    Maximum Cache Size = 0 bytes (0 blocks)
    Maximum Result Size = 0 bytes (0 blocks)
    [Memory]
    Total Memory = 9440 bytes [0.004% of the Shared Pool]
    ... Fixed Memory = 9440 bytes [0.004% of the Shared Pool]
    ... Dynamic Memory = 0 bytes [0.000% of the Shared Pool]
    PL/SQL procedure successfully completed.
    SQL>
    Is there something what I missed?
    Thanks for any advices.
    Regards,
    Piotr

    A little bit more theory:
    The result cache resides in the Shared pool. Because the database was managing its memory automatically (parameter memory_target was set) and no one was working with this environment, the database didn't allocate yet enough space for shared pool to give some space for result cache. I had to set min value for shared pool to force the database to automatically allocate some space to shared pool during start up and never make shared pool smaller than specified value.
    Hope that this explanation help other people :)
    Regards,
    Petrus

  • Any ideas for a status or "at a glance" splash screen / presentation?

    This is an idea I've been tossing around and wanted to know if there was something easy out there that would accomplish this...
    I'd like to mount a monitor in one of our common areas for the management team and have it display current statuses of some of our IT features/services and maybe quick bits on what we are currently working on, major issues, etc... 
    I've seen some company lobbies with similar setups that display company-wide information, weather, etc.. so I know the capability is out there but I don't know squat regarding what that would entail. The easier, the better, naturally... as I don't want this to turn into an entire job position updating it, haha. But something that I could hopefully remotely update would be nice.
    Any ideas? Thanks!
    This topic first appeared in the Spiceworks Community

    Please see the two articles below:
    http://support.apple.com/kb/TS3694
    http://support.apple.com/kb/TS3125

  • Purchase order status open

    Hi Experts,
    Due to some other reasons we tried clear GR/IR clearing a/c. i will explain clearly.
    We have some purchase orders pertaining to 2006 year. we have not done MIGO and we did MIRO, So that we could not able to clear GR/IR A/C. SO, we have posted manual entry with fb50 same as MIGO posting then we cleared both documents with f-03 its done every thing was fine now But if we see purchase order report status showing OPEN
    How to change the status please some one let me know.this is high priority issue.
    Regards,
    JC

    Hi,
    First make sure that you will not receive goods against your PO..Then go to me22n and delete the item in your PO.
    This will resolve your issue.
    Thanks,
    Srinu

  • Sale Order Status Report

    Dear Expert.
    I want Sales Order Status report as below mentioned format required quarry base report from Date to To Date.
    Location-OrderSeries-OrderNo-CardCode-CardName-ItemCode-Item Descripotion-Inv.UOM-Order Qty-Allocated Qty-DeliverQty-Peniding Qty adn Pending Order Value.

    Hi,
    You can check this :
    select t3.location as 'Location',t0.series as 'Order Series',
    t0.docnum as 'Order No.',t0.cardcode as 'Business Partner Code',
    t0.cardname as 'Business Partner Name', t1.itemcode as 'Item',
    t1.dscription as 'Item Name', t2.invntryUom as 'Inventory UoM',t1.quantity as 'Order Qty',
    t1.QtyToship as 'Allocated Qty- Qty to Ship', t1.delivrdQty as 'Delivered Qty',
    t1.OrderedQty as 'Ordered Qty', t1.openCreQty as 'Pending Qty',
    t1.Opensum as 'Pending Order Row Value'
    from ORDR t0 inner join RDR1 t1 on t1.docentry = t0.docentry
    inner join OITM t2 on t2.itemcode = t1.itemcode
    inner join OLCT t3 on t3.code = t1.loccode
    where t0.docdate >= '2011.01.01' and t0.docdate <= '2011.12.31'
    Hope it helps.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • PF STATUS IN ALV REPORT

    hi,
    How to use PF STATUS IN ALV REPORT?

    HI,
    see this code.
    TABLES:MARA.
    SELECT-OPTIONS: MATNR FOR MARA-MATNR.
    DATA:BEGIN OF ITAB OCCURS 0,
         MATNR LIKE MARA-MATNR,
         ERSDA LIKE MARA-ERSDA,
         MTART LIKE MARA-MTART,
         MBRSH LIKE MARA-MBRSH,
    END OF ITAB.
    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE MATNR
    IN MATNR.
    TYPE-POOLS SLIS.
    DATA:FCAT TYPE slis_t_fieldcat_alv.
    DATA:LAYOUT TYPE slis_layout_alv.
    DATA:EVE TYPE slis_t_event WITH HEADER LINE.
    DATA:HEAD TYPE slis_t_listheader WITH HEADER LINE.
    DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    SORT-UP = 'X'.
    SORT-SPOS = 1.
    SORT-FIELDNAME = 'ERSDA'.
    SORT-tabname = 'MARA'.
    APPEND SORT.
    SORT-SPOS = 2.
    SORT-FIELDNAME = 'MTART'.
    SORT-tabname = 'MARA'.
    APPEND SORT.
    EVE-NAME = 'TOP_OF_PAGE'.
    EVE-FORM = 'TOPOFPAGE'.
    APPEND EVE.
    EVE-NAME = 'TOP_OF_LIST'.
    EVE-FORM = 'TOPOFLIST'.
    APPEND EVE.
    EVE-NAME = 'END_OF_LIST'.
    EVE-FORM = 'ENDOFLIST'.
    APPEND EVE.
    LAYOUT-ZEBRA = 'X'.
    LAYOUT-no_hline = 'X'.
    LAYOUT-NO_VLINE = 'X'.
    LAYOUT-window_titlebar = 'MATERIAL DETAILS'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
       I_PROGRAM_NAME               = SY-REPID
       I_INTERNAL_TABNAME           = 'ITAB'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
       I_INCLNAME                   = SY-REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      CHANGING
        CT_FIELDCAT                  = FCAT
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 2
      OTHERS                       = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = SY-REPID
    <b>   I_CALLBACK_PF_STATUS_SET       = 'STATUS'
       I_CALLBACK_USER_COMMAND        = 'UCOMM'</b>
      I_STRUCTURE_NAME               =
       IS_LAYOUT                      = LAYOUT
       IT_FIELDCAT                    = FCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
       IT_SORT                        = SORT[]
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
       IT_EVENTS                      = EVE[]
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 5
      I_SCREEN_START_LINE            = 5
      I_SCREEN_END_COLUMN            = 120
      I_SCREEN_END_LINE              = 25
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        T_OUTTAB                       = ITAB
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM TOPOFPAGE.
    REFRESH HEAD.
        HEAD-TYP = 'H'.
        HEAD-INFO = 'MATERIALS'.
        APPEND HEAD.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY       = HEAD[]
          I_LOGO                   =
          I_END_OF_LIST_GRID       =
    ENDFORM.
    FORM TOPOFLIST.
    REFRESH HEAD.
        HEAD-TYP = 'H'.
        HEAD-INFO = 'MATERIALS-LISTTOP'.
        APPEND HEAD.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY       = HEAD[]
          I_LOGO                   =
          I_END_OF_LIST_GRID       =
    ENDFORM.
    FORM ENDOFLIST.
    REFRESH HEAD.
        HEAD-TYP = 'H'.
        HEAD-INFO = 'MATERIALS-LISTEND'.
        APPEND HEAD.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY       = HEAD[]
          I_LOGO                   =
          I_END_OF_LIST_GRID       =
    ENDFORM.
    <b>FORM STATUS USING MYMENU.
        SET PF-STATUS 'MENU' excluding MYMENU.
    ENDFORM.
    FORM UCOMM USING CODE STEXT.
        CASE CODE.
            WHEN 'ABC'.
            WRITE:/ 'YOU HAVE CLICKED ON ABC'.
            WHEN 'XYZ'.
            WRITE:/ 'YOU HAVE CLICKED ON XYZ'.
        ENDCASE.
    ENDFORM.</b>
    rgds,
    bharat.

  • Sale Order Status Change after delivery of materials from projects

    have ETO sccenario which consists of all modules such as SD,PS.PP etc. Materials will be procured from external vendors & manufactured inhouse through project systems. After delivery of materials from project systems, billing & invoicing will be done at sales level.
    On delivery of materials from projects, sale order status remain open. Request you to look into the matter & suggest about status change of sale order after delivery / billing.
    Regards,
    Ranjan

    Hi,
    In sale order, WBSE is assigned. Delivery of materials are through cns0. then subsequently picking / packing / billing will happen at sales level. Billing is of delivery related. Please suggest to fix the issue.
    Thanks & Regards,
    Biplab Ranjan

  • Sale Order Status after dellivery of materials from Projects

    Hi,
    I have ETO sccenario which consists of all modules such as SD,PS.PP etc. Materials will be procured from external vendors & manufactured inhouse through project systems. After delivery of materials from project systems, billing & invoicing will be done at sales level.
    On delivery of materials from projects, sale order status remain open. Request you to look into the matter & suggest about status change of sale order after delivery / billing.
    Thank you in advance.
    Regards,
    Ranjan

    Hi,
    In sale order, WBSE is assigned. Delivery of materials are through cns0. then subsequently picking / packing / billing will happen at sales level. Billing is of delivery related. Please suggest to fix the issue.
    Thanks & Regards,
    Biplab Ranjan

  • Dunning Status Report

    Report should be pulling information from dispute management.  Report should pull all active dispute cases by company code (Company Code and Name should be at the top of the report).  Report should show dispute case ID, case status, customer ID, customer name, invoice number (Invoice reference), Invoice date, currency, total currency amount, days overdue, last dunned date, all dispute notes for the case with the dates included, and person responsible (from dispute case).
    Please help me what are the tables i have to use in this.
    this is the report i have to diplay the output above mentioned fields. Please tell me the relations of the tables.

    some more dunning related tables.
    T040S                          Blocking reasons for dunning notices           
    T047D                          Form selection for legal dunning proceedings   
    T047E                          Form selection for dunning notices             
    T047F                          Sorting of dunning letters                     
    T047I                          Standard texts for dunning notices             
    T047R                          Grouping rules for dunning notices             
    TD47D                          Form selection legal dunning procedure in loans
    TD47E                          Form selection for dunning notices             
    TDV07                          Alloc.of application/role category/dunning param
    TDV08                          Alloc.of application/role category/dunning param
    TZV07                          Alloc.of application/role category/dunning param
    VDDUNN                         Dunning run data per loan and dunning run       
    VDDUNN_DISP                    Dunning run data per loan and dunning run

  • Status of excise invoice is IN PROCESS after all the process is over.

    Dear All,
    We have done the migo and the Capture the excise invoice also,But still the status of the excise invoice is showing as IN Process.What could be the reason,
    Please give the inputs.
    Thanks in advance.
    deepti

    Hi,
    Check the table entries for the excise invoice. First check the Part II entry correctly made in J_1IPART2 table. And also check the status of the Excise Invoice in tables J_1IEXCDTL, J_1IEXCHDR, J_1IGRXREF is posted or not (P).
    If there status P is missing after Part II posting you have to make it as 'P'.
    Regards,
    Sandeep

  • Check The Job Status

    Hi SAPsimhas,
    My requirement is as below.
    I will loop through an internal table and create some files with background processing method.(JOB_OPEN,SUBMIT & JOB_CLOSE)
    Now once this job is triggered I need to check the status for that job after maximum 10 mins. Its not neccessary that each job will take 10 mins. only,It can be finished in 2 mins also.
    Once the job is finished then I will XCOM that file.
    So my question is how to code such timer which will check the job status for that job? I have a FM BP_JOB_READ which returns the job status.
    Reply is highly appriciated.

    Try this way
      do.
        call function 'SHOW_JOBSTATE'
          exporting
            jobcount         = p_jobc
            jobname          = p_jobn
          importing
            aborted          = v_aborted
            finished         = v_finished
            ready            = v_ready
            running          = v_running
            scheduled        = v_scheduled
          exceptions
            jobcount_missing = 1
            jobname_missing  = 2
            job_notex        = 3
            others           = 4.
        if v_aborted eq 'X'.
          exit.
        endif.
        if v_finished eq 'X'.
          select single * from tbtcp into wa_tbtcp1
                     where jobname eq p_jobn
                       and jobcount eq p_jobc.
          if sy-subrc eq 0.
            move wa_tbtcp1-listident to p_spono.
          endif.
          exit.
        endif.
        if v_count le 10.
          call function 'ENQUE_SLEEP'
            exporting
              seconds = 60.
          v_count = v_count + 1.
        endif.
      enddo.

Maybe you are looking for