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: ORA-03113 error Please HELP!!

Re: ORA-03113 error Please HELP!!

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Sun, 31 Aug 2003 16:43:19 +0100
Message-ID: <mg54lvc9oi0d8a9ihe4k8suedbpruku5s2@4ax.com>


On Sun, 31 Aug 2003 07:17:02 -0400, dominant <member32241_at_dbforums.com> wrote:

>Here is the erro message
>
>DBD::Oracle::st execute failed: ORA-03113: end-of-file on
>communication channel

 See Daniel Morgan's numbered points about this one, and check the alert log.

>What is wrong with blobs?

 Well - you're not even using blobs in your example, you're attempting to use the deprecated LONG RAW datatype. Where did you get this code from?

 See the DBD::Oracle docs on handling LOBs.

http://theoryx5.uwinnipeg.ca/CPAN/data/DBD-Oracle/Oracle.html#Handling_LOBs

>Here is my code
>
>#!/usr/local/bin/perl

use strict;
use warnings;

 ... as these will let Perl give you more help.

>use DBI;
>
>$LONG_RAW_TYPE=24; # Oracle type id for blobs

 Don't harcode constants. This is the wrong one, anyway. Import them from the DBD::Oracle package.

use DBD::Oracle qw(:ora_types);

 You'll then later use ORA_BLOB as the datatype when binding.

> $stmt = $dbh->prepare("INSERT INTO hr.documents (documentid ,
> document_name, document) VALUES
> (hr.autoinc.nextval,'john.doc',?)") || die "\nPrepare error:
> $DBI::err .... $DBI::errstr\n";
>
> # Bind variable. Note that long raw (blob) values must have
> # their attrib explicitly specified
>
> $attrib{'ora_type'} = $LONG_RAW_TYPE;
>
> $stmt->bind_param(1, $buf, \%attrib);

 Replace these two lines with:

$stmt->bind_param(1, $buf, { ora_type => ORA_BLOB });

> $stmt->execute() || die "\nExecute error: $DBI::err ....
> $DBI::errstr\n";
>
> print STDERR "Complete.\n";

--
Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Received on Sun Aug 31 2003 - 10:43:19 CDT

Original text of this message

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