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

Similar Messages

  • 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 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

  • 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

  • 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

  • Refresh Assesment Fails. Collect New Inventory Data Fails

    I successfully used MAP 9.0 to collect data from 3 separate domains over the course of the past few days.
    Upon trying to add one more domains details, stepping through the inventory wizard, it fails when trying to run.
    Close and reopen the program. Same issue.
    Also notice that the lovely charts and stats are no longer displaying.
    So I click the Refresh Assessment link. Now that also fails.
    I've looked for log files to no avail and have also searched for anyone also experiencing this issue.
    I found one result for a much older version of map around performance counters needing to be reset. But that did not help.
    Suggestions?

    The MAP log file is located here: "%LocalAppData%\Microsoft\MAP\MapToolkit.log"
    Please remember to click "Mark as Answer" on the post that helps you, and to click
    "Unmark as Answer" if a marked post does not actually answer your question. Please
    VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

  • Refresh repository fails

    Hi there I am preparing to replace the SAN with a new SAN.
    Avi has told me that at some point in the process I will need to refresh repository contents, so I thought id just try this on the current SAN & current server pool to see it works ok and if fails with :
    Job failed commit (internal) due to OVMAPI_6055E Discover target: ovmdl580, Discover failed with error: java.lang.NullPointerException
    at com.oracle.ovm.mgr.action.VirtualMachineCfgFileAction.getVirtualMachineCfgFile(VirtualMachineCfgFileAction.java:60)
    at com.oracle.ovm.mgr.discover.ovm.VirtualMachineCfgDiscoverHandler.query(VirtualMachineCfgDiscoverHandler.java:39)
    at com.oracle.ovm.mgr.discover.ovm.VirtualMachineCfgDiscoverHandler.query(VirtualMachineCfgDiscoverHandler.java:23)
    at com.oracle.ovm.mgr.discover.ovm.DiscoverHandler.execute(DiscoverHandler.java:50)
    at com.oracle.ovm.mgr.discover.DiscoverEngine.handleDiscover(DiscoverEngine.java:442)
    at com.oracle.ovm.mgr.discover.DiscoverEngine.handleDiscover(DiscoverEngine.java:427)
    at com.oracle.ovm.mgr.discover.DiscoverEngine.discoverServer(DiscoverEngine.java:257)
    at com.oracle.ovm.mgr.op.virtual.RepositoryRefresh.action(RepositoryRefresh.java:130)
    at com.oracle.ovm.mgr.api.job.JobEngine.operationActioner(JobEngine.java:193)
    at com.oracle.ovm.mgr.api.job.JobEngine.objectActioner(JobEngine.java:264)
    at com.oracle.ovm.mgr.api.job.InternalJobDbImpl.objectCommitter(InternalJobDbImpl.java:1090)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:247)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:207)
    at com.oracle.odof.core.BasicWork.invokeMethod(BasicWork.java:136)
    at com.oracle.odof.command.InvokeMethodCommand.process(InvokeMethodCommand.java:100)
    at com.oracle.odof.core.BasicWork.processCommand(BasicWork.java:81)
    at com.oracle.odof.core.TransactionManager.processCommand(TransactionManager.java:751)
    at com.oracle.odof.core.WorkflowManager.processCommand(WorkflowManager.java:401)
    at com.oracle.odof.core.WorkflowManager.processWork(WorkflowManager.java:459)
    at com.oracle.odof.io.AbstractClient.run(AbstractClient.java:42)
    at java.lang.Thread.run(Thread.java:662)
    Thu Feb 02 12:42:25 GMT 2012
    com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_6055E Discover target: ovmdl580, Discover failed with error: java.lang.NullPointerException
    at com.oracle.ovm.mgr.action.VirtualMachineCfgFileAction.getVirtualMachineCfgFile(VirtualMachineCfgFileAction.java:60)
    at com.oracle.ovm.mgr.discover.ovm.VirtualMachineCfgDiscoverHandler.query(VirtualMachineCfgDiscoverHandler.java:39)
    at com.oracle.ovm.mgr.discover.ovm.VirtualMachineCfgDiscoverHandler.query(VirtualMachineCfgDiscoverHandler.java:23)
    at com.oracle.ovm.mgr.discover.ovm.DiscoverHandler.execute(DiscoverHandler.java:50)
    at com.oracle.ovm.mgr.discover.DiscoverEngine.handleDiscover(DiscoverEngine.java:442)
    at com.oracle.ovm.mgr.discover.DiscoverEngine.handleDiscover(DiscoverEngine.java:427)
    at com.oracle.ovm.mgr.discover.DiscoverEngine.discoverServer(DiscoverEngine.java:257)
    at com.oracle.ovm.mgr.op.virtual.RepositoryRefresh.action(RepositoryRefresh.java:130)
    at com.oracle.ovm.mgr.api.job.JobEngine.operationActioner(JobEngine.java:193)
    at com.oracle.ovm.mgr.api.job.JobEngine.objectActioner(JobEngine.java:264)
    at com.oracle.ovm.mgr.api.job.InternalJobDbImpl.objectCommitter(InternalJobDbImpl.java:1090)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:247)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:207)
    at com.oracle.odof.core.BasicWork.invokeMethod(BasicWork.java:136)
    at com.oracle.odof.command.InvokeMethodCommand.process(InvokeMethodCommand.java:100)
    at com.oracle.odof.core.BasicWork.processCommand(BasicWork.java:81)
    at com.oracle.odof.core.TransactionManager.processCommand(TransactionManager.java:751)
    at com.oracle.odof.core.WorkflowManager.processCommand(WorkflowManager.java:401)
    at com.oracle.odof.core.WorkflowManager.processWork(WorkflowManager.java:459)
    at com.oracle.odof.io.AbstractClient.run(AbstractClient.java:42)
    at java.lang.Thread.run(Thread.java:662)
    Thu Feb 02 12:42:25 GMT 2012
    at com.oracle.ovm.mgr.discover.DiscoverEngine.handleDiscover(DiscoverEngine.java:457)
    at com.oracle.ovm.mgr.discover.DiscoverEngine.handleDiscover(DiscoverEngine.java:427)
    at com.oracle.ovm.mgr.discover.DiscoverEngine.discoverServer(DiscoverEngine.java:257)
    at com.oracle.ovm.mgr.op.virtual.RepositoryRefresh.action(RepositoryRefresh.java:130)
    at com.oracle.ovm.mgr.api.job.JobEngine.operationActioner(JobEngine.java:193)
    at com.oracle.ovm.mgr.api.job.JobEngine.objectActioner(JobEngine.java:264)
    at com.oracle.ovm.mgr.api.job.InternalJobDbImpl.objectCommitter(InternalJobDbImpl.java:1090)
    at sun.reflect.GeneratedMethodAccessor1263.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:247)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:207)
    at com.oracle.odof.core.BasicWork.invokeMethod(BasicWork.java:136)
    at com.oracle.odof.command.InvokeMethodCommand.process(InvokeMethodCommand.java:100)
    at com.oracle.odof.core.BasicWork.processCommand(BasicWork.java:81)
    at com.oracle.odof.core.TransactionManager.processCommand(TransactionManager.java:751)
    at com.oracle.odof.core.WorkflowManager.processCommand(WorkflowManager.java:401)
    at com.oracle.odof.core.WorkflowManager.processWork(WorkflowManager.java:459)
    at com.oracle.odof.io.AbstractClient.run(AbstractClient.java:42)
    at java.lang.Thread.run(Thread.java:662)
    this doesnt feel good
    any ideas?

    Martin Brambley wrote:
    now when I have created a new repository on the NEW SAN , I then copied al lthe contents from the old repo into the new and clicked refresh on the new - this completes sucessfully but still says the new repo is emptyI'd be cautious about doing this: we already have entries in the UI for all the VMs that now exist in two places (old SAN and new SAN) because they have the same UUIDs. You may be damaging the Manager DB, because it never expects to see items with the same UUID in different places.

  • Services panel Refresh command fails

    I'm unable to make the Refresh command work. I'm attempting to ue it withj BlazeDS, and is currently using version 4 of Blaze. I've used it both with Blaze direclty, as well as running Blaze under Spring. Same problem. I am able to establish the server from scratch, but the Refresh command always fails updating the service. I want to use Refresh after making server side changes (eg, changed the types of some DAOs being passed back from the server, or added some new server methods).
    Here's what I get in the error log:
    Description Resource Path Location Type
    The destination "fooService" used by service "FooService" was not found in the services configuration file. Update the config file and refresh the service in the Data/Services view.
    But clearly there's nothing wrong with the "services configuration file", since it works perfectly if I remove the service and then immediately add it back in. So it seems to be something in he FB end that's getting confused.
    Any suggestions are most welcome. Re-creating the service (and re-establishing all data management and paging stuff) for every server side change is getting a bit tedious.
    -JM

    >
    > since re-creating the service works every time, it seems to indtcate  that it is the Refresh command thatäs broken,
    > not the server side RDS  mechanism as such.
    >
    Good point here.
    Please try to send a small sample. and the series of stes to reproduce the problem because on my sample all seems to work fine. And if possible file a defect with the sample and steps. You can file the defect @ http://bugs.adobe.com/jira
    Do mention the following:
    1. Versions of Webserver, BlazeDS
    2. Attach a sample app which shows the current problem
    3. Steps to be followed
    Anand Gaurav | Flex Builder Team | Adobe Systems

  • 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.

  • 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

  • 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

  • Automatically refreshing LOV failes

    Hi,
    I have a report based on Crystal Reports. This reports includes a dynamic parameter (LOV) based on one field in an SAP Query. This SAP query contains an user exit, so that each user can only see "his" data.
    Based on that user exit, the LOV of the parameter shows only these values for which the user is qualified for.
    When User1 opens the report in InfoView on his own PC he gets "his" LOV, chooses the parameters and runs the report, when User2 on his PC also opens the report a short while after User1 runs his report, then User2 gets the LOV from User1. That means Crystal uses the LOV from the cache and does not refresh the LOV for each execution of the report.
    This is absolutly NOT correct. Does anybody has a solution for that?
    I know that Crystal has problems with dynamic LOV when using Universes, but don't use an Universe in this report.
    Please help!
    Thank you,
    Stefanie

    This is a WAG at best, but a thought none the less...
    Might there be an entry in the system registry or .ini file that is used to tell Crystal how old a cached LOV can get before it is refreshed?  Perhaps that could be changed to "zero"...  (Modify the registry at your own risk!  :->  )
    HTH,
    Carl

Maybe you are looking for

  • Best way to get bytes from a ByteBuffer

    Hi, I see three possible ways to get the bytes from a ByteBuffer in a new byte array. (if I get the backed array, a change in that array will change the ByteBuffer, that's why I insist on new array). 1. System.arraycopy on the backed array 2. clone()

  • How do i get hold of tech support online

    i attached my I phone to my computer on I tunes again to download and update the operating system again, and it AGAIN FROZE now my phone is a #$%^!!%%#! Paperweight! im so very sick of this happening, it has happened BOTH times I attempted to update

  • ITunes freezes every time iPhone (2.0 software) is connected!

    I just recently updated iTunes to 7.7 and then updated my original iPhone to 2.0 software. Since the update to 2.0, iTunes on my laptop (Windows Vista) keeps freezing and "not responding". iTunes appears to work okay when the phone is not connected.

  • Celtx - Need guidance with first PKGBUILD

    Ok, I decided to make my first PKGBUILD, and chose Celtx (http://celtx.com/) since it seems like a very useful tool, and not too complicated.  I already installed it manually and it works fine. However, although they state it's open source, the sourc

  • I don't have consolidate file in my itunes

    I am trying to transfer from one computer to another and I don't have the consolidate option.  Help