Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems with Fast Refresh MV

User_KA0M1Nov 16 2016 — edited Nov 16 2016

Hi everyone,

I'm trying to create my first fast refresh materialized view but I'm getting an error.  First I created the MV log:

create materialized view log on fsadm.ps_bi_acct_entry with primary key;

Then I created the MV:

CREATE MATERIALIZED VIEW ps_bi_acct_entry_mv

build deferred

REFRESH force

ON DEMAND

with primary key

AS

select  'BI' SOURCE,

         bi.business_unit_gl,

         bi.business_unit

from fsadm.ps_bi_acct_entry bi

         where bi.fiscal_year >=2014

GROUP BY bi.business_unit_gl,

bi.business_unit;

I can do a complete refresh successfully but when I try a fast refresh, it errors;

>> BEGIN

  DBMS_SNAPSHOT.REFRESH(

    LIST                 => 'FSADM.PS_BI_ACCT_ENTRY_MV'

   ,METHOD               => 'F');

END;

Error at line 2

ORA-12032: cannot use rowid column from materialized view log on "FSADM"."PS_BI_ACCT_ENTRY"

ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2821

ORA-06512: at "SYS.DBMS_SNAPSHOT", line 3058

ORA-06512: at "SYS.DBMS_SNAPSHOT", line 3017

ORA-06512: at line 2

Any ideas what I'm doing wrong?  The MV log was created with primary key and not rowid.

Thanks!

Sharon

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2016
Added on Nov 16 2016
13 comments
1,444 views