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?
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.
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
if you don't have further info request, I suggest deleting the question rather than closing it
FredTbayAuthor Commented:
It's not very elegant, but it'll work.
All Courses

From novice to tech pro — start learning today.