BUG - Cannot copy materialized view to offline database - JDeveloper 11GP4

I was trying to copy a schema with a lots of materialized views from into an off-line database whene I got this stack trace below
09-Sep-2008 08:09:36 oracle.jdbc.driver.T4CConnection assertLoggedOn
SEVERE: Throwing SQLException: 430
09-Sep-2008 08:21:47 oracle.ide.db.transfer.TransferManager prepare
SEVERE: Prepare failed
java.lang.IllegalArgumentException: No enum const class oracle.javatools.db.ora.MaterializedView$Staleness.IMPORT
     at java.lang.Enum.valueOf(Enum.java:192)
     at oracle.javatools.db.ora.MaterializedView$Staleness.valueOf(MaterializedView.java:175)
     at oracle.javatools.db.ora.MaterializedViewBuilder._parseStaleness(MaterializedViewBuilder.java:378)
     at oracle.javatools.db.ora.MaterializedViewBuilder.fillInBaseProperties(MaterializedViewBuilder.java:107)
     at oracle.javatools.db.ora.MaterializedViewBuilder.fillInProperties(MaterializedViewBuilder.java:63)
     at oracle.javatools.db.ora.MaterializedViewBuilder.fillInObject(MaterializedViewBuilder.java:54)
     at oracle.javatools.db.AbstractDBObjectBuilder.buildObject(AbstractDBObjectBuilder.java:36)
     at oracle.javatools.db.dictionary.DictionaryDBObjectBuilder.buildObject(DictionaryDBObjectBuilder.java:63)
     at oracle.javatools.db.AbstractSchemaObject.checkInit(AbstractSchemaObject.java:168)
     at oracle.javatools.db.AbstractSchemaObject.checkInit(AbstractSchemaObject.java:205)
     at oracle.javatools.db.AbstractSchemaObject.copyToImpl(AbstractSchemaObject.java:64)
     at oracle.javatools.db.ora.MaterializedView.copyToImpl(MaterializedView.java:378)
     at oracle.javatools.db.ora.MaterializedView.copyTo(MaterializedView.java:367)
     at oracle.javatools.db.AbstractDBObject.copyTo(AbstractDBObject.java:89)
     at oracle.jdevimpl.offlinedb.transfer.OffToOffPolicy.copyForTransfer(OffToOffPolicy.java:181)
     at oracle.ide.db.transfer.TransferManager.prepare(TransferManager.java:155)
     at oracle.ide.db.transfer.TransferManager.prepareAndTransfer(TransferManager.java:374)
     at oracle.ideimpl.db.transfer.TransferRunnable.run(TransferRunnable.java:79)
     at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:615)
     at java.lang.Thread.run(Thread.java:595)
Environment
Windows XP Professional
Studio Edition Version 11.1.1.0.0
Build JDEVADF_MAIN.OTN4_GENERIC_080429.0116.4949
Oracle IDE     11.1.1.0.22.49.49
java.runtime.version     1.5.0_11-b03
Database 10g R2 (10.2.0.3.0)

hi ow005960
This looks more like a question for this forum:
"JDeveloper and OC4J 11g Technology Preview"
JDeveloper and OC4J 11g Technology Preview
success
Jan Vervecken

