Solved

how do I configure a materialized view when I want to use the refresh command

Posted on 2009-05-07
1
531 Views
Last Modified: 2013-12-18
I have a materialized view:

CREATE MATERIALIZED VIEW
   BIB_HOLDINGS_MVIEW
AS
    SELECT SITE||'-' ||PDF_NAME as ACCESSION_NUMBER, ID, SITE, PDF_NAME, PDF_EXISTS, TITLE, SUBJECTKEYWORDS, IAC_REPORT_ID, CATEGORY, TYPE, LOCATION, AUTHOR, PUBLISHER, PUBLICATION_DATE, COPIES, CLASSIFICATION, ORG_PERFORMING, SECONDARY_DIST, ORG_MONITORING, ABSTRACT, ABSTRACT2, NUM_PAGES, COMMENTS, ENTERED_BY, COPYRIGHT_EXISTS, DISTRIBUTION_CODE, COPYRIGHT_INFO, SUPPLEMENTARY_NOTES, MODIFIED_DATE, HIERARCHY_1, HIERARCHY_2, HIERARCHY_3, HIERARCHY_4, HIERARCHY_5, HIERARCHY_6, CONTRACT_GRANT_ID, AD_ID, PERFORMING_REPORT_ID, MONITOR_REPORT_ID, PURCHASE_PRICE, PURCHASE_INFO, FILE_NAME, EXPORT_CONTROL, FOR_PAY, OTHER_CLASSIFICATION_MARKINGS, EXTRA_TEXT_FIELD1, EXTRA_TEXT_FIELD2, EXTRA_TEXT_FIELD3, EXTRA_TEXT_FIELD4, EXTRA_TEXT_FIELD5, EXTRA_DATE_FIELD1, EXTRA_DATE_FIELD2, EXTRA_NUMBER_FIELD1, EXTRA_NUMBER_FIELD2 from bib_holdings where site in ('AMMTIAC','CBIAC','CPIA', 'DACS','HSIAC','IATAC', 'MSIAC', 'RIAC','SENSIAC','SURVIAC','WSTIAC');

The client wants to control when a refresh is done on it. by using this command in a unix cron job execute DBMS_MVIEW.REFRESH('tems_adm.BIB_HOLDINGS_MVIEW','F');

How should I word the materialized view so that it will allow for this command to succeed?
CREATE MATERIALIZED VIEW
   BIB_HOLDINGS_MVIEW
AS
    SELECT SITE||'-' ||PDF_NAME as ACCESSION_NUMBER, ID, SITE, PDF_NAME, PDF_EXISTS, TITLE, SUBJECTKEYWORDS, IAC_REPORT_ID, CATEGORY, TYPE, LOCATION, AUTHOR, PUBLISHER, PUBLICATION_DATE, COPIES, CLASSIFICATION, ORG_PERFORMING, SECONDARY_DIST, ORG_MONITORING, ABSTRACT, ABSTRACT2, NUM_PAGES, COMMENTS, ENTERED_BY, COPYRIGHT_EXISTS, DISTRIBUTION_CODE, COPYRIGHT_INFO, SUPPLEMENTARY_NOTES, MODIFIED_DATE, HIERARCHY_1, HIERARCHY_2, HIERARCHY_3, HIERARCHY_4, HIERARCHY_5, HIERARCHY_6, CONTRACT_GRANT_ID, AD_ID, PERFORMING_REPORT_ID, MONITOR_REPORT_ID, PURCHASE_PRICE, PURCHASE_INFO, FILE_NAME, EXPORT_CONTROL, FOR_PAY, OTHER_CLASSIFICATION_MARKINGS, EXTRA_TEXT_FIELD1, EXTRA_TEXT_FIELD2, EXTRA_TEXT_FIELD3, EXTRA_TEXT_FIELD4, EXTRA_TEXT_FIELD5, EXTRA_DATE_FIELD1, EXTRA_DATE_FIELD2, EXTRA_NUMBER_FIELD1, EXTRA_NUMBER_FIELD2 from bib_holdings where site in ('AMMTIAC','CBIAC','CPIA', 'DACS','HSIAC','IATAC', 'MSIAC', 'RIAC','SENSIAC','SURVIAC','WSTIAC');

Open in new window

0
Comment
Question by:sikyala
1 Comment
 
LVL 20

Accepted Solution

by:
gatorvip earned 500 total points
ID: 24329916
create materialized view
...
REFRESH ON DEMAND
...
as
...


see here:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6002.htm#i2106785
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now