Refreshing mview inside SP

I have a materialized view XYZ which i want to refresh complete by the following command in side an sp.
DBMS_MVIEW.REFRESH('XYZ','C');
Now i have located the command just before the exception block.There are certain reasons which compelled me to refresh it like this only.My sp is getting invoked from application through jdbc thin client.Now this technique is working in some database and failing in some others.I need to identify the cause.
I appreciate any suggestion towards this.

Now this technique is working in some database and failing in some others.I need to identify the cause.And what error handling, logging do you have in place to help your investigations?
Cheers, APC

Similar Messages

  • Fast Refresh mview performance

    Hi,
    I'm actually facing with Fast Refresh Mview performace problems and i would like to know what is the possible improvments for the fast refresh procedure:
    - base table is 1 500 000 000 rows partitions by day , subparttion by has (4)
    - mlog partition by hash (4) with indexes on pk and snaptime
    - mview partition by day subpartition by hash (4)
    10 000 000 insertions / day in base table/mlog
    What improvment or indexes can i add to improve fast refresh ?
    Thanks for help

    Hi,
    Which DB version are you using?
    Did you have a look at the MV refresh via Partition Change Tracking (PCT)?
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/advmv.htm#sthref575
    If it's possible to use PCT, it would probably improve a lot the performance of the refresh of your MV.
    Regards
    Maurice

  • Programmatically refresh components inside a specific row of an af:table

    How to programmatically refresh components inside a specific row of an af:table without refreshing the whole table ?_
    I have an af:table displaying a read-only view object. There is an edit button inside the table calling an af:popup, where the user can update some informations and click a submit button to validate his changes.
    The action property of this button is a method in a backing been where
    -     1 : A stored procedure is called to update several tables (related to my read-only VO).
    -     2 : The VO is re-queried (VO. refreshQueryKeepingCurrentRow() )
    -     3 : The whole table is refreshed (AdfFacesContext.getCurrentInstance().addPartialTarget(myTable) )
    Is it possible to programmatically refresh some components of the current row of the table without refreshing the whole table (point 3)?
    I’ve tried to play with the “partialTrigger” property of af:outputText (table:column:outputText), without success.
    Thanks
    Nicolas

    "+do you happen to want to refresh following an action on the row? Like a link/button click?+" : NO
    There is a table on my page. The user select a row and click on an edit button. This edit button call a popup where the user can modify some information (not directly on the viewObject. All fields in the popup are dummy fields bind to attributes in my backing bean) and then he click on a submit button.
    The submit button action execute a method "submitInformation" in a backing been.
    public String submitInformation(){
            Map<String, Object> params = new HashMap<String, Object>();
            params.put("pManNo", xManNo.getValue()); //xManNo is an attribute of the backing bean
            params.put("pDate", xPeriod.getValue()); //xPeriod is an attribute of the backing bean
            // Execute Operation
            OperationBinding oper = ADFUtils.findOperation("serviceSubmitInfo");
            oper.getParamsMap().putAll(params);
            String results = (String)oper.execute();
            // Close Popup & Refresh Row if OK
            if(!StringUtils.isStringEmpty(results) && results.equals("TRUE")){
                 closePopup("pt1:popAbs");
                 refreshMyCol();
    }The serviceSubmitInfo method is defined in my serviceImpl
        public String serviceSubmitInfo (String pManNo, String pPeriod, ......){
             String results =
                callStoredFunction("? :=myDatabaseFunction(?, ?, ?, ?)",
                                   new Object[] { pManNo, pPeriod, ...... });
              // Commit
              getDBTransaction().commit();
              // Refresh VO (re-query & set currentRow)
              getMyVO().refreshQueryKeepingCurrentRow();         
              return results; // TRUE if ok
        }I want the " refreshMyCol()" method to refresh only the current row and not the whole table...
    Regards
    Nicolas

  • Refreshing mview is hanging after a database level gather stats

    hi guys,
    can you please help me identify the root cause of this issue.
    the scenario is this:
    1. we have a scheduled unix job that will refresh an mview everyday, from tuesday to saturdays.
    2. database maintenance being done during weekends (sundays), gathering stats at a database level.
    3. the refresh mview unix job apparently is hanging every tuesdays.
    4. our workaround is to kill the job, request for a schema gather stats, then re-run the job. and voila, refresh mview will be successful then.
    5. and the rest of the weekdays until saturdays, refresh mview is having no problems.
    we already identified during testing that the scenario where the refresh mview is failing is when after we are gathering stats in a database level.
    during gather stats in a schema level, refresh mview is successful.
    can you please help me understand why we are failing refreshing mview after we gather stats in the database level??
    we are using oracle 9i
    the creation of the mview goes something like below:
    create materialized view hanging_mview
    build deferred
    refresh on demand
    query rewrite disabled
    appreciate all your help.
    thanks a lot in advance.

    1. we have a scheduled unix job that will refresh an mview everyday, from tuesday to saturdays.
    2. database maintenance being done during weekends (sundays), gathering stats at a database level.
    3. the refresh mview unix job apparently is hanging every tuesdays.
    4. our workaround is to kill the job, request for a schema gather stats, then re-run the job. and voila, refresh mview will be successful then.
    5. and the rest of the weekdays until saturdays, refresh mview is having no problems.
    You know Tuesday's MV refresh "hangs".
    You don't know why it does not complete.
    You desire solution so that it does complete.
    You don't really know what is is doing on Tuesdays, but hope automagical solution will be offered here.
    The ONLY way I know how to possibly get some clues is SQL_TRACE.
    Only after knowing where time is being spent will you have a chance to take corrective action.
    The ball is in your court.
    Enjoy your mystery!

  • Fast Refreshable MVIEW

    Trying to create a fast refresh materialized view based on a simple join of two tables over a database link oracle gives a 'COMPLEX QUERY' error (ORA-12015).
    Logging on the origin tables should be ok as creating the MVIEW based on the same select but in the database where the origin tables are poses no problem. The logging tables are created based on primary key and include rowid.
    The select on which the MVIEW should be created is someting like:
    select
    tab1.rowidn id1,
    tab2.rowidn id2,
    tab1.key_idn key1,
    tab2.key_idn key2
    from table1@other_db tabl,table2@other_db tab2
    where tab1.key_idn = tab2.key_idn)
    Does this mean it is impossible to create a fast refresh materialized view over a database link when a join condition is involved?

    Replace the ANSI Joins with Conventional Joins.
    Change this :
    SELECT * FROM V_FIRST VF
    LEFT JOIN R4
    ON VF.ID=R4.ID
    LEFT JOIN R5
    ON  VF.ID=R5.IDto this :
    SELECT VF.* FROM V_FIRST VF, R4, R5
    WHERE  VF.ID=R4.ID
    AND  VF.ID=R5.IDHemant K Chitale

  • Problem in refreshing JTree inside Jscrollpane on Button click

    hi sir,
    i have problem in refreshing JTree on Button click inside JscrollPane
    Actually I am removing scrollPane from panel and then again creating tree inside scrollpane and adding it to Jpanel but the tree is not shown inside scrollpane. here is the dummy code.
    please help me.
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.tree.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    public class Test
    public static void main(String[] args)
         JFrame jf=new TestTreeRefresh();
         jf.addWindowListener( new
         WindowAdapter()
         public void windowClosing(WindowEvent e )
         System.exit(0);
         jf.setVisible(true);
    class TestTreeRefresh extends JFrame
         DefaultMutableTreeNode top;
    JTree tree;
         JScrollPane treeView;
         JPanel jp=new JPanel();
         JButton jb= new JButton("Refresh");
    TestTreeRefresh()
    setTitle("TestTree");
    setSize(500,500);
    getContentPane().setLayout(null);
    jp.setBounds(new Rectangle(1,1,490,490));
    jp.setLayout(null);
    top =new DefaultMutableTreeNode("The Java Series");
    createNodes(top);
    tree = new JTree(top);
    treeView = new JScrollPane(tree);
    treeView.setBounds(new Rectangle(50,50,200,200));
    jb.setBounds(new Rectangle(50,300,100,50));
    jb.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
              jp.remove(treeView);
              top =new DefaultMutableTreeNode("The Java ");
    createNodes(top);
              tree = new JTree(top);
                   treeView = new JScrollPane(tree);
                   treeView.setBounds(new Rectangle(50,50,200,200));
                   jp.add(treeView);     
                   jp.repaint();     
    jp.add(jb);     
    jp.add(treeView);
    getContentPane().add(jp);
    private void createNodes(DefaultMutableTreeNode top) {
    DefaultMutableTreeNode category = null;
    DefaultMutableTreeNode book = null;
    category = new DefaultMutableTreeNode("Books for Java Programmers");
    top.add(category);
    book = new DefaultMutableTreeNode("The Java Tutorial: A Short Course on the Basics");
    category.add(book);
    book = new DefaultMutableTreeNode("The Java Tutorial Continued: The Rest of the JDK");
    category.add(book);
    book = new DefaultMutableTreeNode("The JFC Swing Tutorial: A Guide to Constructing GUIs");
    category.add(book);
    book = new DefaultMutableTreeNode("Effective Java Programming Language Guide");
    category.add(book);
    book = new DefaultMutableTreeNode("The Java Programming Language");
    category.add(book);
    book = new DefaultMutableTreeNode("The Java Developers Almanac");
    category.add(book);
    category = new DefaultMutableTreeNode("Books for Java Implementers");
    top.add(category);
    book = new DefaultMutableTreeNode("The Java Virtual Machine Specification");
    category.add(book);
    book = new DefaultMutableTreeNode("The Java Language Specification");
    category.add(book);
    }

    hi sir ,
    thaks for u'r suggession.Its working fine but the
    properties of the previous tree were not working
    after setModel() property .like action at leaf node
    is not working,I'm sorry but I don't understand. I think you are saying that the problem is solved but I can read it to mean that you still have a problem.
    If you still have a problem then please post some code (using the [code] tags of course).

  • Fast refreshable mviews vs. cdc

    im currently working on a new data warehouse environment. i need to create an ods schema for each of the operational systems in my warehouse.
    i've looked at two of 10gR2 prefered technologies for this task:
    fast refreshable materialized view and change data capture.
    i would to know what is the difference between this two approaches.
    in my understanding, there both cause a performance overhead and require some amount of additional work on each dml operations. in addition , there both work on the method of capturing changes from a table and applying them on a target database.
    the only difference i could think of is that cdc capture changes from the redo log so that commit time on the operational system wont be affected (as much as it would when logging a dml operation in a mview log).

    dba_snapshot_refresh_times or dba_mview_refresh_times would help.
    select job, last_date last_refresh, next_date next_refresh, total_time,what from dba_jobs where what like '%dbms_refresh%'
    This will work only if the refresh is scheduled to run through job queue.

  • Error when try to Fast Refresh Mview ......

    Guys d u have an idea .....
    why when I running job that fast refresh an mview.
    I alwayas got error :
    ORA-12008: error in materialized view refresh path
    ORA-01555: snapshot too old: rollback segment number 2268 with name
    "_SYSSMU2268$" too small
    undo_management set to AUTO.
    undo tablespace has enough space.
    I have mview log on master database.
    regards,
    indrajati

    damorgan's request for more information is completele relevant.
    However, "Snapshot to old" is often due to insufficient rollback/undo space. What happens (grossly simplified) is that when re-reading stored data the database finds it has been overwritten and raises the error. The suggested fix is usually to increase rollback/undo space.

  • Refresh Mviews

    hi all,
    I have few Materialized views that are dependent on one another..
    ex: mv1, mv2, mv3..
    I wrote code that will submit jobs to refresh all 3 views at the same time...
    but it should be in the order mv1, mv2, mv3..
    well, i can loop through it in that order...
    then what's the problem?
    which table should i look up to make sure that the mview has refreshed successfully..
    i am assuming it is not the "all_scheduler_jobs" coz it just says that the job is submitted successfully...
    correct me if i am wrong..
    and could any one help me out of this..
    thank you

    I think i need to rephrase my question..
    how to refresh nested materialized views...
    and i think i found the answer in my book....
    in DBMS_MVIEW.REFRESH procedure..
    need to set the nested parameter to TRUE...
    thanks for looking at my question.... and answer too..
    please let me know if i am wrong...
    thank you

  • How much time My FAST refreshable MVIEWS taken to refresh in last refresh?

    How to find the DURATION of last FAST refresh of MVIEWS?
    Refresh duration will vary depends on data change on base table. I would like to find the duration of last refresh

    dba_snapshot_refresh_times or dba_mview_refresh_times would help.
    select job, last_date last_refresh, next_date next_refresh, total_time,what from dba_jobs where what like '%dbms_refresh%'
    This will work only if the refresh is scheduled to run through job queue.

  • Fast refresh Mview

    hi
    plz tell me why am not able to create a Fast refresh materialized View
    SQL> CONNECT SCHEMA1/SCHEMA@HOST;
    Connected.
    SQL> CREATE MATERIALIZED VIEW LOG ON COMPANY WITH PRIMARY KEY;
    Materialized view log created.
    SQL> CREATE MATERIALIZED VIEW LOG ON EMPLOYEE WITH PRIMARY KEY;
    Materialized view log created.
    SQL> GRANT SELECT ON MLOG$_COMPANY TO SCHEMAREP;
    Grant succeeded.
    SQL> GRANT SELECT ON MLOG$_EMPLOYEE TO SCHEMAREP;
    Grant succeeded.
    SQL> CONNECT SCHEMAREP/REPORTS@HOST;
    Connected.
    SQL>
    SQL> CREATE MATERIALIZED VIEW mview_1
    2 REFRESH fast on DEMAND
    3 AS
    4 SELECT EMPLOYEE.EMPLOYEE_num
    5 FROM schema1.COMPANY company,schema1.EMPLOYEE EMPLOYEE
    6 WHERE COMPANY.COMPANY_ID=EMPLOYEE.COMPANY_ID;
    FROM schema1.COMPANY company,schema1.EMPLOYEE EMPLOYEE
    ERROR at line 5:
    ORA-12052: cannot fast refresh materialized view SCHEMAREP.MVIEW_1
    SQL>

    You would be able to answer yourself your question, if you
    a) read the restrictions for fast refresheable materialized view at
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/basicmv.htm#sthref537
    b) make you familiar with the packaged procedure dbms_mview.explain_mview
    Best regards
    Maxim

  • Fast refreshable Mview question.

    Hi All,
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    "CORE     11.1.0.7.0     Production"
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    Can't we make a Fast refresh materialized view which has UNIONALL operator on REMOTE DATA BASE..?
    REMOTEDB: R
    TARGETDB:T
    Note: all these tables are in Remote DB(R) and I want to create a Mat view on Target DB (T).
    create or replace view V_FIRST
    As
    select * from R1
    UNION ALL
    select * from R2
    UNION ALL
    select * from R3Now i am creating a Fast refresh Mat view
    CREATE MATERIALIZED VIEW REMOTE_MV
    REFRESH FAST ON DEMAND AS
    SELECT * FROM V_FIRST VF
    LEFT JOIN R4
    ON VF.ID=R4.ID
    LEFT JOIN R5
    ON  VF.ID=R5.IDHere i am getting error can not create a fast refreshable mat view on a complex query.
    I think we can create a fast refreshable Mat view which has UNION ALL operator... I don't know about remote tables.
    How to achieve this... with out splitting the Mat view ?. Is there any way..?
    Appreciate your help.
    Thanks,
    Mike

    Replace the ANSI Joins with Conventional Joins.
    Change this :
    SELECT * FROM V_FIRST VF
    LEFT JOIN R4
    ON VF.ID=R4.ID
    LEFT JOIN R5
    ON  VF.ID=R5.IDto this :
    SELECT VF.* FROM V_FIRST VF, R4, R5
    WHERE  VF.ID=R4.ID
    AND  VF.ID=R5.IDHemant K Chitale

  • Refresh MVIEW fails

    When trying to refresh a materializes view in Oracle 9.2 shown error occurs:
    FEHLER in Zeile 1:
    ORA-04068: existing state of packages has been discarded
    ORA-04063: package body "SYS.DBMS_DEFER_SYS" has errors
    ORA-06508: PL/SQL: could not find program unit being called
    ORA-06512: in "SYS.DBMS_SNAPSHOT", Line 794
    ORA-06512: in "SYS.DBMS_SNAPSHOT", Line 851
    ORA-06512: in "SYS.DBMS_SNAPSHOT", Line 832
    ORA-06512: in Line 1
    This is how the m. view has been created:
    In Oracle8 this works, i Oracle9 not, why?
    create materialized view log
    on testtable WITH PRIMARY KEY;
    create materialized view testview
    refresh fast start with sysdate next sysdate+1
    as select * from testtable
    execute dbms_snapshot.refresh('testview','F');
    Any help is appreciated
    Adriane

    Hi.
    This is because you did not created a snapshot, but a materialized view.
    I suggest you to try with the dbms_refresh package to refresh your materialized view instead of using dbms_snapshot, please let me know the results
    Best regards

  • Form refresh issue inside dynamic region

    Hi
    I have a problem with dynamic region. I have a menu on left side containing two buttons and dynamic region on right side. On clicking one of the button employee form open inside the dynamic region but I am unable to navigate between records by clicking form first , next , previous or last buttons.

    I am new learner of Jdeveloper. I run this tutorial http://baigsorcl.blogspot.com/2010/06/working-with-dynamic-regions-in-oracle.html. I am able to learn about how to dynamically bind the taskflow id. When I click the form button on left side of menu Employee Form open in right side of splitter but its navigation button are not working.

  • Problem with MVIEW Refresh

    Hi all,
    I am facing the following problem while refreshing MVIEWS.
    ORA-12008: error in materialized view refresh path
    ORA-03113: end-of-file on communication channel.
    I am using the following method to refresh.
    dbms_mview.REFRESH ('Mview_Name',
    'C',
    TRUE,
    FALSE,
    0,
    0,
    0,
    TRUE
    The script for creating MVIEW is as follows:-
    CREATE MATERIALIZED VIEW gb_ghx_orgs_a
    PCTFREE 5 PCTUSED 60
    TABLESPACE TableSpace_Name
    STORAGE (INITIAL 250k NEXT 250k)
    REFRESH COMPLETE WITH ROWID
    START WITH SYSDATE
    AS
    SELECT Statement;
    can any body help.
    Thanks

    What version of database do you have? what client version are you connecting from?
    ORA-03113 may required you to contact Oracle Support.
    SQL> CREATE MATERIALIZED VIEW gb_ghx_orgs_a
      2  PCTFREE 5 PCTUSED 60
      3  TABLESPACE KKISHORE
      4  STORAGE (INITIAL 250k NEXT 250k)
      5  REFRESH COMPLETE WITH ROWID
      6  START WITH SYSDATE
      7  AS
      8  select * from scott.emp
      9  /
    Materialized view created.
    SQL> begin
      2      dbms_mview.REFRESH ('gb_ghx_orgs_a',
      3      'C',
      4      '',
      5      TRUE,
      6      FALSE,
      7      0,
      8      0,
      9      0,
    10      TRUE
    11      );
    12  end ;
    13  /
    PL/SQL procedure successfully completed.
    SQL> disconnect
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.3.0 - Production
    SQL>

Maybe you are looking for

  • How can I share two devices of ipods to the same itunes?

    Hello Ihave one ipod touch , & my sister have another one. her computer with its itunes is lost, so we have to use my own computer with my own itunes. so how can I add her separtely without disturbing my downloads?

  • How to handle this payment scenario in SAP

    Hello Gurus, Can anyone please help me with how we make this payment in SAP. Customer A is the alternate payer for Customer B. We gave customer B a credit memo. When customer A is making payments, customer A wants to use the credit memo assigned to c

  • Things to consider while copying a seeded package.procedure?

    Hi, I was trying to do some customization as part of my project in PO_APPROVALLIST_S1.rebuild_approval_list. I copied the procedure and put it in my package after renaming it and done some code changes. The syntax errors were corrected and the packag

  • Hard disk out, can I transfer from Ipod?

    My external hard drive where I kept my music went out. All my music is on my ipod. Is there any way I can download it down to my internal hard drive?

  • How to increase the performance

    hi. my execution is taking time in this select query and this i found in sql trace. what should i do to reduce the time,any validations,any code change. Also tell me how to see the indexes for the tables?   IF NOT i_aufk IS INITIAL.     SELECT  aufnr