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

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?
FredTbayAsked:
Who is Participating?
 
FredTbayConnect With a Mentor Author Commented:
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
 
sdstuberCommented:
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
 
sdstuberCommented:
if you don't have further info request, I suggest deleting the question rather than closing it
0
 
FredTbayAuthor Commented:
It's not very elegant, but it'll work.
0
All Courses

From novice to tech pro — start learning today.