Re: Oracle 10/11g INVALID objects issue

  • From: Chris Taylor <christopherdtaylor1994@xxxxxxxxx>
  • To: woodwardinformatics@xxxxxxxxxxxxxxxx
  • Date: Thu, 28 Jan 2016 08:19:42 -0600

At compile-time you're not actually storing anything in that variable as
far as I know.  Compile checks syntax and everything syntactically checks
out.  Only at run-time does the variable get set with your defined input.
 (I do understand your being able to see it as a problem, but from a code
point of view, it's not a compile problem).

As for the silent failure, I have no idea why that would occur in your
point (a).

Chris


On Thu, Jan 28, 2016 at 8:12 AM, Michael D O'Shea/Woodward Informatics Ltd <
woodwardinformatics@xxxxxxxxxxxxxxxx> wrote:

Hello Chris, and thank you for your comment.

I understand your point on compile-time vs. run-time however stuffing 11
chars into a 10 char field is (should be) a compile-time error and the
package should be in an INVALID state from the outset. x11 is a CONSTANT.

x11 CONSTANT VARCHAR2(10) := 'abcdefghijk';  --11 characters

This aside, the issues for me are:

a) invocation of doStuff10 does not always result in a run-time error, and
it also doesn't implement the coded logic. This silent-fail behaviour is
terrible.
b) If ALL_OBJECTS.STATUS always returns VALID in these scenarios, I need a
different mechanism to be able to determine whether a package is in a
valid state that implements the coded logic.

The solution just cannot be to write a bit of code to look through all
packages, compile them all with the session altered to PLSQL_WARNINGS =
'ENABLE:ALL' (thanks Matthew), every time some database object is changed.

Surely?

Mike

http://www.strychnine.co.uk


Other related posts: