Extending a material view in Material Master

Hi
I have created a Material without a sales view.Now I wnt to add sales view in the existing Material Master. How to do this.
Regards
venkat

Hi Garapati,
Pleas read the answers of experts.
You have to use MM01 (create) transaction if you want to extend your material master record since you create new records in material master tables.
So you have to use MM01 if you create a brand new mmr and you have to use the same if you want to extend your mmr.
BR
Csaba

Similar Messages

  • MATERIALIZED VIEW and MATERIALIZED VIEW LOG

    Hello,
    I have the following table
    create table My_price
    (price_id number(10),
    product_id number(10),
    price_date date,
    price_value number(10,2));
    I want to create the following materialized view
    create materialized view Last_Price_Date
    refresh
    on commit complete
    as
    select max(price_date) as max_date, product_id from my_price group by product_id;
    Do I have to create materialized view log ? Will my materialized view be refresh on commit without materialized view log ?

    As a student the requisite first task is always to study. Thus your assignment is to go to http://tahiti.oracle.com and read the concept and architecture docs on Materialized Views so that you can learn about the different types of MVs and how and when they are refreshed. There you will learn about what ON COMMIT means.
    Then please turn your "I want to create" into an "I created it." Then, having read the docs, you will be able to observe how your MV behaves.
    PS: Your SELECT statement is not syntactically correct. Start by fixing it so that it works in SQL*Plus.

  • Question on materialized view unregistered on master site

    Hi
    not sure how it is known, on master site, about the existence of an materialized view on another site referring some table of a master site. it seems registering is not necessary.
    on master site orcl1 : I have a table A, and a materialized view log defined on table A.
    on another site orcl2 : have a db link to orcl1 and a fast refreshable materialized view SCOTT.A_MVW (create materialized view A_MVW refresh fast as select * from A@orcl1)
    on orcl1 I perform : exec DBMS_MVIEW.UNREGISTER_MVIEW (mviewowner => 'SCOTT' ,mviewname => 'A_MVW' ,mviewsite => 'ORCL2');
    as a result the materialized view seems to be successfully unregistered (as it doesn't appear anymore in : select * from DBA_REGISTERED_MVIEWS; )
    But, to my surprise, I can still perform fast refreshes on A_MVW, which also remove lines from the materialized view log . so how is site orcl1 still aware about the existence of the materialized view ?
    it seems that, registered or not at master site, a materialized view behaves the same...or it doesn't ? where is it stored , on master site, information about materialized views (especially those fast refreshable) that reffer local tables ?
    Thank you

    The view allows the Administrator at the Master (Source) site to see information about MVs in remote databases that are querying his/her database.
    A database in Singapore may be administered by DBA "Hemant" . This database may have built (with appropriate permissions !!!) an MV that queries table(s) in a database in London managed by "Alex". Alex can query DBA_REGISTERED_MVIEWS in his (London) database to see that a remote MV is referencing tables locally.
    Why would "Alex" UNREGISTER the MV ? There's no real need to. Unless the information needs to be "hidden" from, say, an Outsource DBA who will be taking "Alex"'s place ! (just kidding !)
    Hemant K Chitale

  • Creation of Materialized view and Materialized view log.

    I wanted to create materialized view with 'REFRESH FAST ON COMMIT' option.
    1) Table1 --it is partitioned range + list -- Added primary key
    2) view1   -- having primary keys on view's base table
    Steps:
    1) create materialized view log on Table1 ; -- default primary key
    2) create materialized view log on view1.  --- It is giving below error.
    ORA-00942: table or view does not exist
    i wanted to create Materialized view like below
    create materialized view
    REFRESH fast ON commit
    as
    select ...
    ... from table1
    where c1 in (select c1 from view1 where ... );
    Question:
    1) As i am getting above error while creating MV log on view. Can we create MV log on view or we have to create MV log on view base table?
    2) To create MV with ''REFRESH FAST ON COMMIT' option , do we need to have primary key on master tables? 
    Any pointers on this will really helpful.
    Thanks
    Prasad

    Also created MV LOG on 3 tables and tried with joins ..
    create materialized view
    REFRESH fast ON commit
    as
    select ...
    ... from table1 , tab2 t2,tab3 t3
    where ....
    and ...
    Get same error ORA-12052: cannot fast refresh materialized view AVSYS.EVENT_LOG_MV
    2052. 00000 -  "cannot fast refresh materialized view %s.%s"
    *Cause:    Either ROWIDs of certain tables were missing in the definition or
               the inner table of an outer join did not have UNIQUE constraints on
               join columns.
    *Action:   Specify the FORCE or COMPLETE option. If this error is got
               during creation, the materialized view definition may have be
               changed. Refer to the documentation on materialized views.

  • Query on Materialized view and materialized view log

    I am creating a materialized view something like this.but getting following error:
    ERROR at line 1:
    ORA-12032: cannot use rowid column from materialized view log on "SCOTT"."EMP"
    SQL> create snapshot log on scott.emp;
    Materialized view log created.
    SQL> create materialized view scott_emp refresh fast on demand as select deptno,sum(sal) sum_sal from scott.emp group by deptno;
    ERROR at line 1:
    ORA-12032: cannot use rowid column from materialized view log on "SCOTT"."EMP"
    Note when i have my query in materialized view as "select * from emp;" in place of
    "select deptno,sum(sal) sum_sal from scott.emp group by deptno;" This code works fine.
    How do i have a materialized with with a group by clause.
    Thanks in Advance

    Got the answer myself.
    I wasnt adding all the required columns.
    CREATE MATERIALIZED VIEW LOG ON scott.emp
    WITH SEQUENCE, ROWID (<all the required columns>)
    INCLUDING NEW VALUES;
    Anyways,
    Thanks guys...

  • [help]why data on table (master ) different  from materialized view(slave)?

    We have had Oracle RAC 2 Groups (master and slave).
    We have created materialized from slave to master. and I have created materialized view log on master .
    When slave group job is broken a long time(12 Hrs). We refreshed job and runned job id.
    But I have found database on materialized view (slave) different from TABLE on master group. (m$log =0row)
    Please tell me how can we resolve Or because that problem is m$log

    Yes I do have a unique identifier on each record in the base table and therefore also in the MV.
    So now the Downstream application has to update some of its own database tables based on what is in the MV that I provide - just so I understand how would that work e.g.:
    1. MV gets refreshed from my base table every minute
    2. Some records are newly inserted and some simply updated
    and this is the part I don't understand (I might be missing something obvious)....
    3. Downstream application interrogates the MV every (say 1-2 minutes) and updates its own tables based on the data there.....but let's say MV contains 10,000 records and in the last minute 100 of those records have been updated and another 100 inserted - how will it know the 200 records it needs to pull?
    Thanks again

  • Materialized View to external dB

    I want to create a materialized view in 8.1.6 from an external dB (MS Access)using the Generic data access (Generic OTG), but cannot find documentation that tells me how to use the Generic OTG. The MS Access data can not be permanently brought into Oracle since it is part of another application, but is needed in Oracle for further analysis. Where is the documentation for the Generic OTG?

    Hi,
    Materialized views are schema objects that can be used to summarize, compute, replicate, and distribute data. They are suitable in various computing environments such as data warehousing, decision support, and distributed or mobile computing:
    In distributed environments, materialized views are used to replicate data at distributed sites and synchronize updates done at several sites with conflict resolution methods. The materialized views as replicas provide local access to data that otherwise has to be accessed from remote sites.
    Materialized views are similar to indexes in several ways:
    They consume storage space.
    They must be refreshed when the data in their master tables changes.
    They improve the performance of SQL execution when they are used for query rewrites.
    Their existence is transparent to SQL applications and users.
    Unlike indexes, materialized views can be accessed directly using a SELECT statement. Depending on the types of refresh that are required, they can also be accessed directly in an INSERT, UPDATE, or DELETE statement.
    A materialized view can be partitioned. You can define a materialized view on a partitioned table and one or more indexes on the materialized view
    A materialized view contains a complete or partial copy of a target master from a single point in time. The target master can be either a master table at a master site or a master materialized view at a materialized view site. A master materialized view is a materialized view that functions as a master for another materialized view. A multitier materialized view is one that is based on another materialized view, instead of on a master table.
    It requires lot of experience thats it.
    Regards
    vinod

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

  • What's the impact of rowid materialized view in oracle 10g

    Hello to all ;
    Oracle official  docs  saying
    ROWID materialized views should be used only for materialized views based on master tables from an Oracle7 database, and should not be used from Oracle8 or higher.
    For 10g or higher versions can we consider rowid materizlized view ?
    product 10.2.0.4 and 11g r2 on Redhat 5.1

    No
    should not be used from Oracle8 or higher10g is higher

  • Regarding Error in Materialized view Fast Refresh

    ORA-12015: cannot create a fast refresh materialized view from a complex query
    CREATE MATERIALIZED VIEW MVCONTENTHISTORY_01
    BUILD IMMEDIATE
    REFRESH FAST
    WITH PRIMARY KEY
    ENABLE QUERY REWRITE
    AS
    SELECT a.DAY, a.contentname,
    SUM
    (CASE
    WHEN (b.subscriptionstartdate) <= (a.DAY)
    AND ((CASE
    WHEN b.subscriptionenddate IS NOT NULL
    THEN (a.DAY)
    ELSE TO_DATE ('01/20/1990', 'MM/DD/YYYY')
    END
    ) <=
    (CASE
    WHEN b.subscriptionenddate IS NOT NULL
    THEN (b.subscriptionenddate)
    ELSE TO_DATE ('01/20/1990', 'MM/DD/YYYY')
    END
    THEN 1
    ELSE 0
    END
    ) COUNT,
    COUNT
    (CASE
    WHEN (b.subscriptionstartdate) <= (a.DAY)
    AND ((CASE
    WHEN b.subscriptionenddate IS NOT NULL
    THEN (a.DAY)
    ELSE TO_DATE ('01/20/1990', 'MM/DD/YYYY')
    END
    ) <=
    (CASE
    WHEN b.subscriptionenddate IS NOT NULL
    THEN (b.subscriptionenddate)
    ELSE TO_DATE ('01/20/1990', 'MM/DD/YYYY')
    END
    THEN 1
    ELSE 0
    END
    ) cnt
    FROM TBLTDATEWISECONTENT a,
    (SELECT TRUNC (a.subscriptionstartdate) subscriptionstartdate,
    TRUNC (a.subscriptionenddate) subscriptionenddate, b.NAME,
    b.contentid
    FROM syntbltcontentsubscrhistory a, syntblmcontent b
    WHERE b.contentid = a.contentid(+)) b
    WHERE a.contentid = b.contentid(+) AND a.DAY = b.subscriptionstartdate(+)
    GROUP BY a.contentname, a.DAY;
    I can't create Materialized view with fast Refresh .
    Kindly provide solution .
    Regards,
    nayana chavda.

    Kindly provide full Oracle version since option vary by release.
    There error message says it is impossible to fast refresh based on a complex query.
    On 10g Oracle provides a package procedure that will tell you why the view cannot be fast refreshed: dbms_mview.explain_mview.
    Otherwise see the Advanced Replication Manual for a list of restrictions.
    10gR2 >>Restrictions for Materialized Views with Subqueries
    The defining query of a materialized view with a subquery is subject to several restrictions to preserve the materialized view's fast refresh capability.
    The following are restrictions for fast refresh materialized views with subqueries:
    Materialized views must be primary key materialized views.
    The master's materialized view log must include certain columns referenced in the subquery. For information about which columns must be included, see "Logging Columns in the Materialized View Log".
    If the subquery is many to many or one to many, join columns that are not part of a primary key must be included in the materialized view log of the master. This restriction does not apply to many to one subqueries.
    The subquery must be a positive subquery. For example, you can use the EXISTS condition, but not the NOT EXISTS condition.
    The subquery must use EXISTS to connect each nested level (IN is not allowed).
    Each table can be in only one EXISTS expression.
    The join expression must use exact match or equality comparisons (that is, equi-joins).
    Each table can be joined only once within the subquery.
    A primary key must exist for each table at each nested level.
    Each nested level can only reference the table in the level above it.
    Subqueries can include AND conditions, but each OR condition can only reference columns contained within one row. Multiple OR conditions within a subquery can be connected with an AND condition.
    All tables referenced in a subquery must reside in the same master site or master materialized view site.
    <<
    HTH -- Mark D Powell --
    Message was edited by: added list of restrictions left off initial post
    mpowel01

  • ORA-12008: error in materialized view refresh path... Bug?

    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> drop materialized view log on test_tbl;
    Materialized view log dropped.
    SQL> drop materialized view mv_test_tbl;
    Materialized view dropped.
    SQL> drop table test_tbl;
    Table dropped.
    SQL> create table test_tbl(
      2   test_id   number(10)   primary key,
      3   test_name varchar2(10) not null)
      4  ;
    Table created.
    SQL> insert into test_tbl values (1,'bob');
    1 row created.
    SQL> insert into test_tbl values (2,'joe');
    1 row created.
    SQL> insert into test_tbl values (3,'john');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> create materialized view log on test_tbl
      2  with primary key , rowid, sequence
      3  (
      4   test_name
      5  )
      6  including new values;
    Materialized view log created.
    SQL> create materialized view mv_test_tbl
      2  refresh fast on commit
      3  as
      4  select test_id,
      5         test_name
      6  from   test_tbl;
    Materialized view created.
    SQL> update test_tbl set test_name = 'hello' where test_id = 1000;
    0 rows updated.
    SQL> commit;
    Commit complete.Ok, so that's all good. Now if I create the materialized view log with the COMMIT SCN option:
    SQL> drop materialized view log on test_tbl;
    Materialized view log dropped.
    SQL> drop materialized view mv_test_tbl;
    Materialized view dropped.
    SQL> create materialized view log on test_tbl
      2  with primary key , rowid, sequence
      3  (
      4   test_name
      5  ),
      6  commit scn
      7  including new values;
    Materialized view log created.
    SQL> create materialized view mv_test_tbl
      2  refresh fast on commit
      3  as
      4  select test_id,
      5         test_name
      6  from   test_tbl;
    Materialized view created.
    SQL> update test_tbl set test_name = 'hello' where test_id = 1000;
    0 rows updated.
    SQL> commit;
    commit
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-01006: bind variable does not exist
    SQL>Committing an update that updates no rows against a master table for a single table fast refreshable materialized view results in the error above when the materialized view log on the master table is created with the COMMIT SCN option. I'm guessing that this isn't how things are supposed to work. Or am I missing something here? Anyone else encountered this before?
    Cheers.
    Edited by: Stain on Jan 25, 2013 1:27 PM

    Query Rewrite is an option for a Materialized View, not a Materialized View Log. Also, query rewrite is used as an optimization technique which "transforms a SQL statement expressed in terms of tables or views into a statement accessing one or more materialized views that are defined on the detail tables". I don't think it plays any role in the refresh path.
    Regardless, it made no difference.
    SQL> create materialized view mv_test_tbl
      2  refresh fast on commit
      3  ENABLE QUERY REWRITE
      4  as
      5  select test_id,
      6         test_name
      7  from   test_tbl
      8  ;
    Materialized view created.
    SQL> update test_tbl set test_name = 'hello' where test_id = 1000;
    0 rows updated.
    SQL> commit;
    commit
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-01006: bind variable does not exist
    SQL>Edited by: Stain on Jan 25, 2013 2:06 PM

  • Materialized View - Point in time refresh

    I have a MV group which refreshes from a bunch of master tables. The master tables are constantly getting updated from an OLTP application. In this scenario, I want all the MVs to hold data which was available at the time the refresh started and not the changes after that.
    Eg:
    Master tables are T1, T2 ... T20 refresh to MVs T1_MV, T2_MV ...T20_MV
    All the MVs T1_MV to T20_MV are in a refresh group.
    At 3 PM: Execute an explicit refresh for the MV refresh group
    At 3:05 PM: OLTP application inserts a record into table T5 & commits
    At 3:06 PM (rather any time after 3:05 PM): Refresh of T5_MV happens. Will the latest insert get captured in T5_MV? I actually don't want this to happen for my requirement, because I want the data captured as of 3 PM into the MVs.
    The Oracle Advanced Replication guide says the following about Materialized Views -
    +"A materialized view is a replica of a target master from a single point in time."+
    From the above line, it looks like by default this will not be captured in the MV. Can someone please confirm my understanding ?

    MVs in a Refresh Group when refreshed as a Refresh Group are refreshed as of the same point in time.
    So if the Refresh Group begins at 3:00pm and ends at 3:25pm, all the MVs in that group reflect the data as in the source tables as of 3:00pm, ignoring any updates to source tables after 3:00pm (i.e. while the Group is being refreshed).
    However, if you refresh MVs individually, then each MV is refreshed at it's relative point in time -- so individual Refreshs of MVs would not be to the same point in time.
    How have you defined the Refresh Group ?
    How do you execute the Refresh for the whole Group ? What PLSQL procedure do you use ? What parameters do you use ?
    Ensure that you do not execute an individual MV Refresh.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • MS - contention with empty materialized view on demand - 10.2.0.4

    Could somebody explain what is MS - contention? I've searched everywhere and got just that it is used to setup materialized view log. I need more deeper explanation. Why is it needed? And the main thing - I have this materialized view:
    CREATE MATERIALIZED VIEW "CLIENT_MV"
    ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    BUILD IMMEDIATE
    USING INDEX
    REFRESH FAST ON DEMAND
    WITH PRIMARY KEY USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE
    AS SELECT CLIENT_ID FROM CLIENT WHERE 1=0
    And mlog on it. What activity can cause MS-contention on it? I tried concurrent updates on a master table, refreshed it at the same time, but can't get contention. May be it is important that I saw this contention in v$active_history view
    Edited by: user6895786 on 26.02.2010 6:11

    user626582 wrote:
    Hi all
    I have trouble on a 10.2.0.4. All Users have lost their Passwords, that means that the column password in the view dba_users is empty an Users can't login anymore.
    I didn't found a logfile or something else. Have you got an idea ? Profiles eg ?
    Thanks for your help.What is the error that the users are getting, invalid user name and password, is it? Did you do any recent patching of your system/db? I would suggest that you raise an SR with oracle as it would highly descreuctive to play with base tables on your own.
    HTH
    Aman....

  • Materialized View and Redo Information

    Hi!!
    I have created a materialized view with fast refresh. I have created a materialized view log on master table with NOLOGING. My view is refresh every 3 seconds but My problem is that my archivelogs is now growing so much!!!
    Please, How I avoid that redo information increasing so much?
    Thank you,
    Roxana.

    I want to show on line some tables of my database,
    because I have created materialized view every 3
    seconds on test enviroment. I'm not sure I follow exactly what you're saying here.
    - Are you sure that you need materialized views here? And not just a regular view? If you need to display the data online and you need a lag of no more than three seconds, is there some reason that you're not using a regular old view? Are you doing some significant aggregation of the data?
    - Are you sure that you need the materialized views to refresh every 3 seconds? And not on some longer interval?
    - If you're looking for near real-time data replication, you may be better served by using Streams rather than materialized views.
    When I use stand by database, I have to replica my
    full database???.- I'm assuming this is a completely separate question with no relation to the previous section.
    - Yes, DataGuard (physical or logical) would create and maintain a copy of your existing database on a separate server in order to fail over in the event of a disaster or to be a reporting server.
    Justin

  • Materialized view refresh is very slow in production

    Hi,
    I am using Oracle 10.2.0.4.0 version and facing problem in Materialized view refresh in production.
    There is a set of Materialized views (15 Mviews) are refreshed through refresh group in production every week or adhoc basis. And for refreshing it is taking 5hrs. I have refreshed the same set of Materialized views multiple times in development environment through refresh group but it got refreshed within 3min. The structure of materialized base tables, type of materialized view refresh, materialized definition and volume of base tables are same between development and production. The production disk space also larger than development. But I am not sure why in production the refresh is very slow compare to development. As this is very critical can some one help on this?
    Thanks is advance.
    - Gopinath.

    Is it fast refresh Mviews? If yes, then check size of materialized view logs. Also check is any other mviews registered on those tables and not refreshing.
    select log_owner, master, log_table, REFRESH_method, version,
           owner, name as ragistered_snapshot, snapshot_site, current_snapshots last_refresh_time, sl.snapshot_id
    from dba_snapshot_logs sl,
         dba_registered_snapshots rs
    where sl.snapshot_id = rs.snapshot_id (+)
    order by 1,2,3 
    ;

Maybe you are looking for

  • How to Verify digital signature in ABAP web dynpro enviroment

    Hi, I have few questions regarding, how we can Verify digital signature in ABAP WebDynpro ? Do we have class or function modules to verify digital signature on WAS once signed offline or online interactive form is uploaded back? can we use function m

  • SAP ECC 6.0 installion issue

    Hi all, I am installing SAP ECC 6.0 on a three tier platform. I have already installed the SCS instance on host 1. I need to install the DB on Host 2 via u201Csapserver.cmdu201D. Now I am the DB instillation from the SAP selection menu and unfortunat

  • FICA: Accountpayable  process and withholding tax.

    Hi, It will be appreciated if any one give me some  information how AP works in FICA  and  particularly how with holding tax is deducted from AP in FICA. REgards, SA.

  • FIND DELETED REQUEST LOG

    dear all how to find deleted request log

  • IMovie 11 DV video import quality

    I have a lot of VHS and mini DV tapes I want to convert to digital to preserve them. I have been frustrated with PC issues for the past 15 years and I just made the switch from PC to Mac. All I have ever heard about is the quality of video editing ca