Solved

Problem refreshing Materialized View

Posted on 2006-06-22
5
1,149 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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
EXECUTE IMMEDIATE 5 69
database upgrade 8 73
Oracle Listener Not Starting 11 44
Not able to drop or recreate an Oracle stored procedure 1 30
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
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 how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

776 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