Similar Messages

  • Error while creating materialized view which using database link

    Helo!
    I'm getting error "ORA-00942: table or view does not exist" when I want to create materialized view.
    Details:
    1. On destination database I create a database link:
    CREATE DATABASE LINK SDATABASE
    CONNECT TO MYUSER
    IDENTIFIED BY MYUSERPASS
    USING 'ORCL';
    => Command "SELECT * FROM TABLE1@SDATABASE" returns data normally!
    2. On source database I create MATERIALIZED VIEW LOG:
    CREATE MATERIALIZED VIEW LOG
    ON TABLE1
    WITH PRIMARY KEY
    INCLUDING NEW VALUES;
    3. Now, when I want to create MATERIALIZED VIEW on destination database:
    CREATE MATERIALIZED VIEW TABLE1
    REFRESH FAST
    START WITH SYSDATE
    NEXT SYSDATE + 1/1440
    WITH PRIMARY KEY
    AS SELECT * FROM TABLE1@SDATABASE;
    ...I get error "ORA-00942: table or view does not exist"!
    How is that possible if command "SELECT * FROM TABLE1@SDATABASE" returns data normally?
    Thanks,
    Voranc

    And, I'm using Oracle 10g.
    Voranc

  • How to pull materialized view code from database

    I wana to view the code for the materialized view from the data base server.Whats the statment to fetch the code of materialized view from the database.
    Neeraj Goel

    There is table user_mviews,from where we get query and others related matter to materialized views.
    Neeraj Goel

  • Fast refresh of materialized view on remote database

    Hi All,
    I have the following scenario, two databases called ORCL_1 and ORCL_2
    ORCL_1 (11.1.0.7) ORCL_2 (10.2.0.1)
    EMPLOYEE (Master table)
    DEPARTMENT (Master table)
    I have created materialied view logs on both the master tables as follows...
    create materialized view log on department
    with rowid, sequence(department_id, department_name)
    including new values
    create materialized view log on employee
    with rowid, sequence (employee_no, surname, firstname, title, department_id, dob, dependants)
    including new values
    On ORCL_1 i have created a materialized view as follows...
    create materialized view employee_mview
    build immediate
    refresh on demand with rowid
    as select e.employee_no, e.title, e.firstname, e.surname, d.department_name, d.department_id, e.dob, e.dependants, e.rowid emp_rowid, d.rowid dept_rowid
    from employee@ORCL_2 e,
    department@ORCL_2 d
    where e.department_id = d.department_id
    then i have a scheduled task, on ORCL_1, that execute "...dbms_mview.refresh ('mac_dba.employee_mview','?');...." every minute
    this works fine, except for the fact that all the records are deleted from the materialized view and then all the records are re-inserted.
    How can i get it so that only the records that have been added or amended, as per the materialized view logs, are refreshed to the materialized view.
    thanks
    Mel

    Hi Harry,
    Have tried creating materialized view as follows...
    create materialized view mac_dba.employee_mview
    build immediate
    refresh fast on demand with rowid
    as select e.employee_no, e.title, e.firstname, e.surname, d.department_name, d.department_id, e.dob, e.dependants, e.rowid emp_rowid, d.rowid dept_rowid
    from mac_dba.employee@ORCL_2 e,
    mac_dba.department@ORCL_2 d
    where e.department_id = d.department_id
    I get the following error message
    ORA-12028: materialized view type is not supported by master site
    thanks
    Mel

  • Creating the materialized view using the database link

    Hi Guys,
    I am using the Oracle 11g release version.
    Following is my question,
    I had created the Database link to get the data from remote DB table.
    Using that DB link, i can access the required table using SELECT statment.
    When i tried to create the materialized using that DB link.
    I am getting the error SQL Error: ORA-00942: table or view does not exist.
    Can anyone please find the root cause and provide the solution for this?
    TIA,
    Dhivakar.

    Hi Dhivakar,
    try like this
    CREATE DATABASE LINK test
    CONNECT TO scott IDENTIFIED BY tiger
    USING 'orcl';
                         Pls make sure the table name.which ur using to create the materialized view.Thanks
    Venkadesh

  • Cannot create Materialized View using PL/SQL procedure

    Hello,
    I have a question related to Materialized View creation.
    I have a stored procedure that creates materialized view. When trying to run this procedure I get insufficient privileges error: ORA-01031.
    When I run content of this procedure as anonymous PL/SQL block them materialized view is created without any complications.
    Can you please advice me on that topic?
    Is it even possible to create materialized view in stored procedure as I haven't found an info on it.
    Thanks
    Petr

    Hi chudapet,
    Whenever you do operation in procedure you need to have direct grants and not via a role.
    Most probably the grant to create materialized view is available via a role to your user.
    Assign direct grant to the user:
    grant create materialized view to scott;
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • ICal bug: cannot copy/paste into location field of exchange 2007 calendar

    when you copy text from any application (cmd C) and then try to paste it into de location field of a new or existing appointment of a calendar synchronizing with an exchange 2007 account in iCal 4.0, then .... well nothing happens. You can paste it in a subject or a notes field but not in de location field.

    My experience as well (hooked into google calendar), and a frustrating one. I assume this is related in some way to the "yellow exclamation point in edit mode - can only select entire block"? I see that normal "on my mac" calendar locations don't have the yellow exclamation point, and I can select any portion of the text. What's up with this? Is iCal suggesting that google's "Where" field is incompatible somehow? Yet there seems to be no trouble exchanging data between the two...
    Message was edited by: johnshifflett

  • Importing materialized views from database into physical layer

    Hi,
    I have created materialized view in the database. When I try to import the materialized view into the physical layer in OBIEE 10G (using the import from database option), it is not showing in the list of available object. I have selected all the object types (tables,views etc.). Can you please let me know how to import the existing MVs in the database into the physical layer.
    Regards
    Vinodh.
    Edited by: user493441 on Jul 7, 2012 4:11 PM

    Hi Vinod,
    Refer the below links.
    Materialized Views in OBIEE
    http://gerardnico.com/wiki/database/oracle/materialized_view
    Concept of materialized views in creating datawarehouse?????
    Hope this help's
    Thanks
    Satya

  • Materialized View Log - Compress Clause for List Partition

    Hi All,
    In Syntax diagram it states that Compress Clause for List Partition of Materialized View Log is valid , but when we run any script with compress clause for list partition on Materialized view log then Database throws error as ORA-14020: this physical attribute may not be specified for a table partition
    So in any chance we can have the compress clause for the partition of materialized view log.
    Thanks in advance,
    Manu.

    The "CREATE MATERIALIZED VIEW LOG" syntax refers to the "Table Partitioning" section of the CREATE TABLE documentation.
    The "Table Partitioning" section refers to "table_partition_description" which then refers to "table_compression". "table_compression" then states that you can specify compression for entire table in the physical_properties clause and for range partition / list partition in the "table_partition_description". The Restrictions section on Table Compression says "You cannot define table compression explicitly for hash partitions or hash and list subpartitions" which implies that you can define partition for list partitions.
    Moreover, error 14020 lists valid options for Range or Composite Range and for Hash partitoins -- which implies that all other Table physical attributes are applicable for List partitions. (But then, is Compression a physical attribute -- it is really part of "physical properties" not "physical attributes").
    I think that the documentation isn't explicit enough and needs to be fixed.
    N.B : Referencing the 10.2 documentation.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Feb 1, 2010 4:12 PM

  • Problem in fast refreshing nested materialized views

    Hi all,
    While developing an ODS(Operational Data Store) system, i've created base materialized views from production database to ODS database which would use fast refresh. Now, i need to create nested Materialized views on these base MViews which contains joins and aggregations which should refresh on FAST mechanism.
    But while doing so, got several problems though Nested materialized views can be built using Complete Mechanism. The reporting queries is important and we want it should not hit the production database, rather it should hit the ODS db. But we are failing to build the Nested Materialized views which works on FAST.
    I tried google, oracle docs but all in vain. i tried to do a simple testing which also failed. I would be grateful if anyone can help in in this regard. I'm attaching the test case experimented,
    SCOTT >CREATE MATERIALIZED VIEW LOG ON EMP
    2 WITH ROWID, SEQUENCE(EMPNO, ENAME, JOB,
    3 MGR, HIREDATE, SAL,
    4 COMM, DEPTNO)
    5 INCLUDING NEW VALUES;
    Materialized view log created.
    Elapsed: 00:00:00.03
    SCOTT >
    SCOTT >CREATE MATERIALIZED VIEW LOG ON DEPT
    2 WITH ROWID, SEQUENCE(DEPTNO, DNAME, LOC)
    3 INCLUDING NEW VALUES;
    Materialized view log created.
    Elapsed: 00:00:00.06
    SCOTT >
    SCOTT >CREATE MATERIALIZED VIEW MV_EMP
    2 NOCACHE
    3 ENABLE ROW MOVEMENT
    4 NOLOGGING
    5 NOCOMPRESS
    6 PARALLEL(DEGREE DEFAULT INSTANCES DEFAULT)
    7 BUILD IMMEDIATE
    8 REFRESH FAST ON DEMAND
    9 WITH ROWID
    10 ENABLE QUERY REWRITE
    11 AS
    12 SELECT * FROM EMP;
    Materialized view created.
    Elapsed: 00:00:00.21
    SCOTT >
    SCOTT >CREATE MATERIALIZED VIEW MV_DEPT
    2 NOCACHE
    3 ENABLE ROW MOVEMENT
    4 NOLOGGING
    5 NOCOMPRESS
    6 PARALLEL(DEGREE DEFAULT INSTANCES DEFAULT)
    7 BUILD IMMEDIATE
    8 REFRESH FAST ON DEMAND
    9 WITH ROWID
    10 ENABLE QUERY REWRITE
    11 AS
    12 SELECT * FROM DEPT;
    Materialized view created.
    Elapsed: 00:00:00.14
    SCOTT >CREATE MATERIALIZED VIEW LOG ON MV_EMP
    2 WITH ROWID, SEQUENCE(EMPNO, ENAME, JOB,
    3 MGR, HIREDATE, SAL,
    4 COMM, DEPTNO)
    5 INCLUDING NEW VALUES;
    Materialized view log created.
    Elapsed: 00:00:00.04
    SCOTT >
    SCOTT >CREATE MATERIALIZED VIEW LOG ON MV_DEPT
    2 WITH ROWID, SEQUENCE(DEPTNO, DNAME, LOC)
    3 INCLUDING NEW VALUES;
    Materialized view log created.
    Elapsed: 00:00:00.03
    SCOTT >
    SCOTT >CREATE MATERIALIZED VIEW MV_EMP_DEPT
    2 NOCACHE
    3 ENABLE ROW MOVEMENT
    4 NOLOGGING
    5 NOCOMPRESS
    6 PARALLEL(DEGREE DEFAULT INSTANCES DEFAULT)
    7 BUILD IMMEDIATE
    8 REFRESH FAST ON DEMAND
    9 WITH ROWID
    10 ENABLE QUERY REWRITE
    11 AS
    12 SELECT D.ROWID DEPT_ROWID, E.ROWID EMP_ROWID, E.ENAME, D.DNAME, D.LOC, E.JOB, E.SAL
    13 FROM MV_EMP E,
    14 MV_DEPT D
    15 WHERE E.DEPTNO=D.DEPTNO;
    FROM MV_EMP E,
    ERROR at line 13:
    ORA-12053: this is not a valid nested materialized view
    Elapsed: 00:00:00.17
    SCOTT >
    SCOTT >CREATE MATERIALIZED VIEW MV_EMP_DEPT
    2 NOCACHE
    3 ENABLE ROW MOVEMENT
    4 NOLOGGING
    5 NOCOMPRESS
    6 PARALLEL(DEGREE DEFAULT INSTANCES DEFAULT)
    7 BUILD IMMEDIATE
    8 REFRESH FORCE ON DEMAND
    9 WITH ROWID
    10 ENABLE QUERY REWRITE
    11 AS
    12 SELECT D.ROWID DEPT_ROWID, E.ROWID EMP_ROWID, E.ENAME, D.DNAME, D.LOC, E.JOB, E.SAL
    13 FROM MV_EMP E,
    14 MV_DEPT D
    15 WHERE E.DEPTNO=D.DEPTNO;
    Materialized view created.
    Elapsed: 00:00:00.25
    SCOTT >
    SCOTT >EXECUTE DBMS_MVIEW.REFRESH('MV_EMP','F');
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.04
    SCOTT >EXECUTE DBMS_MVIEW.REFRESH('MV_DEPT','F');
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.04
    SCOTT >EXECUTE DBMS_MVIEW.REFRESH('MV_EMP_DEPT','F');
    BEGIN DBMS_MVIEW.REFRESH('MV_EMP_DEPT','F'); END;
    ERROR at line 1:
    ORA-12004: REFRESH FAST cannot be used for materialized view "SCOTT"."MV_EMP_DEPT"
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2254
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2460
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2429
    ORA-06512: at line 1
    Elapsed: 00:00:00.11
    SCOTT >EXECUTE DBMS_MVIEW.REFRESH('MV_EMP_DEPT','C');
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.35
    SCOTT >

    Sorry,
    By mistake this got posted in the CERTIFICATION forum,
    you can view the same question in the following link:
    Problem in fast refreshing nested materialized views

  • How do I figure where is the data in a materialized view coming from

    Hi: when I run select NAME, OWNER from dba_mview_refresh_times, I see a number of materialized views. How do I find more details about this view i.e where is the data coming from and which fields. The source table that is in another database changed. But the view on my database where the materialized view exist has not changed. I want to confirm from where is data coming in this view
    TIA
    Ravi

    SQL>  select * from dict where table_name like 'ALL%MVIEW%'
    TABLE_NAME                     COMMENTS                                                             
    ALL_BASE_TABLE_MVIEWS          All materialized views with log(s) in the database that the user can s
                                   ee                                                                   
    ALL_MVIEWS                     All materialized views in the database                               
    ALL_MVIEW_AGGREGATES           Description of the materialized view aggregates accessible to the user
    ALL_MVIEW_ANALYSIS             Description of the materialized views accessible to the user         
    ALL_MVIEW_COMMENTS             Comments on materialized views accessible to the user                
    ALL_MVIEW_DETAIL_PARTITION     Freshness information of all PCT materialized views in the database  
    ALL_MVIEW_DETAIL_RELATIONS     Description of the materialized view detail tables accessible to the u
                                   ser                                                                  
    ALL_MVIEW_DETAIL_SUBPARTITION  Freshness information of all PCT materialized views in the database  
    ALL_MVIEW_JOINS                Description of a join between two columns in the                     
                                   WHERE clause of a materialized view accessible to the user           
    ALL_MVIEW_KEYS                 Description of the columns that appear in the GROUP BY               
                                   list of a materialized view accessible to the user                   
    ALL_MVIEW_LOGS                 All materialized view logs in the database that the user can see     
    ALL_MVIEW_REFRESH_TIMES        Materialized views and their last refresh times  for each master table
                                    that the user can look at                                           
    ALL_REGISTERED_MVIEWS          Remote materialized views of local tables that the user can see      
    13 rows selected.

  • Creating Materialized View in Toad

    As with every new endeavor - come new questions.
    I am trying to create a materialized view via toad (first time doing this). Now - toad is great, since it provides a kind-of wizard interface. Hence, one doesn't have to completely code in the create statement, with all of the options, etc.
    Instead, in toad, one can (via the schema browser), go into the Materialized Views tab and click on create new. This opens a window with 6 tabs: Basic Info, Refresh Info, Physical Attributes, Query, Partitions & Subpartition Template.
    In the Basic Info, one can put a check mark next to some of the following options:
    -Build Deffered
    -Parallel
    -Cache
    -Logging
    -Using index
    -Allow updates
    etc.
    I have read that build deferred refers to whether or not you would like the view to be created automatically or to be deferred.
    Anyways, I tried to find Toad documentation to explain each of the options in-detail. No success. Hence, am researching each part piece by piece.
    But - here is my question:
    In the Query tab, we are asked to specify a query. I am assuming that the query does not have to be a full query, beginning with CREATE MATERIALIZED VIEW mv_table1 REFRESH FAST etc...
    Since in this 'wizard', we are providing the MV name at the top of the dialog box, we are checking the 'options' in the other tabs, etc.
    And so, I assumed that the query should merely be a select query in the window mentioned above.
    So I entered the following:
    select * from table1@remote_db;
    When I go to verify the syntax, I get the error message: ORA_00911: invalid character. It seems to be pointing to my db_link (remote_db). I have been using this link throughout many places, w/o any problems.
    Has anyone created a MV in toad before? Any links to good toad documentation would be helpful as well.
    Thanks.

    (This is fun... ;))
    For anyone endeavoring this in the future, below I have attached the prerequisites required in order to create a materialized view (can also be found @ http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_6002.htm):
    Prerequisites
    The privileges required to create a materialized view should be granted directly rather than through a role.
    To create a materialized view in your own schema:
    You must have been granted the CREATE MATERIALIZED VIEW system privilege and either the CREATE TABLE or CREATE ANY TABLE system privilege.
    You must also have access to any master tables of the materialized view that you do not own, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
    To create a materialized view in another user's schema:
    You must have the CREATE ANY MATERIALIZED VIEW system privilege.
    The owner of the materialized view must have the CREATE TABLE system privilege. The owner must also have access to any master tables of the materialized view that the schema owner does not own (for example, if the master tables are on a remote database) and to any materialized view logs defined on those master tables, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
    To create a refresh-on-commit materialized view (ON COMMIT REFRESH clause), in addition to the preceding privileges, you must have the ON COMMIT REFRESH object privilege on any master tables that you do not own or you must have the ON COMMIT REFRESH system privilege.
    To create the materialized view with query rewrite enabled, in addition to the preceding privileges:
    If the schema owner does not own the master tables, then the schema owner must have the GLOBAL QUERY REWRITE privilege or the QUERY REWRITE object privilege on each table outside the schema.
    If you are defining the materialized view on a prebuilt container (ON PREBUILT TABLE clause), then you must have the SELECT privilege WITH GRANT OPTION on the container table.
    The user whose schema contains the materialized view must have sufficient quota in the target tablespace to store the master table and index of the materialized view or must have the UNLIMITED TABLESPACE system privilege.
    When you create a materialized view, Oracle Database creates one internal table and at least one index, and may create one view, all in the schema of the materialized view. Oracle Database uses these objects to maintain the materialized view data. You must have the privileges necessary to create these objects.

  • Materialized View to be run every 1 minute through dbms_scheduler

    Hi,
    I have a materialized view on 1 database which has its select statement going across a database link to numerous tables on another database.
    The materialized view creates fine and when refreshed using dbms_snapshot refreshes without error.
    My requirement is to automate this refresh for every minute. I have created a job through dbms_scheduler for the refresh to happen every minute but it fails with the error message
    ORA-12008: error in materialized view refresh path
    I have ctreated another materialized view on the database which does not go across a dblink and scheduled this though dbms_scheduler for every minute, this works fine.........
    So it appears my issue is the selecting from tables across a dblink.
    Does any one have any experience of this area, how to resolve this issue or maybe an alternative solution than dbms_scheduler?
    Thanks in advance.
    Mark.

    How is your database link defined?
    Is it using a fixed user? i.e create database link .... identified by xxxxx
    I think it needs to be to be used in a scheduled job.
    Carl

  • Materialized Views

    I have a table ABC with 80 million rows in X Database. I created materialized view on Y database MVIEW3 as a Master table X.ABC using database private link . It took almost 90min.
    When I was trying to refresh using this command
    execute DBMS_SNAPSHOT.REFRESH( 'MVIEW3_ITEMS','C'); This is taking too long . I couldn't finish this query in 16 hrs. So i had to kill the query. I enabled materialized view log on source table(X.ABC)
    This is my create query .
    CREATE MATERIALIZED VIEW "TEST"."MVIEW3"(Column Names) ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "BIRD" BUILD IMMEDIATE USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "SYSTEM" REFRESH COMPLETE ON DEMAND
    WITH PRIMARY KEY USING DEFAULT LOCAL ROLLBACK SEGMENT USING ENFORCED CONSTRAINTS DISABLE QUERY REWRITE
    Any help from Guru's ?

    Well, if you've already created a materialized view log on the master table, you can switch to FAST REFRESH mode (provided the mview is eligible for that) :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_2001.htm#i2226546

  • Materialized view showing red cross in front of it in SQL developer

    we created a materialized view in oracle database,it works fine, and other views that select on  it return results and work fine too. But it has a red cross in front of it in oracle developer.
    I then refresh the view, or recreate the view, it shows green, but after a while when I come back, the red cross show up again.
    What does it mean, any error message we can find?
    Thanks

    878566 wrote:
    we created a materialized view in oracle database,it works fine, and other views that select on  it return results and work fine too. But it has a red cross in front of it in oracle developer.
    I then refresh the view, or recreate the view, it shows green, but after a while when I come back, the red cross show up again.
    What does it mean, any error message we can find?
    It means your system is working NORMALLY! There is no 'error message' to find because there is no error. What you describe is EXACTLY how MVs are designed to work.
    It is NORMAL for MVs to be, and to become, invalid, especially if there refresh setting is ON DEMAND. Don't confuse 'validity' with 'staleness'; they are very different things.
    See the section 'Invalidating Materialized Views' in the Data Warehousing Guide'
    http://docs.oracle.com/cd/B28359_01/server.111/b28313/advmv.htm#i1007082
    Invalidating Materialized Views
    Dependencies related to materialized views are automatically maintained to ensure correct operation. When a materialized view is created, the materialized view depends on the detail tables referenced in its definition. Any DML operation, such as an INSERT, or DELETE, UPDATE, or DDL operation on any dependency in the materialized view will cause it to become invalid. To revalidate a materialized view, use the ALTER MATERIALIZED VIEW COMPILE statement.
    A materialized view is automatically revalidated when it is referenced. In many cases, the materialized view will be successfully and transparently revalidated. However, if a column has been dropped in a table referenced by a materialized view or the owner of the materialized view did not have one of the query rewrite privileges and that privilege has now been granted to the owner, you should use the following statement to revalidate the materialized view:
    ALTER MATERIALIZED VIEW mview_name COMPILE; 
    The state of a materialized view can be checked by querying the data dictionary views USER_MVIEWS or ALL_MVIEWS. The column STALENESS will show one of the values FRESH, STALE, UNUSABLE, UNKNOWN, UNDEFINED, or NEEDS_COMPILE to indicate whether the materialized view can be used. The state is maintained automatically. However, if the staleness of a materialized view is marked as NEEDS_COMPILE, you could issue an ALTER MATERIALIZED VIEW ... COMPILE statement to validate the materialized view and get the correct staleness state. If the state of a materialized view is UNUSABLE, you must perform a complete refresh to bring the materialized view back to the FRESH state. If the materialized view is based on a prebuilt table that you never refresh, you will need to drop and re-create the materialized view.
    As the doc states Oracle will normally 'revalidate' an MV when it is referenced. You can do this manually by using 'ALTER . . . COMPILE'. For an ON DEMAND MV compiling it will NOT alter the contents of the MV - it may stil be STALE.
    You don't need to REFRESH or recreate the MV to make it valid; just recompile it. If it doesn't become VALID after you compile it then there is usually an issue with one of the dependent objects that you need to resolve.

