Creating a Materialized View in Oracle 8i

Hello -
What are the steps and privileges required to create a materialized view in Oracle 8i?
Thanks

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.
Thanks
Manish

Similar Messages

  • A quicker way to create a materialized view?

    Hi,
    I'm new to replication and have been reading doco on it. Basically I want to set up read-only materialized views in oracle 11g.
    So on the replicated database I created a db link that points to the master db.
    Then I created a materialized view that does "select * from table@dblink" and that is forced refresh every 10 minutes.
    Problem is that the table on the master db is large and the network link is slow, so the "create materialized view" statement would take a long time to complete.
    So I think to speed up the process I would export/import the table from master to replicated db, then make this imported table a materialized view somehow.
    Is this possible, and if so, how?
    Thanks.
    Long

    If you are able to use other means (exp-imp, expdp/impdp, unload-sqlldr, externalfile etc) to copy the data faster (as a normal table in the target database), you can then use the "ON PREBUILT TABLE" clause in the CREATE MATERAILIZED VIEW statement.
    See
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6002.htm#i2063793
    Alternatively, you must first verify if the CREATE is slow only because of SQL Query performance on the source, rather than because of network bandwidth/latency. If query execution needs to be tuned, that would be a cleaner solution, because the Refresh can then be automatically handled by Oracle.
    Remember that you can use Materialized View Log(s) on the source tables to enable FAST Refresh's as well.

  • Create a materialized view :-

    How do I create a materialized view on a view ,so that it will refresh automatically on every commit in base table where the view having more that 9 function ?

    Read Materialized View Refresh for complete information.
    For a Jist:
    Refresh Mode Description
    ON COMMIT
    Refresh occurs automatically when a transaction that modified one of the materialized view's detail tables commits. This can be specified as long as the materialized view is fast refreshable (in other words, not complex). The ON COMMIT privilege is necessary to use this mode.
    ON DEMAND
    Refresh occurs when a user manually executes one of the available refresh procedures contained in the DBMS_MVIEW package (REFRESH, REFRESH_ALL_MVIEWS, REFRESH_DEPENDENT).
    When a materialized view is maintained using the ON COMMIT method, the time required to complete the commit may be slightly longer than usual. This is because the refresh operation is performed as part of the commit process. Therefore this method may not be suitable if many users are concurrently changing the tables upon which the materialized view is based.
    If you anticipate performing insert, update or delete operations on tables referenced by a materialized view concurrently with the refresh of that materialized view, and that materialized view includes joins and aggregation, Oracle recommends you use ON COMMIT fast refresh rather than ON DEMAND fast refresh.
    If you think the materialized view did not refresh, check the alert log or trace file.
    If a materialized view fails during refresh at COMMIT time, you must explicitly invoke the refresh procedure using the DBMS_MVIEW package after addressing the errors specified in the trace files. Until this is done, the materialized view will no longer be refreshed automatically at commit time.

  • 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

  • Can create view, but cannot create table / materialized view: Xpath is null

    Hi all,
    We recently moved some XML documents into the database in an XMLType column and want to query the data. I've been writing some queries and turning them into materialized views. I got to one query, and something really strange is happening. My query returns the expected results, but I am getting an error when I try to create a materialized view out of it. Even stranger, I can create a view out of it, and I can manually insert its data into an existing table, but I cannot create a materialized view out of it and I cannot create a table out of it. Here is a brief summary, please let me know if anyone has suggestions.
    Issuing the following commands fails in SQLDeveloper
    -- Creating a materialized view out of the query fails:
    create materialized view element REFRESH COMPLETE ON DEMAND as [query];
    Error at Command Line:1 Column:1 SQL Error: ORA-31063: XPath compilation failed: Xpath is null.
    -- Creating a table out of the query with the following shortcut fails:
    create table element as [query];
    Error at Command Line:1 Column:1 SQL Error: ORA-31063: XPath compilation failed: Xpath is null.
    Issuing the following commands in SQLDeveloper works fine:
    -- Creating a view out of the query works:
    create or replace view element as [query];
    -- Creating a blank table from the query and then inserting data works:
    create table element as select * from [query] where 1 = 2;
    insert into element select * from [query];
    Here is a simplified version of the query...
    I have changed the names around, and cut the query down so maybe it will be a little easier to understand. I did confirm that this query is also having the same symptoms described above. Since I changed the names, executing the query returns no results. However creating a materialized view out of the query still fails with the 'Xpath is null' error.
    create materialized view element REFRESH COMPLETE ON DEMAND as
    select
    m.resource_id,
    xml.*
    from metadata_sources m,
    xmltable(
    'for $i in /metadata/app//*[(self::elem1 or self::elem2) and (parent::form or parent::subform)]
    let $formName := if($i/parent::subform) then $i/../../@name else $i/../@name
    let $subformName := if($i/parent::subform) then $i/../@name else ""
    return <data
    appId="{$i/ancestor::app[1]/idField}"
    formName="{$formName}"
    subformName="{$subformName}"
    elemName="{$i/@name}"></data>' passing m.xml_content
    columns
    app_id NUMBER path '@appId',
    form_name VARCHAR2(50 char) path '@formName',
    subform_name VARCHAR2(50 char) path '@subformName',
    elem_name VARCHAR2(50 char) path '@elemName'
    ) xml;
    Edited by: user11949534 on Feb 22, 2013 1:55 PM

    As far as creating a structured index, I was under the impression that I would need to then register an XSD. No, you can use it without an XML schema.
    How about a regular relational view, with an underlying xml index?
    That way you also eliminate the need for an explicit refresh step as you would then be querying real-time data, as if it were relational data.
    For example :
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    SQL> create table tmp_xml of xmltype ;
    Table created.
    SQL> insert into tmp_xml values (
      2    xmlparse(document '<root><item id="1">ABC</item><item id="2">DEF</item></root>')
      3  ) ;
    1 row created.
    SQL> insert into tmp_xml values (
      2    xmlparse(document '<root><item id="3">GHI</item><item id="4">JKL</item></root>')
      3  ) ;
    1 row created.
    SQL> create or replace view tmp_xml_v as
      2  select x.item_id, x.item_val
      3  from tmp_xml
      4     , xmltable(
      5         '/root/item' passing object_value
      6         columns item_id  number      path '@id'
      7               , item_val varchar2(3) path '.'
      8       ) x
      9  ;
    View created.
    SQL> create index tmp_xml_sxi on tmp_xml (object_value)
      2  indextype is xdb.xmlindex
      3  parameters (q'#
      4  XMLTABLE tmp_xml_xtb '/root/item'
      5  COLUMNS item_id  number      path '@id'
      6        , item_val varchar2(3) path '.' #'
      7  ) ;
    Index created.
    SQL> exec dbms_stats.gather_table_stats(user, 'TMP_XML');
    PL/SQL procedure successfully completed.
    SQL> set autotrace on explain
    SQL> set lines 200
    SQL> select * from tmp_xml_v ;
       ITEM_ID ITE
             3 GHI
             4 JKL
             1 ABC
             2 DEF
    Execution Plan
    Plan hash value: 4168126828
    | Id  | Operation                    | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                        |     4 |   164 |     3   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS                |                        |       |       |            |          |
    |   2 |   NESTED LOOPS               |                        |     4 |   164 |     3   (0)| 00:00:01 |
    |   3 |    INDEX FULL SCAN           | SYS_C009273            |     2 |    34 |     1   (0)| 00:00:01 |
    |*  4 |    INDEX RANGE SCAN          | SYS30366_30367_OID_IDX |     2 |       |     0   (0)| 00:00:01 |
    |   5 |   TABLE ACCESS BY INDEX ROWID| TMP_XML_XTB            |     2 |    48 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - access("TMP_XML"."SYS_NC_OID$"="SYS_SXI_0"."OID")

  • Disco 4i Error 'This user requires Create Any Materialized View Sys Priv'

    Hi,
    Firstly I will say we are late with moving to Disco 10g, fully understood and constantly remind people of need to upgrade.
    Oracle Apps 11i instance, we have upgraded the database 10g.
    In Disco 4i Admin, Import folder from Database, we receive Error Message:
    *'This user requires Create Any Materialized View System Priviledge'*
    Have spoken to number of our DBA's but been unable to resolve this. I have read loads of stuff about similar issues, but no direct hits really help me.
    I am guessing we need to logon as SYSTEM db user and execute
    h5. SQL> grant create materialized view to <username>;
    h5. SQL> grant alter any materialized view to <username>;
    Please can anyone advise, I am sure it's going to be a DB/Schema owner, as the username; i.e. APPS or EUL_US?
    I cannot see it being the fnd_user for the Disco EUL owner, e.g. SYSADMIN or PatStock.
    Thanks
    Mike

    Hi,
    If you are doing the import as SYSADMIN then you are connected as APPS so this is the database user that needs additional privilege.
    However, the APPS user only needs create materialized view privileges if there are manually created summary folders in the EUL, i.e. summary folders based on materialized views. If you are not using these then the privilege is not required.
    The EUL_US user just needs to give Discoverer Administrator privileges to the SYS_ADMIN user. Nothing else should be needed.
    Rod West

  • Problem: Materialized View between Oracle servers w/different CHARACTERSET

    I am trying to create a MATERIALIZED VIEW where the master table is a remote Oracle 8 server with NLS_CHARACTERSET = 'WE8ISO8859P1'. The destination view is an Oracle 10g with NLS_CHARACTERSET = 'AL32UTF8'.
    I am getting error: ORA-12703: this character set conversion is not supported.
    I've tried to use CONVERT on my SELECT statment but according to the error message, CONVERT does not support 'AL32UTF8'.
    I need help. Please!

    First off, I'd strongly suggest reading through Metalink Note 237593.1 Problems connecting to AL32UTF8 databases from older versions (8i and lower).
    There is a good chance that the destination database character set will need to be converted to UTF8 rather than AL32UTF8 (assuming that this isn't going to cause issues with surrogate pairs). You may be able to keep the destination character set unchanged if you install at least the 8.1.7.4 patchset on the source database as well as a hanfddful of different one-off patches, but it looks like you're probably going to need to change the destination character set.
    Justin

  • Create a materialized view on a base view

    I want to create a materialized view on a master view (ordinary view, not a mat. view). But i can not make it work. can it work? I have created a primary key on the master view as:
    create or replace force view v_xxx(a, b)
    unique rely disable novalidate,
    constraint a_pk primary key (a) rely disable novalidate)
    as select a ,b
    from xxx
    When I then try to create the mat. view:
    create materialized view mv_xxx refresh complete
    with primary key
    as
    select * from [email protected]
    I get:
    ORA-12014: table 'V_xxx' does not contain a primary key constraint
    What am I doing wrong?

    I suppose OP is on a 9i db (cause I can't reproduce on 11gr2) and the error is because of the database link:
    SQL> create table emp_t
    as
       select * from emp
    Table created.
    SQL> create or replace view v_emp_t
       empno   constraint v_emp_t_pk primary key rely disable novalidate,
       ename
    as
       select empno, ename from emp_t
    View created.
    SQL> create materialized view mv_emp_t refresh complete
    with primary key
    as
    select * from v_emp_t
    Materialized View created.
    SQL> drop materialized view mv_emp_t
    Materialized View dropped.
    SQL> create materialized view mv_emp_t refresh complete
    with primary key
    as
    select * from v_emp_t@loopback
    Error at line 32
    ORA-12014: table 'V_EMP_T' does not contain a primary key constraintYou can wrap the view with the db link in another view though:
    SQL> create or replace view v_emp_t2
       empno   constraint v_emp_t2_pk primary key rely disable novalidate,
       ename
    as
       select empno, ename from v_emp_t@loopback
    View created.
    SQL> create materialized view mv_emp_t refresh complete
    with primary key
    as
    select * from v_emp_t2
    Materialized View created.

  • Creating a materialized view for another user

    I don't seem to find the correct setup for this....
    With the user "dummy"
    CREATE MATERIALIZED VIEW dummy.thetable BUILD IMMEDIATE REFRESH FORCE ON DEMAND AS select * from real.thetable;
    And the materialized view is created ok.
    With a DBA user:
    CREATE MATERIALIZED VIEW dummy.thetable BUILD IMMEDIATE REFRESH FORCE ON DEMAND AS select * from real.thetable;
    ORA-01031: insufficient privileges
    I don't want to be switching back and forth from the user to create materialized views, am I missing a permission here? DBA of course has create any materialized view

    From the SQL Reference Guide:
    To create a materialized view in another user&#8217;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.
    I suspect that, if you first GRANT CREATE TABLE TO DUMMY, you will be able to create the MV.

  • Creating a materialized view

    I am attempting to create a materialized view to replicate tables with spatial columns to another server. I get to the following statement when I get the error:
    CREATE MATERIALIZED VIEW fedpro.mtr_descr_geometry
    REFRESH FAST WITH PRIMARY KEY FOR UPDATE
    AS SELECT * FROM fedpro.mtr_descr_geometry@fpdev;
    Error:
    AS SELECT * FROM fedpro.mtr_descr_geometry@fpdev
    ERROR at line 3:
    ORA-12008: error in materialized view refresh path
    ORA-00600: internal error code, arguments: [4882], [0x385184210], [0x383F78B60], [0x386CBA9E0], [], [], [], []
    I have created materialized views on non-spatial tables and on a small spatial test table successfully. The tables I am having problems with all have spatial indexes on them (which I have tried dropping and still get the error).
    I am using 9i.
    Thanks.
    Michael Joyce

    Hi,
    The following works. Note, I'm not sure it makes sense (or if you are allowed) to use materialized views as
    a replication mechanism with objects. For instance, I'm not sure it database links are supported with objects.
    Replication is supported with , and might be the better option. In any case, this is what I got to work:
    create table TT (id number primary key, geom mdsys.sdo_geometry);
    create materialized view log on TT
    with
    (GEOM)
    including new values;
    CREATE MATERIALIZED VIEW TT_MVIEW
    REFRESH FAST WITH PRIMARY KEY FOR UPDATE
    AS SELECT * FROM TT;
    insert into user_sdo_geom_metadata values
    ('TT',
    'GEOM',
    mdsys.sdo_dim_array(
    mdsys.sdo_dim_element('X',-180,180,0.05),
    mdsys.sdo_dim_element('Y',-90,90,0.05)),
    8265);
    insert into user_sdo_geom_metadata values
    ('TT_MVIEW',
    'GEOM',
    mdsys.sdo_dim_array(
    mdsys.sdo_dim_element('X',-180,180,0.05),
    mdsys.sdo_dim_element('Y',-90,90,0.05)),
    8265);
    create index TT_SIDX on TT(geom)
    indextype is mdsys.spatial_index;
    create index TT_MVIEW_SIDX on TT_MVIEW(geom)
    indextype is mdsys.spatial_index;
    insert into TT values (1,mdsys.sdo_geometry(2001,8265,
    mdsys.sdo_point_type(-40,125,null),null,null));
    execute DBMS_MVIEW.REFRESH ('TT_MVIEW','F');

  • Creating a Materialized View from different agregate queries

    I want to create a materialized view. The problem is that doing so can get sticky. The view should have one row, with each column representing the return of an aggregate function on the base table. Here is a query that returns this kind of result:
    select
         (select count(rowid) from pasta) "PASTA_ROWS",
         (select count(salt) from pasta where salt='F') "SALT_IS_FEMALE_ROWS"
    from dual;
    You can see that by selecting the subqueries from dual, I get the return to be in seperate columns. The problem is that when I try creating a Materialized view, I get an error.
    ERROR at line 8:
    ORA-22818: subquery expressions not allowed here
    So, is there a simple SQL query that will return the values I am asking for, in seperate columns, but will not make the materialized view produce an error?
    Thanks,
    Edward
    For your reference, here is a describe of the pasta table:
    SQL> desc pasta
    Name Null? Type
    CHEESE NUMBER(4)
    TOMATO VARCHAR2(20)
    SALT VARCHAR2(1)
    OREGANO VARCHAR2(20)
    OLIVE_OIL VARCHAR2(40)

    Edward:
    Something like this should work:
    SELECT COUNT(*) PASTA_ROWS,
           SUM(DECODE(salt,'F',1,0)) SALT_IS_FEMALE_ROWS
    FROM pastaTTFN
    John

  • Recieving ORA-01722 invalid number error while creating a materialized view

    Hi,
    I am receiving a ORA-01722 invalid number error while creating a materialized view. when run the select statement of the view i don't get any error, but when i use the same select statement to create a materialized view i receive this error. Could any please help in resolving this error. Here is the code i am using to create a materialized view.
    CREATE MATERIALIZED VIEW MV_EBS_CH_CLOSED
    REFRESH FORCE ON DEMAND
    AS
    SELECT DISTINCT kr.request_id, org.org_unit_name,
    ebs_ch_ticket_type (kr.request_id) ticket_type,
    DECODE
    (kr.status_code,
    'CLOSED_SUCCESS', kr.last_update_date,
    'IN_PROGRESS', (SELECT MAX (start_time)
    FROM ebs_ch_datastore ecd1
    WHERE kr.request_id = ecd1.request_id
    AND workflow_step_name =
    'Final BA Review and Deployment Exit Criteria')
    ) closed_date,
    substr(krhd.visible_parameter12,1,10) siebel_start_date,
    kr.creation_date itg_start_date
    FROM kcrt_requests kr,
    kcrt_request_types krt,
    kcrt_req_header_details krhd, kcrt_request_details krd1,
    (SELECT koum.user_id user_id,
    DECODE (koup.org_unit_name,
    'IT Implementations', 'CHS - Service Management BA',
    koup.org_unit_name
    ) org_unit_name
    FROM krsc_org_unit_members koum, krsc_org_units koup
    WHERE 1 = 1
    AND 'Y' = koup.enabled_flag
    AND koum.org_unit_id = koup.org_unit_id
    AND EXISTS (
    SELECT 'X'
    FROM krsc_org_units kouc
    WHERE koup.org_unit_id = kouc.org_unit_id
    START WITH kouc.parent_org_unit_id =
    ANY (SELECT org_unit_id
    FROM krsc_org_units krsc_org_units1
    WHERE 'Clearinghouse' =
    org_unit_name)
    CONNECT BY kouc.parent_org_unit_id =
    PRIOR kouc.org_unit_id)
    UNION
    SELECT kou.manager_id user_id,
    DECODE
    (kou.org_unit_name,
    'IT Implementations', 'CHS - Service Management BA',
    kou.org_unit_name
    ) org_unit_name
    FROM krsc_org_units kou
    WHERE 'Y' = kou.enabled_flag
    START WITH kou.parent_org_unit_id =
    (SELECT org_unit_id
    FROM krsc_org_units krsc_org_units2
    WHERE 'Clearinghouse' = org_unit_name)
    CONNECT BY kou.parent_org_unit_id = PRIOR kou.org_unit_id) org
    WHERE krt.request_type_id = kr.request_type_id
    AND krt.request_type_name IN ('Bug Fix', 'IT Enhancement')
    and kr.REQUEST_ID = krd1.request_id
    and krd1.batch_number = 1
    AND kr.request_id = krhd.request_id
    AND org.user_id in (krd1.parameter4, krd1.parameter5, krd1.parameter7)
    AND ( 'CLOSED_SUCCESS' = kr.status_code
    OR 'IN_PROGRESS' = kr.status_code
    AND kr.request_id IN (
    SELECT request_id
    FROM (SELECT DISTINCT request_id,
    MAX
    (start_time)
    closed_date
    FROM ebs_ch_datastore
    WHERE 'Final BA Review and Deployment Exit Criteria' =
    workflow_step_name
    GROUP BY request_id))
    Thanks,
    Shaik Mohiuddin

    This error occurs when you try to create a materialized view , but if you run the sql the results are perfectly fine. Well it happend to me also and to fix this I made sure all the coulmns have the same data type which are used in joins or in where clause.
    use
    where
    to_number(col1)=to_number(col2) and to_number(col3)=to_number(col4)
    hope this helps..

  • ORA-00905: missing keyword error while creating a materialized view

    Hi Gurus,
    I am trying to create a materialized view as :
    1 CREATE MATERIALIZED VIEW AMREG.ClientData
    2 TABLESPACE AMREG_DATA
    3 COMPRESS
    4 PARALLEL
    5 NOLOGGING
    6 BUILD IMMEDIATE
    7 REFRESH COMPLETE
    8 ON DEMAND
    9 DISABLE QUERY REWRITE
    10 REFRESH START WITH TRUNC( SYSDATE + 1 ) + 3/24 NEXT TRUNC( SYSDATE + 1 ) + 3/24
    11 AS
    12 SELECT
    13 CHILD.CLIENT_SGK "Child SGK",
    14 CHILD.CLIENT_NAME "Child Name",
    15 CHILD.ARC_ACCT_CD "Child ARC Acct Code",
    16 ULTIMATE.CLIENT_SGK "Ultimate Parent SGK",
    17 ULTIMATE.CLIENT_NAME "Ultimate Parent Name",
    18 ULTIMATE.ARC_ACCT_CD "Ultimate ARC Acct Code",
    19 HIER.LVL_FROM_ANCESTOR ,
    20 FROM [email protected] CHILD,
    21 [email protected] HIER,
    22 [email protected] ULTIMATE
    23 WHERE HIER.DESCENDANT_CLIENT_SGK = CHILD.CLIENT_SGK
    24* AND ULTIMATE.CLIENT_SGK = HIER.ANCESTOR_CLIENT_SGK;
    SQL> /
    REFRESH START WITH TRUNC( SYSDATE + 1 ) + 3/24 NEXT TRUNC( SYSDATE + 1 ) + 3/24
    ERROR at line 10:
    ORA-00905: missing keyword
    DBLink name is : DNYCPH60.WORLD
    Please guide me on this and help to resolve the issue.

    Ummm how about not posting the same question 4 times in 3 different forums?
    Gints Plivna
    http://www.gplivna.eu

  • Unable to create a Materialized View

    I have this query to generate continous dates for the given number of months (12 in this case).
    (SELECT ADD_MONTHS(TO_DATE('2007-01-01', 'yyyy-mm-dd'), rownum - 1) Transaction_Date_Month
      FROM DUAL
              CONNECT BY level <= 12)I am using this query alongside with another query to get some results. I want to put the whole query what i have in a "Materialized View". But it is not allowing me to create the materialized view becuase of using "rownum". So how can i avoid "rownum" for getting all the dates and also use it in Materialized View.

    Why do you want to create this a materialized view?
    I presume the date changes dynamically somehow otherwise you'd want to use a table
    What is the actual date range you want to use?
    Would you be better off using a materialized subquery using WITH?
    WITH subq_months AS
    (SELECT /*+materialize */ADD_MONTHS(TO_DATE('2007-01-01', 'yyyy-mm-dd'), rownum - 1) Transaction_Date_Month  FROM DUAL          CONNECT BY level <= 12)
    SELECT -- use months here somehow --
    FROM   subq_months

  • Can't update master table when creating a materialized view log.

    Hi all,
    I am facing a very strange issue when trying to update a table on which I have created a materialized view log (to enable downstream fast refresh of MV's). The database I am working on is 10.2.0.4. Here is my issue:
    1. I can successfully update (via merge) a dimension table, call it TABLEA, with 100k updates. However when I create a materialized view log on TABLEA the merge statement hangs (I killed the query after leaving it to run for 8 hrs!). TABLEA has 11m records and has a number of indexes (bitmaps and btree) and constraints on it.
    2. I then create a copy of TABLEA, call it TABLEB and re-created all the indexes and constraints that exist on TABLEA. I created a materialzied view log on TABLEB and ran the same update....the merge completed in under 5min!
    The only difference between TABLEA and TABLEB is that the dimension TABLEA is referenced by a number of FACT tables (by FKs on the FACTS) however this surely should not cause a problem. I don't understand why the merge on TABLEA is not completing...even though it works fine on its copy TABLEB? I have tried rebuilding the indexes on TABLEA but this did not work.
    Any help or ideas on this would be most appreciated.
    Kind Regards
    Mitesh
    email: [email protected]

    Thats what I thought, the MVL will only read data that has changed since it was created and wont have the option to load in all the data as though it was made before the table was created.
    From what I have read, the MVL is quicker than a Trigger and I have some free code that prooved to work from a MVL using it as a reference to know what records to update. There is not that much to a MVL, a record ID and type of update, New, Update or Delete.
    I think what I will have to do is work on a the same principle for the MVL but use a Trigger as this way we can do a full reload if required at any point.
    Many thanks for your help.

Maybe you are looking for

  • Oracle 11g Certification Query

    Hi all, I have given my Oracle 11g exams for OCP certification. Now, i need to take one of the mandatory training to fulfill the requirements for certification. I am in Kuwait and when i select the country as Kuwait, the cheapest training course is o

  • Style standards

    Hi, all, My department is just starting to use Captivate 2, and we're trying to create some internal style standards for creating demos. Things like font type, color, and size, caption box color, how long to leave a caption on screen, stuff like that

  • Best way to upgrade to ff4 rc?

    Hi there, Just realised the way I upgraded may not have been optimal. I made a back-up of my original profile... Then I turfed the app bundle from /applications & dropped the new ff4 app bundle in it's place. I removed the old shortcut from the dock,

  • Emailing links in Analyzer

    Geting an error message when trying to email a report link in Analyzer.<BR>"Mail server localhost does not respond to a mail smtp request."<BR>I set the maiserver in the Analyzer.properties file and a recycled the service, but it looks like it's not

  • Illustrator Memory Error

    The following error occurs when logged into a domain account on a Windows XP workstation and open Illustrator....."The operation cannot complete because there isn't enough memory (RAM) available."  I can open illustrator CS2  as an administrator or a