Talk to Oracle support. Show them the OCI trace. Let me know.
Tim.
On Wed, Jan 16, 2002 at 10:31:53AM -0800, Patrick McCormick wrote:
> I have a freshly built:
>
> perl 5.6.0
> DBD-Oracle 1.12
> DBI 1.201
>
> platform is solaris-intel 5.7 and I have oracle client 8.1.7.
>
> I have a small script that inserts LOBs into a database (see end of this
> message.)
>
> When talking to an Oracle 8.1.7 database, it works fine.
>
> When talking to an Oracle 8.0.6 database, it results in an error:
>
> DBD::Oracle::st execute failed: (DBD NO_DATA: OCIAttrGet OCI_ATTR_ROWID
> /LOB refetch) at repro.pl line 24.
>
> I have OCI BLOB code on 8.1.7 clients that talks to 8.0.6 servers without a
> problem, so I think it's something pecuilar to DBD-Oracle. If I try this
> with a DBD-Oracle compiled against 8.0.6 client, it works, but I don't want
> to use the 8.0.6 client.
>
> Does anyone know how I can make this 8.1.7 client talk to an 8.0.6
> database?
>
> --Patrick
>
> Here's a partial trace of the error occuring:
>
> lob refetch from table BLOBTEST, 1 columns:
> OCIParamGet(8249eac,53,820eb08,804720c,1)=SUCCESS
> OCIAttrGet(8249e8c,OCI_DTYPE_PARAM,804720a,0,2,820eb08)=SUCCESS
> OCIAttrGet(8249e8c,OCI_DTYPE_PARAM,8047200,8047204,4,820eb08)=SUCCESS
> lob refetch table col 1: 'MYBLOB' otype 113
> lob refetch :p1 param: otype 113, matched field 'MYBLOB' by name
> (MYBLOB "p1")
> OCIDescriptorAlloc(81f6004,81ebbb0,OCI_DTYPE_LOB,0,0)
> lob refetch sql: select MYBLOB "p1" from BLOBTEST where rowid = :rid
> for update
> OCIHandleAlloc(81f6004,8232a64,OCI_HTYPE_STMT,0,0)=SUCCESS
> OCIStmtPrepare(8240c70,820eb08,'select MYBLOB "p1" from BLOBTEST where
> rowid = :rid for update',62,1,0)=SUCCESS
> OCIDescriptorAlloc(81f6004,8232a6c,OCI_DTYPE_ROWID,0,0)
> OCIBindByName(8240c70,8232a68,820eb08,":rid",4,8232a6c,4,104,0,0,0,0,0,0)=S
> UCCESS
> lob refetch 1 for ':p1' param: ftype 113 setup
> OCIDefineByPos(8240c70,80471f0,820eb08,1,81ebbb0,-1,113,0,0,0,0)=SUCCESS
> OCIAttrGet(823eb28,OCI_HTYPE_STMT,820caec,8047338,19,820eb08)=NO_DATA
> OCIErrorGet(820eb08,1,"<NULL>",8046ea8,"(",1024,2)=NO_DATA
> ERROR EVENT 100 ' (DBD NO_DATA: OCIAttrGet OCI_ATTR_ROWID /LOB
> refetch)' on DBI::st=HASH(0x810b958)
>
> script:
>
> #!/usr/local/bin/perl -w
>
> use strict;
> use subs;
> use vars;
> use DBI;
> use DBD::Oracle qw(:ora_types);
>
> $| = 1;
>
> my ($server, $name, $pw) = (@ARGV);
>
> DBI->trace(100);
>
> my $dbh = DBI->connect
> ("dbi:Oracle:$server", $name, $pw,
> { RaiseError => 1, AutoCommit => 0 } );
>
> eval { $dbh->do("DROP TABLE BLOBTEST") };
> $dbh->do("CREATE TABLE BLOBTEST ( \"MYBLOB\" BLOB )");
>
> my $insert_sth = $dbh->prepare("insert into BLOBTEST (MYBLOB) values (?)");
> $insert_sth->bind_param(1, "BLOBTEXT", { ora_type => ORA_BLOB , ora_field
> => 'MYBLOB'});
> $insert_sth->execute;
>
> $insert_sth->execute;
> $insert_sth->finish();
>
> $dbh->commit();
>
> eval { $dbh->do("DROP TABLE BLOBTEST") };
>
> $dbh->disconnect();
>
>