Re: Downside to ora_envhp=>0 to fix OCIHandleAlloc(OCI_HTYPE_ERROR) problem

[email protected] (Bill Ward)
Newsgroups perl.dbi.users
Message-ID <[email protected]>
On Wed, Jan 26, 2011 at 12:27 PM, John Scoles <[email protected]> wrote:
>> Or, is there some way to verify the OCI environment and reset it when
>> it is found to be unusable - in other words, trap the
>> "OCIHandleAlloc(OCI_HTYPE_ERROR)" error and reconnect?
>>
>
> Well normally an environment will not die unless you loose connectivity.  If
> you have lost connectivity then there would not be much point in trying to
> reconnect automatically your network or DB is Down??

Databases go down sometimes.  There could be a power failure or
hardware crash, or maybe the DB is just being bounced by the DBAs
after making a configuration change or upgrade.  The problem is even
if the database comes back up, it still keeps generating the same
error.  Why should I also have to manually restart the Apache server
just because the database has come back online?  dbi->connect() should
just start working once the DB is back online.  Once that error occurs
once, how about deleting the OCI environment so that the next
->connect after that will succeed?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.