Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: invalid packages

Re: invalid packages

From: Jim Baiter <nospam_at_allowed.com>
Date: 1997/07/22
Message-ID: <33D51F58.6947@allowed.com>#1/1

There is a package Oracle provides called DBMS_UTILITY which has a routine called ALTER_SCHEMA. You can say in SQL*PLUS: exec dbms_utility.compile_schema('<SCHEMANAME>") This will accomplish what he is describing below.

Tomm Carr wrote:
>
> Stefan Keller wrote:
> >
> > if I make changes in the structure of a table, and PL/SQL-Function
> > reads this table, the function gets the status ‘invalid’.
> > Does a package contain this function, the whole package is ‘invalid’.
> > In this case other functions in the same package are invalid.
> > What can I do or do I have to recompile the packages always when I
> > make changes on one of those tables?
>
> It is not difficult to create a script that searches the data dictionary
> for all stored procedures and packages that are marked INVALID and then
> performs an ALTER...RECOMPILE on them. You can then run this any time
> you do any DDL.
>
> Now that I mention it, with all the packages we have around here, I'm
> surprised we don't have one already. Well, not really -- our DB is
> pretty old and static. However, it still sounds like a good utility to
> have around.
>
> I'll play around with it and see what I can come up with. Or if someone
> already has one (or knows why my tentative idea wouldn't work or has a
> better idea), please let me know.
>
> --
> Tomm Carr
> --
> "Can you describe your assailant?"
> "No problem, Officer. That's exactly what I was doing when he hit me!"
  Received on Tue Jul 22 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US