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