Re: In cleanup - UNKNOWN OCI STATUS 1041 (OCILobFreeTemporary)

[email protected] (John Scoles)
Newsgroups perl.dbi.users
Message-ID <[email protected]>
Bob McGowan wrote:

I am interested in this  one Bob here are my words on it.


> Hi,
>
> I've searched the archive at www.mail-archive.com and have not found any
> references to this specific error number.
>
> I've been using a PL/SQL function from Perl DBI this way:
>  $cursor = $dbHandle->prepare(q{
>                                  BEGIN
>                                      append_comments(?, ?);
>                                  END;
>                                });
>  $cursor->execute($incident, $newComment);
>
> But this uses the default VARCHAR2 type for the comment placeholder and
> the application occasionally has problems with data exceeding the buffer
> size.
>
> So, I want to change to using a LOB type, like this:
>  $cursor = $dbHandle->prepare(q{
>                                 BEGIN
>                                   append_comments(:incident, :comments);
>                                 END;
>                                });
>
>  $cursor->bind_param(":incident", $newIncident);
>  $cursor->bind_param(":comments", $comments,{ora_type => ORA_CLOB});
>  $cursor->execute();
>
> This works, allowing data sets larger than 32K.  It properly updates the
> table, but when it is done, I get this:
>
> (in cleanup) DBD::Oracle::st DESTROY failed:  \
>   (DBD (UNKNOWN OCI STATUS 1041):  OCILobFreeTemporary) [for Statement "
>   
This is not ORA-01041 error it is a 'unknown OCI status' that is '1041' 
and this is generated from DBD::Oracle by the return code when the

'OCILobFreeTemporary' is called

Me thinks that DBD::Oracle either is not releasing a lob correctly or the function append_comments is not release your temp lob

or some combination of both.



>                                 BEGIN
>                                   append_comments(:incident, :comments);
>                                 END;
>                               "], <> line 3.
>
> I've talked with support at Oracle, and they insist the error code must
> be "ORA-01041 : internal error. hostdef extension doesn't exist."
>
> I can "capture" this error by redirecting stderr to /dev/null, and so
> far as I can tell, nothing "bad" is happening, but I don't feel very
> comfortable with this as a "solution".
>
> Many thanks in advance ;)
>
>   
What I want you to do so I can properly debug this is

1) tell me what version of DBD::Oracle you are useing
2) what version of Oracle
3) what platform is it running on
4) what version of Perl

finally
If you are using a later version of  DBD::Oracle  I would like you to 
rerun  your code but this time do this

$dbd->{dbd_verbose}=15;

after you connect and then send me all the output from a test run of you .PL

cheers
John Scoles
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.