?
Solved

Problem refreshing Materialized View

Posted on 2006-06-22
5
Medium Priority
?
1,162 Views
Last Modified: 2008-01-09
I have two schemas A and B within one database.  I have private synonyms in schema B for all the tables in schema A.  I have procedure in schema B which creates the Materialized view with full referesh.  This materialized view uses these private synonyms.  It has five queries with union.   When I execute this procedure in schema B, it just hangs.  Also, my DBA does not see any activity on database level.  When the DBA runs it on the server, his session also hangs.  When I run these queries individually, it works fine.  

Any suggestions??
0
Comment
Question by:dnabatra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 14

Expert Comment

by:sathyagiri
ID: 16965399
Please could you post the queries?
0
 
LVL 3

Accepted Solution

by:
aalapsharma earned 1000 total points
ID: 16966438
Use the following parameters while creating the MV:

NOPARALLEL
NOLOGGING
BUILD DEFERRED

Example:

Create materialized view <MV_Name>
NOPARALLEL
NOLOGGING
BUILD DEFERRED
REFRESH COMPLETE
as
(
Your query goes here
);

This will create the MV without populating the data.

Then you can manually refresh the MV using the "dbms_mview.refresh" procedure

Regards,
Aalap
0
 
LVL 16

Assisted Solution

by:MohanKNair
MohanKNair earned 1000 total points
ID: 16977476
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20294556
Forced accept.

Computer101
EE Admin
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

764 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