How to get a materialized view get to refresh itself after the job is "broken"

we created a materialized view sometime ago with the following statement:
create materialized view SXV_PUB_EMPLOYEE_CERT_ALL_M
refresh complete on demand
start with to_date('30-08-2009 04:00:00', 'dd-mm-yyyy hh24:mi:ss') next trunc(sysdate) + (28/24)
as
select  sxv_emp_cert_all.*
from    sxv_employee_certification_all sxv_emp_cert_all;
this week we found out it had not been refresh for about a month
In dba_jobs the column broken was 'Y', next_date time something like 01-01-4000 and failures 16
when I ran it manually by executing
BEGIN DBMS_MVIEW.REFRESH('SXV_PUB_EMPLOYEE_CERT_ALL_M', 'C'); END;
I found that one of the columns was too small (probably a columns of one of the underlying tables had been extended since the creation of the materialized view)
After fixing this I ussied yesterday (on 29-8-2013) the statement :
alter materialized view SXV_PUB_EMPLOYEE_CERT_ALL_M
refresh complete on demand
start with to_date('30-08-2009 04:00:00', 'dd-mm-yyyy hh24:mi:ss') next trunc(sysdate) + (28/24)
after this the table dba_jobs showed me 30-08-2013 04:00:00 as next date
I was expecting it to run this night at 04:00, but it didn't
the last_date column value was still from about a month ago, the column broken still shows 'Y'
and the next date 30-08-2013 04:00:00 (while it should been set to 31-08-2013 01:00:00
Rrunning
BEGIN DBMS_MVIEW.REFRESH('SXV_PUB_EMPLOYEE_CERT_ALL_M', 'C'); END;
gave no errors this time
and in User_Mview_Analysis the last_refresh_date column showed the date/time I had executed it
Any idea how to get the job "unbroken" again so that the view refreshes itself every night?
the database is Oracle Database 10g Release 10.2.0.4.0
regards,
Remco

thanx for all your helpful and correct answers . but eventually I found it myself
exec dbms_job.broken(<jobnumber>, false);

Similar Messages

  • How do you get iTunes purchased songs to automatically play one after the other

    How do you get iTunes purchased songs to play automatically one after the other without having to hit play for each song ? Also I lost all my pictures on my iPad when I installed iOS 7 upgrade. Any way to get them back? Thanks. Dr Ron.

    Hi Dr. Ron,
    By your question, I am wondering if you are playing your music from the iTunes app rather than the Music app?
    In the Music App, you can go to any of the options at the bottom and click on a song to play and it will then continue to play the songs in that category. You can also select "Shuffle" to shuffle them.
    As for your Photos, did you have them backed up anywhere?
    Cheers,
    GB

  • How does materialized view work when refresh the view vs create the view?

    I am using a materialized view, and I cant set it to fast refresh because some of the tables are from remote database which does not have materialized view log.
    When I create the materialized view, it took like 20 30 seconds. however when I was trying to refresh it. It took more than 2 3 hours. and total number of records are only around 460,000.
    I understand that when the view refreshes, it would take extra step like purge the table however I am not sure why it made so much difference in execution time perspective...
    Does the dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) do the same exact insert as when I created the view?
    Could anyone please let me know how would this happen? Thanks,
    Code looks like as following
    create materialized view MY_MV1
    refresh force on demand
    start with to_date('20-02-2013 22:00:00', 'dd-mm-yyyy hh24:mi:ss') next trunc(sysdate)+1+22/24
    as
    ( SELECT Nvl(Cr.Sol_Chng_Num, ' ') AS Change_Request_Nbr,
           Nvl(Sr.Sr_Num, ' ') AS Service_Request_Nbr,
           Nvl(Sr.w_Org_Id, 0) AS Org_Id,
           Fcr.rowid,
           Cr.rowid,
           Bsr.rowid,
           Sr.rowid,
           SYSDATE
      FROM [email protected] Fcr
    INNER JOIN [email protected] Cr
        ON Fcr.w_Sol_Chng_Id = Cr.w_Sol_Chng_Id
    INNER JOIN [email protected] Bsr
        ON Fcr.w_Sol_Chng_Id = Bsr.w_Sol_Chng_Id
    INNER JOIN [email protected] Sr
        ON Sr.w_Srv_Rec_Id = Bsr.w_Srv_Rec_Id
    WHERE Sr.Sr_Num !='NS'
    );I have tried to use dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) but it still took 141 mins to run... vs 159 mins without atomic_refresh=>false
    Edited by: 986006 on Feb 20, 2013 2:15 PM

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION)
    >
    I am using a materialized view, and I cant set it to fast refresh because some of the tables are from remote database which does not have materialized view log.
    When I create the materialized view, it took like 20 30 seconds. however when I was trying to refresh it. It took more than 2 3 hours. and total number of records are only around 460,000.
    I understand that when the view refreshes, it would take extra step like purge the table however I am not sure why it made so much difference in execution time perspective...
    Does the dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) do the same exact insert as when I created the view?
    >
    What Oracle version are you using? The 'atomic_refresh' parameter default was changed to TRUE starting with 10g.
    See the PL/SQL Packages and Types doc
    >
    atomic_refresh
    If this parameter is set to true, then the list of materialized views is refreshed in a single transaction. All of the refreshed materialized views are updated to a single point in time. If the refresh fails for any of the materialized views, none of the materialized views are updated.
    If this parameter is set to false, then each of the materialized views is refreshed in a separate transaction.
    >
    What that means is that if the value is TRUE Oracle uses a DELETE to remove the existing rows. If the value is FALSE then Oracle uses TRUNCATE.
    If you really are using the FALSE setting you should not be seeing that much of a time difference between creating the MV and a complete refresh so something else must be going on.

  • How do i get my hp 940c printer to share itself with the homegroup on my pc?

    What do i have to do to get my hp 940c printer to share itself with the homegroup on my HP Pavilion Entertainment  pc?

    Hi,
    check if this helps
    go to the computer where the printer is installed
    on that computer click on start and go to devices and printers and right click on the printer and left click on printer properties
    click on the sharing tab and you have a check box make sure the box is checked.
    once this is done your printer is shared now you can go to your entertainment pc click on devices and printers and and you will see this printer.
    I work for HP but my posts and replies are my own.
    Click the Kudos star as a way to say "thank you" for helpful posts.
    Be sure to come back and click the 'Accept as Solution' button on the post that solved your issue - it may help someone else .....

  • Materialized view not properly refreshing

    Hi,
    As materialized view is not refreshing properly. we compare the sum of hashcode materialized view with the sum of hash code of the base view or table the materialized view is defined. If it's found equal then materialized view got refreshed succesfully else not.
    But in below example the column value is interchanged in between the row eventhough hashcode is same.
    Is there any other way to find the materialized view got refreshed successfully or not.
    SQL> create table temp as select object_name, subobject_name from user_objects where rownum<3;
    Table created
    SQL> select * from temp;
    OBJECT_NAME SUBOBJECT_NAME
    ATP_BN_I_1
    ATP_START_END_DATE_I_2
    SQL> create materialized view mv1 as select * from temp;
    Materialized view created
    SQL> select * from mv1;
    OBJECT_NAME SUBOBJECT_NAME
    ATP_BN_I_1
    ATP_START_END_DATE_I_2
    SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from temp;
    SUM(NVL(ORA_HASH("OBJECT_NAME"
    4852176374
    SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from MV1;
    SUM(NVL(ORA_HASH("OBJECT_NAME"
    4852176374
    SQL> UPDATE TEMP SET OBJECT_NAME=SUBOBJECT_NAME,SUBOBJECT_NAME=OBJECT_NAME;
    2 rows updated
    SQL> COMMIT;
    Commit complete
    SQL> select * from mv1;
    OBJECT_NAME SUBOBJECT_NAME
    ATP_BN_I_1
    ATP_START_END_DATE_I_2
    SQL> select * from temp;
    OBJECT_NAME SUBOBJECT_NAME
    ATP_BN_I_1
    ATP_START_END_DATE_I_2
    SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from MV1;
    SUM(NVL(ORA_HASH("OBJECT_NAME"
    4852176374
    SQL> select sum(nvl(ora_hash("object_name"||"subobject_name"),0)) from temp;
    select sum(nvl(ora_hash("object_name"||"subobject_name"),0)) from temp
    ORA-00904: "subobject_name": invalid identifier
    SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from temp;
    SUM(NVL(ORA_HASH("OBJECT_NAME"
    4852176374
    Any help really appreciated.
    Thanks in advance.

    unique wrote:
    Is there any other way to find the materialized view got refreshed successfully or not.You can look at the last_refresh_date and staleness columns of all_mviews: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1105.htm#REFRN20139
    Or maybe use the all_mview_refresh_times view: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1104.htm#sthref1068
    Regards,
    Rob.

  • I am not getting clear alert from OEM 11g Grid, even after the issue solved

    I am not getting clear email alert from OEM 11g, even after the issue fixed.
    For eg: I got critical alert when I have shutdown the DB.But I didn't get clear alert even I have started my DB and is up running.
    I am getting only critical and warning alerts but not clear alerts from 11g Grid control.
    Please help me in troubleshooting the issue....
    Thanks in advance.............
    vgcrl

    Bullitt wrote:
    there email address is [email protected]
    Thank you... I will give that a go...
    Martin

  • How do I set up security on my linksys router after the i...

    How do I set up security on my linksys router after the install of a net gear wireless pc adapter?

    Setting up your wireless connection in your router.
    1.Open Internet Explorer and type 192.168.1.1 into the address bar.
    2.You will now get a sign-in box, User Name = (Leave Blank)
                                                           Password = admin (all lower case letters)
    3.Once the set-up page opens, click on the Wireless Tab as youwill need to change the settings. A) Wireless Network Mode = Mixed
                  B) Wireless Network Name (SSID) = Choose any name and do not use Linksys.
                  C) Wireless Channel = 1, 6 or 11 is best, so see which work best for you.
                  D) Wireless SSID Broadcast = Enabled.
    4. Now go to the bottom of the page and click on save settings.
    5. Click on the Wireless Security Sub tab.
                  A) Security Mode: WPA
                  B) WPA Algorithms: TKIP + AES
                  C) WPA Shared Key:  Type 24 letters, and numbers using lower and upper case letters
                  D) Group Key Renewal: 3600
    6. Once again go to the bottom of the page and click on Save Settings.
    7. Now you can close out of this page.
    8. You will now need to enter the security info into your computer. I will now give you 2 links, depending which operating system you have, Vista or XP you will follow the one you have.
    Vista = http://www.home-network-help.com/wireless-adapter-configuration-in-vista.html
    XP = http://www.home-network-help.com/wireless-adapter.html
    Now try to make a wireless connection.
    Good Luck,
    Ttech

  • Material availability date can not be after the delivery date

    Dear Experts,
    we are using the following scnario,
    1. Once the user creates the sales order, automatically system creates PO in the background.
    we have created Bapi program for creation of Background PO in SD User Exit.
    The following issue occurs in Prd, DS1, QS1 server, We have done Technical upgradation project, Now when we creates sales order automatically po created with error message of Material availablity date can not be after the delivery date. even sales order no also not updated in the PO.
    QAS server (without technical upgrade) i refered the same input parameter and used the same and create the sales order system generates PO automatically without error message.
    Does any one can through lights on this issue,
    Thanks and Best Regards,
    Muralidharan S

    Hi
    The dates are determined due to shipping and transportation scheduling settings. So check whether the shipping and transportation scheduling is being performed as per the cofiguration settings after Technical upgrade. Since the MAD date should not be after Delivery date but it seems that the dates are not determined properly.
    Also check the Transit  time, Loading time, Pick/Pack time and Lead time are retained as same as before the technical upgrade. Use the QAS server settings to validate the settings in other servers.
    Regards
    Rajkumar K

  • How come I can't customize ringtones on my iphone4 after the upgrade of the latest itune?

    How come I can't customize ringtone on my iphone4 after the upgrade of itunes latest version? I seem to be putting it in the right section and is showing up under my device but is not showing up on my iphone. Can anyone help? And yes, my ringtone are 30sec or less but it doesn'e show up on my phone in the ringtone section.

    Is ringtones under 35 secs? If over then it will not work.

  • How to get most recently view pages in new tab on the new version of firefox

    upgraded to the new firefox and now i cannot get my recently viewed site to show when i open a new tab. the little square that is supposed to turn them on and off is not showing up.

    You can check if the new tab is still set to the about:newtab page.
    You can check the browser.newtab.url pref on the <b>about:config</b> page.
    * browser.newtab.url = about:newtab
    You can open the <b>about:config</b> page via the location/address bar.
    You can accept the warning and click "I'll be careful" to continue.
    *http://kb.mozillazine.org/about:config
    See also this article about the New Tab page (about:newtab):
    *https://support.mozilla.org/kb/new-tab-page-show-hide-and-customize-top-sites

  • Create materialized view get ora-00998 error cause by subquery

    hi all,
    my create statement as follow,
    create materialized view MV_DM_DIM_DEALER01
    Build deferred
    Refresh complete
    ON DEMAND
    Enable query rewrite
    as
    select a.dealer_no,a.sk_period from DM_DIM_DEALER a
    where A.SK_PERIOD=201210 and a.dealer_no in (select dealer_No from dm00_fav_dealer)
    ORA-00998: must name this expression with a column alias
    so what's the problem?
    thx all

    >
    my create statement as follow,
    create materialized view MV_DM_DIM_DEALER01
    Build deferred
    Refresh complete
    ON DEMAND
    Enable query rewrite
    as
    select a.dealer_no,a.sk_period from DM_DIM_DEALER a
    where A.SK_PERIOD=201210 and a.dealer_no in (select dealer_No from dm00_fav_dealer)
    ORA-00998: must name this expression with a column alias
    so what's the problem?
    >
    Well since the error is 'ORA-00998: must name this expression with a column alias' you might try naming your expressions with aliases
    select a.dealer_no dealer_no,a.sk_period sk_period from DM_DIM_DEALER a

  • How to create a materialized view on a subqueried view

    Hi,
    I have a view with subquery. This view is accessed by users frequently. I want to improve its performance by materialiezed view technology. Unfortunately, my view includes a subquery. does anyone have an idea how to create a materialiezed view on a subqueried view?
    Copper

    Oracle 9.2.0.4
    SQL,
    select
    action,
    id,
    id0,
    bl_ticker,
    report_type,
    published_date,
    version,
    decode(rating,'SBUY','Strong Buy',initcap(rating)) rating,
    nvl(fairvalue,(select fairvalue from ard_published_v2_log where id=(select max(id) from ard_published_v2_log where bl_ticker=a.bl_ticker and id<a.id and fairvalue is not null))) fairvalue,
    pricing_date,
    price,
    update_date,
    nid
    from
    select * from ard_published_v2_log
    union select * from nemo_published_history_corr where (action is null or action<>'D')
    minus select * from ard_published_v2_log where action='D'
    minus select * from ard_published_v2_log where id in (select id0 from ard_published_v2_log where id0 is not null)
    minus select * from ard_published_v2_log where id in (select id0 from nemo_published_history_corr where action='D')
    minus select * from ard_published_v2_log where id in (select id0_new from nemo_fillup_id0 where apply=1)
    minus select * from ard_published_v2_log where id>0 and rating='N/A' and price is null-- and nid is null
    ) a
    order by id desc

  • Materialized views with Complete refresh taking infinite time while refresh

    Hi,
    We have some materialized view which are configured for Complete refresh and are being refreshed manually everyday in the morning. Some times we face this issue of the MV taking longer time than usual for refresh. We tried running the below query to see if any object/MVs are locked and did not obtain any entries using the query:
    SELECT username U_NAME, owner OBJ_OWNER,
    object_name, object_type, s.osuser,
    DECODE(l.block,
    0, 'Not Blocking',
    1, 'Blocking',
    2, 'Global') STATUS,
    DECODE(v.locked_mode,
    0, 'None',
    1, 'Null',
    2, 'Row-S (SS)',
    3, 'Row-X (SX)',
    4, 'Share',
    5, 'S/Row-X (SSX)',
    6, 'Exclusive', TO_CHAR(lmode)
    ) MODE_HELD
    FROM gv$locked_object v, dba_objects d,
    gv$lock l, gv$session s
    WHERE v.object_id = d.object_id
    AND (v.object_id = l.id1)
    AND v.session_id = s.sid
    ORDER BY username, session_id;
    Hence please help us in troubleshooting this issue in Refreshing. and also let us know of any possible cause of Refresh taking longer time than usual.
    Thanking you in advance.
    Bharath

    >
    We have some materialized view which are configured for Complete refresh and are being refreshed manually everyday in the morning. Some times we face this issue of the MV taking longer time than usual for refresh
    >
    Which is it? 'some' MVs or 'the' MV that is taking longer than usual.
    1. How many MVs are being refreshed?
    2. What process are you using to refresh them
    3. Are you refreshing them one at a time serially or just starting the refresh of all of them at the same time?
    4. Do any of these MVs use the same base tables as the other MVs
    5. Are any of the MVs based on remote tables?
    6. Are any of the MVs based on other MVs?
    7. What does an AWR report show for the time period when things are taking longer than usual?
    All of the same issues that can cause a query to run slow can cause an MV refresh to go slow because an MV refresh is a query.
    But you need to provide a lot more information and metrics about your system if you want to get any advice that might be specific to your particular case.

  • Issue with materialized view and fast refresh between Oracle 10g and 11g

    Hi all,
    I've hit a problem when trying to create a fast-refreshable materialized view.
    I've got two databases, one 10.2.0.10, another 11.2.0.1.0, running on 32-bit Windows. Both are enterprise edition, and I'm trying to pull data from the 10g one into the 11g one. I can happily query across the database link from 11g to 10g, and can use complete refresh with no problem except the time it takes.
    On the 10g side, I've got tables with primary keys and m.v. logs created, the logs being of this form ...
    CREATE MATERIALIZED VIEW LOG ON table WITH PRIMARY KEY INCLUDING NEW VALUES
    On the 11g side, when I try to create an m.v. against that ...
    CREATE MATERIALIZED VIEW mv_table REFRESH FAST WITH PRIMARY KEY AS SELECT col1, col2 FROM table@dblink;
    ... I get an ORA-12028 error (materialized view type is not supported by master site).
    After running the EXPLAIN_MVIEW procedure it shows this;
    REFRESH_FAST_AFTER_INSERT not supported for this type mv by Oracle version at master site
    A colleague has managed to build a fast-refresh m.v. from the same source database, but pulling to a different one than I'm using; his target is also 10g, like the (common) source, so I've no idea why I'm getting the 'not supported' message whilst he isn't.
    I've been able, on previous projects, to do exactly what I'm trying to achieve but on those someone with more knowledge than me has configured the database!
    I'm now stumped. I'm also no DBA but despite that it's been left to me to install the new 11g database on the 32-bit Windows server from scratch, so there are probably a couple of things I'm missing. It's probably something really obvious but I don't really know where to look now.
    If anyone can give me any pointers at all, I'd be really grateful. This question is also duplicated in the Replication forum but hasn't had any replies as yet, so I'm reproducing it here in hope!
    Thanks in advance,
    Steve

    Hi Steve,
    You should have a look at metalink, Doc ID 1059547.1
    If that does not help, there may be something else in Mater note ID 1353040.1
    Best regards
    Peter

  • Refresh materialized view on fast refresh

    Hi,
    I want to create a fast refresh on a materialized view but i kept getting ORA-12015: cannot create a fast refresh materialized view from a complex query. When I did a complete refresh on the materialzed view, it completed. I have create a materialized view log for the table. In my materialized view script, I have included a user defined function. Does db version 10g have the capability to do a fast refresh?
    Thanks

    What is the query you are using for the MV?
    The error message says it all... "cannot create a fast refresh materialized view from a complex query"
    If your query is complex then you will have to perform complete refreshes.
    One way around can be to fast refresh all tables in the query then create a view on them based on the 'complex' query. Admittedly this is only a workaround in certain scenarios.
    Check out the documentation...
    http://68.142.116.70/docs/cd/B19306_01/server.102/b14226/repmview.htm#sthref422

Maybe you are looking for

  • Question regarding iphoto and folders

    I am a Mac newbie (9 months) and quite happy expect i freeze all the time after i installed lion, but that is for a different thread.;) I had all of my pictures on an external hard drive.  I had them organized in folders by year (also had a Year/edit

  • Payment Guarantee Procedure

    hi When i created a SO, Payment Guarantee Procedure's value in Billing Document tab was '000001'(Letters of credit) automatically, and there is one error log when clicking on the 'Finance Doc. List' button. Now, anyone can tell me why the error log w

  • Solved: pacman - permissions differ on tmp/

    Not sure if anyone else is seeing this because this may have been part of something I did a way back.  I'm getting: ( 35/400) upgrading filesystem [######################] 100% warning: directory permissions differ on tmp/ filesystem: 777 package: 17

  • How do I insert the value of an email field in the submit mailto: argument?

    I want to create a button that will redirect a PDF form to an email address entered as a field in the form.  In other words, a "return to sender" function.  The button function has a submit to URL where you can use "mailto:[email protected]".  How ca

  • Thunderbird automatically goes offline. We want it to stay online all the time. What do we need to do?

    Thunderbird automatically goes offline -- even if the computer has not gone to sleep -- even though we maintain network connection. How can I stop this from happening (it is very annoying!!)? We are on version 24.6.0