Solved

Problem refreshing Materialized View

Posted on 2006-06-22
5
1,147 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
5 Comments
 
LVL 14

Expert Comment

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

Accepted Solution

by:
aalapsharma earned 250 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 250 total points
ID: 16977476
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20294556
Forced accept.

Computer101
EE Admin
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

705 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

19 Experts available now in Live!

Get 1:1 Help Now