Re: Apache::DBI and altered packages

2000-12-22 Thread jared still


Geoff,

I'm going to make a non-technical suggestion:  You need to have  
change control implemented so that packages in your database
are not changing during business hours.

If you are 24x7, then you need to schedule an outage, and notify
your customers of scheduled downtime.

This is more of a management and logistics problem than a Perl
or Apache or Oracle problem

On Fri, 22 Dec 2000, Geoffrey Young wrote:

> I was wondering if anyone has found a good way around persistent connections
> and package recompiles.  With Apache::DBI, on occasion when someone
> recompiles a package and doesn't tell me, I see
> 
> ORA-04061: existing state of package body "FOO.BAR" has been invalidated
> ORA-04065: not executed, altered or dropped package body "FOO.BAR"
> ORA-06508: PL/SQL: could not find program unit being called
> 
> my Oracle gurus here tell me that whenever a package changes any open
> connections will get this error.  Since the connection itself ok (just not
> the stuff I need to use) the only solution currently available seems to be
> $r->child_terminate() so that at least that child doesn't barf every time.
> However, this leaves the current request in a lurch...
> 
> I was thinking that maybe something like Apache::DBI::reconnect() was needed
> - call DBI->disconnect then DBI->connect again.
> 
> that is unless someone has dealt with this in another way - someone
> mentioned that perhaps the proper ALTER OBJECT permissions would force a
> recompile - I dunno...
> 
> --Geoff

Jared Still
Certified Oracle DBA and Part Time Perl Evangelist ;)
[EMAIL PROTECTED]
[EMAIL PROTECTED]




RE: Apache::DBI and altered packages

2000-12-22 Thread Paul G. Weiss

So how exactly would you "check" a package.  Would you 
have to call a stored procedure in the package?  Or 
would merely accessing a package variable be enough?

-Paul

> -Original Message-
> From: Geoffrey Young [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 22, 2000 12:03 PM
> To: 'Perrin Harkins'; [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: Apache::DBI and altered packages
> 
> 
> 
> 
> > -Original Message-
> > From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 22, 2000 11:55 AM
> > To: Geoffrey Young; [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: Apache::DBI and altered packages
> > 
> > 
> > 
> > If you change the ping() method to check whether or not your 
> > package still
> > works, Apache::DBI will automatically get a new connection 
> > when it fails.
> 
> yeah, that's an idea - lots of packages to check, though.  
> but this might be
> the best solution...
> 
> thanks
> 
> --Geoff
> 
> > 
> > - Perrin
> > 
> 



RE: Apache::DBI and altered packages

2000-12-22 Thread Geoffrey Young



> -Original Message-
> From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 22, 2000 11:55 AM
> To: Geoffrey Young; [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Apache::DBI and altered packages
> 
> 
> 
> If you change the ping() method to check whether or not your 
> package still
> works, Apache::DBI will automatically get a new connection 
> when it fails.

yeah, that's an idea - lots of packages to check, though.  but this might be
the best solution...

thanks

--Geoff

> 
> - Perrin
> 



RE: Apache::DBI and altered packages

2000-12-22 Thread Geoffrey Young



> -Original Message-
> From: jared still [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 22, 2000 11:52 AM
> To: Geoffrey Young
> Cc: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: Re: Apache::DBI and altered packages
> 
> 
> 
> 
> Geoff,
> 
> I'm going to make a non-technical suggestion:  You need to have  
> change control implemented so that packages in your database
> are not changing during business hours.
> 
> If you are 24x7, then you need to schedule an outage, and notify
> your customers of scheduled downtime.
> 
> This is more of a management and logistics problem than a Perl
> or Apache or Oracle problem
> 

what, you mean not making changes to production on a regular basis?  what do
you think I'm trying to run, a stable shop or something?

you have to actually be here to believe what goes on, though :)




Re: Apache::DBI and altered packages

2000-12-22 Thread Perrin Harkins

> my Oracle gurus here tell me that whenever a package changes any open
> connections will get this error.  Since the connection itself ok (just not
> the stuff I need to use) the only solution currently available seems to be
> $r->child_terminate() so that at least that child doesn't barf every time.
> However, this leaves the current request in a lurch...
>
> I was thinking that maybe something like Apache::DBI::reconnect() was
needed
> - call DBI->disconnect then DBI->connect again.

If you change the ping() method to check whether or not your package still
works, Apache::DBI will automatically get a new connection when it fails.

- Perrin




Apache::DBI and altered packages

2000-12-22 Thread Geoffrey Young

hi all...

I was wondering if anyone has found a good way around persistent connections
and package recompiles.  With Apache::DBI, on occasion when someone
recompiles a package and doesn't tell me, I see

ORA-04061: existing state of package body "FOO.BAR" has been invalidated
ORA-04065: not executed, altered or dropped package body "FOO.BAR"
ORA-06508: PL/SQL: could not find program unit being called

my Oracle gurus here tell me that whenever a package changes any open
connections will get this error.  Since the connection itself ok (just not
the stuff I need to use) the only solution currently available seems to be
$r->child_terminate() so that at least that child doesn't barf every time.
However, this leaves the current request in a lurch...

I was thinking that maybe something like Apache::DBI::reconnect() was needed
- call DBI->disconnect then DBI->connect again.

that is unless someone has dealt with this in another way - someone
mentioned that perhaps the proper ALTER OBJECT permissions would force a
recompile - I dunno...

--Geoff