MView - is not refreshed.

Hi,
I created this mview>>
CREATE MATERIALIZED VIEW zedi_bwvypisy
BUILD IMMEDIATE
REFRESH COMPLETE START WITH SYSDATE
NEXT SYSDATE + 1/48
as select ..
union all
select ..
I didnt use refresh fast on commit because my master tables dont have any primary key (is this the right reason?) therefore I tried periodic refresh - start and next (every 30 min.).
But my mview is never refresed, last refreshing is always the time when I created mview (information from user_mview).
My master tables dont have any primary keys or indexes, is it necessery to have any pk on master table? Whery could be a problem?
Thanks, zd.

I didn't use refresh fast on commit because my master
tables dont have any primary key (is this the right
reason?)That's not the reason, you can fast refresh an MV using rowid. The reason is that your MV uses a complex query (union all).
Anyway, I tried your syntax and it works to me :
SQL> create table newemp as select * from emp;
Table created.
SQL> select count(*) from newemp;
  COUNT(*)
        14
SQL> CREATE MATERIALIZED VIEW mv1
  2  BUILD IMMEDIATE
  3  REFRESH COMPLETE START WITH SYSDATE
  4  NEXT SYSDATE + 1/1440
  5  as select * from newemp
  6  union all
  7* select * from newemp
SQL> /
Materialized view created.
SQL> delete newemp where rownum=1;
1 row deleted.
SQL> commit;
Commit complete.
SQL> select count(*) from newemp;
  COUNT(*)
        13
SQL> select count(*) from mv1;
  COUNT(*)
        28
SQL>after 1 minute :
SQL> /
  COUNT(*)
        26
SQL>                                                                                                    

Similar Messages

  • Different subpartitioning schemes for mviews and PCT-refresh

    It appears that I can have a table RANGE-partitioned by some field (DATE) and LIST-subpartitioned by another field (let's call it subfield2). Then I create materialized view (mview) based on that table, RANGE-partitioned by the same DATE field, but subpartitioned by another field (subfield1, logically parent of subfield2). Then I create another mview, again RANGE-partitioned by the same DATE field, but not subpartitioned at all.
    PCT-refresh (dbms_mview.refresh('mview_name', 'P')) works fine, producing correct results. But I wonder if subpartitioning is taken into account when refreshing mviews. My suspicion is that only primary partitioning is taken into account, and primary partitions are refreshed as a whole, even if only one or few subpartitions have been modified in a table. Are my assumptions correct?
    Another question - can I preserve partitions in mview if dropping them in underlying table? Table stores raw data, and legacy partitions may be dropped to free up some space. But mviews which store data aggregated on some levels may need to preserve data either longer than in raw table, or forever. I could not find a way of achieving this - when I drop a partition from a table on which mviews are built, and refresh mviews - data from dropped partitions of a table is gone from mviews, even though partitions of mviews are not deleted.

    It appears that I can have a table RANGE-partitioned by some field (DATE) and LIST-subpartitioned by another field (let's call it subfield2). Then I create materialized view (mview) based on that table, RANGE-partitioned by the same DATE field, but subpartitioned by another field (subfield1, logically parent of subfield2). Then I create another mview, again RANGE-partitioned by the same DATE field, but not subpartitioned at all.
    PCT-refresh (dbms_mview.refresh('mview_name', 'P')) works fine, producing correct results. But I wonder if subpartitioning is taken into account when refreshing mviews. My suspicion is that only primary partitioning is taken into account, and primary partitions are refreshed as a whole, even if only one or few subpartitions have been modified in a table. Are my assumptions correct?
    Another question - can I preserve partitions in mview if dropping them in underlying table? Table stores raw data, and legacy partitions may be dropped to free up some space. But mviews which store data aggregated on some levels may need to preserve data either longer than in raw table, or forever. I could not find a way of achieving this - when I drop a partition from a table on which mviews are built, and refresh mviews - data from dropped partitions of a table is gone from mviews, even though partitions of mviews are not deleted.

  • Can not refresh server manager Error:0x8007045b

    OS: Windows 2012 R2 Core
    Services: Hyper V
    I was trying to remote reboot and the session hung. No worries I decided I could just reboot the next morning. So I rebooted the next day but when I go into server manager I get
    an errror can not refresh server manager Error:0x8007045b. Did some research found suggestions to fix it using a DISM.exe /Online /Cleanup-image /Restorehealth.
    But then I get an error 1115 A system Shutdown is in progress. I attempt to fix this issue using pskill winlogon but the issue pursistest. I have restarted the server several times now. Not sure how to fix this.
    Thanks in advance,
    Jake

    Hi,
    In addition to the above information,
    Checkout the below thread for similar discussion,
    http://social.technet.microsoft.com/forums/windowsserver/en-US/a700e9f6-4491-4c70-8bd0-d9d3111e2f70/windows-reboot-error
    Regards,
    Gopi
    JiJi
    Technologies

  • Can not refresh page after save properly(When not saving master record)

    I am using jdeveloper 11g R2 (11.1.2.3) JSF Facelet
    In some use case I have Address as master table and Person as detail table
    For some business reason I need to don't save same addresses
    eg:
    If +1 Test St+ is in database already and new user coming and adding this address with new person
    I need to use the row in database not creating a new address
    I do saving in doDML method of Address with some hashing algorithm and it is fine
    My problem is that I can not refresh page after save properly
    User coming to page think Adding a new address and a new person but in fact no new
    address added because of business I describe above
    Any ideas how I can implement this?
    Appreciate that
    Regards
    Mohsen

    Hi,
    from your description it is not clear why the page doesn't refresh. It could be a problem in your implementation code - who knows. What if you perform the address check on a command button that actually submits the new address? If the check returns true (address exists) you would call row.refresh(forget new row); and re-query the view object so the address coming from the database is displayed. If you wanted to use the doDML then yuou need to be aware that doDML doesn't help removing the row the user created. It just ignores the database update but the entity is still around, which in my suggested solution wont be the case.
    Frank

  • Can not refresh the metrics in schedular

    Post Author: sachinddalal
    CA Forum: Performance Management and Dashboards
    Hi,
    When I refresh the metric using schedular, the metric is not refreshed , nor schedular return any error. But when checked in metrics proparties, the last refresh date is not changed, niether the values are updated.
    Whe I try to refresh the metric manual, the values are refresh.
    Please help me to troubleshoot the problem of refreshing metric through schedular.
    Thanks,
    Regards
    Sachin Dalal

    Post Author: jezbraker
    CA Forum: Performance Management and Dashboards
    Scheduler is pretty horrid for refreshing metrics.Better of to use the Rules engine and create a rule thats based on a schedule that based on condition (1=1 works well ) then refreshes metircs.troubleshooting is best done with the trace options in setup/parameters.there are a few other ways or seeing what the schedulers up to - but id stick to rules if i were you.

  • Clicking a tree node does not refresh the fields in the table component

    hi all,
    I am using a tree component along with a table component in my page.so whenever i am clicking on a node it should display the relevant information of that node in the table from the database.But whenever i am doing the page is not refreshing and the old values of the textfields in the table still exist.i have written the code to populate the table in a button click event.It is working fine but the same is not working when i am clicking any node in the tree component.Can anyone provide a solution to this problem.
    Thanks and regards,
    Prasant Kumar

    Never mind... I actually found something that works...
    treeModel.nodeStructureChanged(leadSelection);

  • Report Portlets do not refresh data.

    How can I refresh a report portlet?
    I have created a report and a forms provider based on the same table. I put the portlets on separate TABS on the same PAGE. The report works fine, but when I update the information on the form and return to the report it does not reflect the changes. I have pressed 'refresh', I have gone to another page and come back, no luck. The only way to see the changes is to log out and back in again. Any ideas?
    Thanks, Deb

    I had caching turned off. When I turned on both content and page definition, I was unable to query my forms. The forms and reports are on the same page, different tabs. When I select cache page definition only, I get the same results as no caching. The forms will query my data, I can update, but when I return to the reports TAB, the data has not changed. (Yes, I did click refresh.) I have found that if I click the 'Customize' link on the portlet containing the report and then click 'OK' the data will update. This, however gives me a new error that I will worry about later. For now, the users have 'Minimize' but do not have the 'Customize' Link and the 'minimize' link does not refresh the data, nor give me the new error.

  • Workbook not refresh after running Planning Function (BI-IP)

    Hi! Folks,
         I have a problem with the Bex Analyser which not refresh the data after running Planning Function.
    Step 1: Run Planning Function (There are some changes in records)
    Step 2: I have to Run Process Variables again and input the same selection in the pop-up variables
    Step 3: The changed records will be shown...
    Can I have some coding in the Layouts of Bex Analyzer to refresh the data after running Planning Function?
    Brgds,
    Supasake

    Hi,
    I had a similar problem that the resuls of my planning function were not automatically shown. Only if I did "something else" like saving or running another function the results were displayed.
    I think I solved it by upgrading my SAP GUI6.4 with patch 14. the results of planning functions should be automatically displayed.
    D

  • When I resume my laptop from sleep/hiberante, firefox is hung. It will prompt me with a dialog when I quit, so it is still running, but the page display is blank and will not refresh. I noticed this since about beta 7

    Firefox is running when my laptop comes out of system standby, but the page that was displaying when the laptop went into sleep mode is now a white canvas that does not refresh.
    The application is not hung, because I get prompted to save tabs when I quit, but for some reason, I can't prompt Firefox into refreshing the screen.
    I'm running Firefox on a Thinkpad T400 which has Intel 4 series Express integrated Graphics.

    This also happened if the network adapter is disabled then enabled. My computer is Windows 7 x64. Firefox needs to be killed from taskman before it will load a new instance of the application. I can also reproduce with all add-ons disabled.

  • Master-Detail Detail does not refresh after it's been empty

    I have a master detail page (both are tables) that works just fine, until I click a master record that has no details.
    After that the panelHeader of teh detail is refreshed with the PPT but the table underneath it is not, I keep seeing "no rows yet", no matter which master record I click.
    When I go to a different page and return it's fine again.
    Only one of my pages has this behavior, I tested this on another and it was fine. Has anyone seen this behavior before?
    My console has this message:
    May 11, 2007 10:52:38 AM oracle.adfinternal.view.faces.model.binding.FacesCtrlRangeBinding$FacesModel getSelectedRow
    WARNING: rowIterator is null
    Message was edited by:
    Wendy Tromp

    Ok I found it,
    My details iterator had the following properties:
    <iterator id="AfdelingMedewerkersIterator" RangeSize="-1"
    Binds="AfdelingMedewerkers"
    DataControl="PRBAppModuleDataControl"
    Refresh="IfNeeded" RefreshCondition="#{!adfFacesContext.postback}" />
    I have no idea why I set it like that, but removing the Refresh properties fixed my problem.
    I am still clueless as of why this led to the behavior as described above. I could have understood it if my iterator was not refreshed at all, but I have no idea why it stopped working only after the details were empty and not a second before...
    Anyway, problem solved!

  • Not Refresh Value After Add New Record used with RPC Component

    This is my code in the class Users.as
    package inthanous
    import mx.controls.Alert;
    import mx.rpc.http.HTTPService;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    public class Users
    private var service:HTTPService;
    [Bindable]
    public var xmllist_user:XMLList;
    public function Users(){
    service = new HTTPService();
    service.method = "POST";
    service.useProxy = false
    service.resultFormat = "e4x";
    public function listUser():void{
    service.url = "/user/get_all_user_group_name";
    service.addEventListener("result", httpResultListUser);
    service.addEventListener("fault", httpFaultListUser);
    xmllist_user = new XMLList();
    service.send();
    private function httpResultListUser(event:ResultEvent):void{
    service.removeEventListener("result", httpResultListUser);
    service.removeEventListener("fault", httpFaultListUser);
    xmllist_user = new XMLList(service.lastResult.children());
    listAllUser();
    private function httpFaultListUser(event:FaultEvent):void{
    var faulstring:String = event.fault.message;
    service.removeEventListener("result", httpResultListUser);
    service.removeEventListener("fault", httpFaultListUser);
    Alert.show(faulstring,"Error");
    public function createUser(_xml:XML):void{
    service.url = "/user/create_user";
    service.addEventListener("result", httpResultCreateUser);
    service.addEventListener("fault", httpFaultCreateUser);
    service.send({firstName: _xml.firstName,
    lastName: _xml.lastName,
    gender: _xml.gender,
    login: _xml.login,
    pwd: _xml.pwd,
    dtBirth: _xml.dtBirth,
    telephone: _xml.telephone,
    idGroup: _xml.idGroup
    private function
    httpResultCreateUser(event:ResultEvent):void{
    service.removeEventListener("result", httpResultCreateUser);
    service.removeEventListener("fault", httpFaultCreateUser);
    listUser();
    clearUserDetail();
    private function httpFaultCreateUser(event:FaultEvent):void{
    var faulstring:String = event.fault.message;
    service.removeEventListener("result", httpResultCreateUser);
    service.removeEventListener("fault", httpFaultCreateUser);
    Alert.show(faulstring,"Error");
    This code i used with Ruby on Rail to connect with MySQL.
    When i used with FireFox browse after i create new user
    success it refresh the new record in Datagrid. But for the Internet
    Explorer Datagrid not refresh it because of it display the old
    recode before create.
    So i don't know it problem by Internet Explorer or my script.
    i hope someone can help me the solve this problem.
    thanks

    If you restrict the selection, a record value outside of that selection is not acceptable and will give you this error. This is how BPS works.
    You need to restrict on some other char so BASIC1 doesn't come in, but this value should be part of any selection on ZSEGMENT field for it to be accepted back.

  • Why??? Simple snapshot can not refresh automatically, but can refresh manually.

    Server 1 : Oracle 7.3.4 (as a Master site)
    Server 2 : Oracle 7.3.4 (as a Snopshot site)
    Client PC: SQL*Plus (Oracle 7.3.4 Client)
    Step 1: on Client PC, start 2 SQL*Plus dialog Windows,
    one(Window A) for <Server 1> , another(Window B) for <Server 2>;
    Step 2: on <Window A> do:
    SQL>connect scott/tiger@Server1
    SQL>CREATE SNAPSHOT LOG ON scott.dept ;
    SQL>select * from dept;
    DEPTNO DNAME LOC
    10 AAAAAA AAAAA
    20 BBBBBB AAAAA
    30 CCCCCC AAAAA
    Step 3: on <Window B> do:
    SQL>connect scott/tiger@Server2
    SQL>CREATE DATABASE LINK oracle USING 'Server1';
    SQL>CREATE SNAPSHOT all_dept REFRESH fast
    start with sysdate NEXT SYSDATE+1/(24*60)
    AS SELECT * FROM scott.dept@oracle;
    -- refresh interval: 1 minute
    SQL>select * from all_dept;
    DEPTNO DNAME LOC
    10 AAAAAA AAAAA
    20 BBBBBB AAAAA
    30 CCCCCC AAAAA
    Step 4: on <Window A> do:
    SQL>insert into dept values (50,'MMMMMM','NNNNN');
    SQL>commit;
    SQL>select * from dept;
    DEPTNO DNAME LOC
    10 AAAAAA AAAAA
    20 BBBBBB AAAAA
    30 CCCCCC AAAAA
    50 MMMMMM NNNNN
    <one or two minutes later ... ... >
    Step 5: on <Window B> do:
    SQL>select * from all_dept;
    DEPTNO DNAME LOC
    10 AAAAAA AAAAA
    20 BBBBBB AAAAA
    30 CCCCCC AAAAA
    conclusion: Simple snapshot can not refresh automatically ???????
    SQL>exec DBMS_SNAPSHOT.REFRESH( list => 'all_dept',method => 'F');
    SQL>select * from all_dept;
    DEPTNO DNAME LOC
    10 AAAAAA AAAAA
    20 BBBBBB AAAAA
    30 CCCCCC AAAAA
    50 MMMMMM NNNNN
    conclusion:Simple snapshot can refresh manually.
    How to solve this problem?????
    Thank you very much
    Zhang Ming-an

    When you are manually refreshing the snapshot as scott/tiger, and your database link was defined with a 'connect to/identified by ' clause, your login credentials will be scott/tiger. When the refresh happens from the job queue, it does not use those credentials, It uses some default set. What you should probably do is:
    1. create public database link Oracle using 'server1';
    2. as scott/tiger, create database link Oracle connect to scott identified by tiger;
    3. your automatic refresh should work now.

  • Database View do not refresh in ADF application

    Greetings,
    im facing a weird problem in my application (JDeveloper 11.1.2.4.0 - ADF). All this time i was working directly with tables (VO), but now i also started using database views.
    Everything works fine, when i add a new row in a table that my Database Views is associated with, it refresh properly.
    BUT if i delete rows manually from my database, the View do not refresh in my application, not by refreshing the page,
    redeploying application, even executing the view object query inside the view object. The only way for the DB View to be
    refresh inside the JDeveloper and on deployment time is by restart JDeveloper. I try adding an action on my OV to re-execute them when
    i do something specifically, hopefully the will reset the cache and retrieve the DB view again, but with no luck..
    Correction: now it doesnt even refresh on restart jdeveloper.
    Just for the clarification, im talking about Database Views, and not just Object Views. I create a Object View inside the application to retrieve the data
    from the Database View results.
    Can you help me on this please?

    Yes the queries in SQLDeveloper was showing me correct results.
    But i feel disappointed.. When i went to close SQLDeveloper to try something, it pop me a message to commit/rollback changes.
    After i commit them, my app show correct results too.

  • Advanced Table does not refresh after database level action

    Hi,
    I have a page which has an advanced table. I update the advanced table from the page do some validations, update some DB level columns(also part of advanced table) and see that the changes are saved to the DB but the advanced table does not show the updates done at the DB level.
    I tried clearing the VO Cache and re-executing the VO but still it does not refresh the Advanced table data.
    This is very critical requirement for the client, any inputs will be greatly appreciated.
    Thanks a lot in Advance.
    Here is the code snippet from my CO's processRequest:
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAAdvancedTableBean tblbean = (OAAdvancedTableBean)webBean.findChildRecursive("recasttable");
    if(tblbean!=null)
    tblbean.setRendered(true);
    OAApplicationModule tblam = (OAApplicationModule)am.findApplicationModule("RecastLineAM1");
    tblam.invokeMethod("initQuery");
    tblbean.getTableData();
    Here is my AM - initQuery() code:
    public void initQuery()
    //clearVOCaches("RecastLineEO",true);
    clearVOCaches(null,true);
    getRecastLineVO1().init();
    Here is the VO - init() code:
    public void init()
    System.out.println("****************************executing...");
    OADBTransaction tx = (OADBTransaction) getApplicationModule().getTransaction();
    if (tx.getTransientValue("RECAST_ID") !=null)
    Number recastId = (Number) tx.getTransientValue("RECAST_ID");
    System.out.println("recastId: "+ recastId);
    setWhereClause("RECAST_HDR_ID = :1");
    setWhereClauseParams(null); // Always reset
    setWhereClauseParam(0, recastId);
    executeQuery();
    }

    hi,
    This is how I am calling a DB package. the package does updates on the table. once done I am issueing a commit and requerying the data, however the vo is not getting refreshed.... Can someone point out what am I missing... why is the VO not getting refreshed....
    This is very critical...
    Thanks
    Srini
    public void validateRecast(String respKey)
    OADBTransaction tx = (OADBTransaction)getApplicationModule().getTransaction();
    Number recastId = (Number) tx.getTransientValue("RECAST_ID");
    System.out.println("*********************validateRecast().RecastId: " + recastId);
    OracleCallableStatement ocs = null;
    Connection conn = tx.getJdbcConnection();
    String strOut="", strErr="";
    Number respId = null;
    try
    respId = new Number(respKey);
    catch(Exception e)
    throw new OAException("Invalid Responsibility");
    String stmt = "BEGIN " +
    "GE_RECAST_UTILS_PKG.validate_recast(:1,:2,:3,:4); " +
    "END;";
    try
    ocs = (OracleCallableStatement)conn.prepareCall(stmt);
    ocs.setNUMBER(1,recastId);
    ocs.setNUMBER(2,respId);
    ocs.registerOutParameter(3,OracleTypes.VARCHAR);
    ocs.registerOutParameter(4,OracleTypes.VARCHAR);
    ocs.execute();
    strOut = ocs.getString(3);
    strErr = ocs.getString(4);
    ocs.close();
    System.out.println("Returned with: " + strOut);
    if(strOut.equalsIgnoreCase("ERROR"))
    //throw new OAException(strErr);
    tx.putTransientValue("ERROR",strErr);
    tx.commit();
    getApplicationModule().clearVOCaches("RecastLineEO",true);
    RecastLineVOImpl lineVo = (RecastLineVOImpl)getApplicationModule().findViewObject("RecastLineVO1");
    lineVo.init();
    System.out.println("===============RecastLnId: " +lineVo.first().getAttribute("RecastLnId"));
    System.out.println("===============Product Line: " +lineVo.first().getAttribute("ProductLine"));
    catch(SQLException e)
    tx.rollback();
    if(ocs!=null)
    try
    ocs.close();
    }catch(SQLException e1)
    throw OAException.wrapperException(e1);
    throw OAException.wrapperException(e);
    }

  • Table does not refresh after database level action

    We have defined an Advanced table on a VO to represent invoice lines. The VO is referenced by a VL from the invoice header.
    At one point during our process, a database level package is executed on the current lines. We have a "Requery" button to refresh the lines, however, the lines do not refresh unless we exit the invoice entirely and come back to it via the VL.
    How can we refresh the lines on a current table after a database level transaction occurs?
    Thanks, Jerry.
    Our AM code is as follows...
    // handleRefreshInvoiceLines( )
    public void handleRefreshInvoiceLines()
    OAViewObject vo = (OAViewObject)getInvoiceLinesVO1( );
    if( !vo.isPreparedForExecution( ) )
    getTransaction( ).validate();
    vo.executeQuery( );
    clearVOCaches( "InvoiceLinesEO", true ); // troubleshooting
    } // handleRefreshInvoiceLines()

    Thank you. I've moved clearCache around a bit. apparently vo.isPreparedForExecution() is false. I wonder why?
    --Jerry.                                                                                                                                                                                                                                                   

Maybe you are looking for

  • "Unable to load workflow actions from server. Please contact your server."

    I get the following error message when I want to create or open a workflow in SharePoint Designer 2007 "unable to load workflow actions from server. Please contact your server administrator." I don't receive this error as a site collection administra

  • How to update a specific cell value in a CSV file.

    Hi I would like to know whether it is possible in openscript to update a cell value of the CSV file. For example if the test script requires to update the cell of 6th row and 8th column, then how to achieve through openscript API? Please kindly let m

  • Restoring music from my old iPhone 5 backup to a new iPhone 6

    I've just got an iPhone 6 with 64GB memory to replace my old iPhone 5 (with the same 64GB memory). I took a full backup of my iPhone 5 before buying the new 6, and both are using the same iOS 8.0.2 version. My apps are all restored just fine, whether

  • How to find out  number of includes for a given program dynamically

    Hi all I have a requirement in which, I have to find out  number of includes and their names for a given  user defined program dynamically if u know the answer pls let me know Thanks in advance Devi

  • HELP: clearing a Vendor F-44

    Hi All, For a certain vendor, I have to clear 3 items all with Special G/L Indicator. The balance is zero. When i launch F-44 and select only items whith Special G/L Indicator, processing the items SAP shows me the three items, but the value of one o