Solved

How to avoid ORA-04068, but still update materialized view that is used in a procedure?

Posted on 2011-03-17
4
680 Views
Last Modified: 2013-12-07
I need to update/refresh a materialized view that is the basis for records processed by a procedure. Any way to do this in PL/SQL?
0
Comment
Question by:FredTbay
  • 2
  • 2
4 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 35161048
You can't avoid it,  if you modify a plsql object, either explicity or implicitly (by modifying objects it's dependent on) then that object will need to be recompiled.
Upgrading to 11g will help because it does finer grained dependencies but if procedure is dependent on an object then you will encounter 4068's if you try to use it across ddl changes.

A simple refresh of data shouldn't cause any invalidations though
0
 

Accepted Solution

by:
FredTbay earned 0 total points
ID: 35166193
I guess that I was hoping that there was a way to do this in one process. I have an external VB program that calls on the procedure, I'll just have to have it call a separate procedure that makes the changes to the materialized view (I actually change a filter in the materialized view (drop/create), not just refresh), then call the procedure that uses the changed view.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 35169799
if you don't have further info request, I suggest deleting the question rather than closing it
0
 

Author Closing Comment

by:FredTbay
ID: 35196662
It's not very elegant, but it'll work.
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
Alternative to GTT for a temp table for further reuse in Oracle 8 35
SQL Syntax 14 35
Read XML values 8 42
oracle collections 2 22
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
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.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

828 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