ORA-12052, unable to establish a quick refresh materialized view solution

Source: Internet
Author: User
Tags vcard

ORA-12052, unable to establish a quick refresh materialized view solution

Sql> CREATE materialized VIEW mv_vcard_last_hlrlist refresh fast as
Select Vcard.username,
Vcard.nick_name,vcard.pcode,hlrlist.region,
Vcard.birth_year, Vcard.icon, VCARD.DESCR, Last.state,
vcard. Hlr_city, vcard. Birth_month, vcard. Birth_day
From Hlrlist, last, vcard
where vcard.username = last.username and vcard.hlr_city = hlrlist.hlr_id
and Vcard.status = 0 and last.state= ' Online ';
2 3 4 5 6 7 8 and vcard.status = 0 and last.state= ' Online '
*
ERROR at line 8:
Ora-12052:cannot Fast Refresh materialized view IMPS. Mv_vcard_last_hlrlist

Begin
Dbms_mview. Explain_mview (' Select Vcard.username,vcard.nick_name,vcard.pcode,hlrlist.region,vcard.birth_year, Vcard.icon, VCARD.DESCR, Last.state,vcard. Hlr_city, vcard. Birth_month, vcard. Birth_day from Hlrlist, last, vcard where vcard.username = last.username and vcard.hlr_city = hlrlist.hlr_id ');
End;


SELECT Capability_name, POSSIBLE, MsgTxt
From mv_capabilities_table
WHERE capability_name like ' refresh% ';

Capability_name P
------------------------------ -
MsgTxt
--------------------------------------------------------------------------------
Refresh_complete Y


Refresh_fast N


Refresh_fast_after_insert N
The SELECT list does not have the rowids of all detail tables


Capability_name P
------------------------------ -
MsgTxt
--------------------------------------------------------------------------------
Refresh_fast_after_onetab_dml N
The reason why Refresh_fast_after_insert is disabled

Refresh_fast_after_any_dml N
The reason why REFRESH_FAST_AFTER_ONETAB_DML is disabled

refresh_fast_pct N
The PCT is isn't possible on any of the detail tables in the materialized view


The discovery was due to the absence of rowid of the various tables

Then read:

CREATE materialized VIEW mv_vcard_last_hlrlist refresh fast as
Select Hlrlist.rowid arowid,last.rowid browid,vcard.rowid crowid, Vcard.username,
Vcard.nick_name,vcard.pcode,hlrlist.region,
Vcard.birth_year, Vcard.icon, VCARD.DESCR, Last.state,
vcard. Hlr_city, vcard. Birth_month, vcard. Birth_day
From Hlrlist, last, vcard
where vcard.username = last.username and vcard.hlr_city = hlrlist.hlr_id and last.state= ' Online ';

Successfully established the materialized view

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.