Maybe you are looking for

  • How can I unlock my itunes account?

    My itunes account is blocked by itunes and i have no idea how I can unblock it, I'm already trying for a long time. The reasen it was blocked is because of clickandbuy, its a long story but now my itunes is blocked so I cant update or buy anything al

  • Previous Meter Reads and Usage are not  correct after meter Proration

    It seems that during proration there are two meter reading available the one with the Meter Reading type as 03 ( Automatic Estimation ) and other is Meter Reading type 01 - MR By employee that is being  retrieved. The 03 reading type seems to be the

  • Issue in XI to XI integration

    Hi, I am working on a requirmen, in which I am trying to connect two PI systems with each other, the scenario is like ECC ==> SAP-PI 7.1 ==> SAP-PI 7.0 ==> Third Party. I am using XI adapters for this, My scenario is working fine till 2nd PI. I am ab

  • All files on Boot Camp partition mysteriously erased after 10.5.3 update

    My wife's MBP 2.4 was running 10.5.2 with a Boot Camp installation of Windows XP. The other night she upgraded to 10.5.3 and everything on her Boot Camp partition was erased somehow. She spent most of the day working in Windows. During the day someon

  • Protect images / content in PDF...

    Hi, How can I set up securities to protect copying of images / general content of a PDF? I went through the settings in Acrobat, but could not find what the name of this feature is. Thanks!