Esteemed monks,
I've been dealing with this problem for some time now, and posing a question to the monks seems the right move. First, let me apologize for the generic nature of the code I'm posting: I work in a highly confidential environment, and had to seek permission before posting this.
The problem: When I use an Oracle schema user (SCHEMA) to update and insert LOB's, it works. However, if I use a non-schema user (NONSCHEMA) with all the necessary grants and synonyms set in place, the insert/update fails.
In this case, table SCHEMA.TABLE has an alias for NONSCHEMA to access it as well.
# works
my $dbh = DBI->connect( 'dbi:Oracle', 'SCHEMA', $pwd ) ;
my $sth = $dbh->prepare( 'update TABLE set BLOBCOL=:data' );
$sth->bind( ':data', $binarystuff, {ora_type=>ORA_BLOB } );
$sth->finish ;
# doesn't work
my $dbh = DBI->connect( 'dbi:Oracle', 'NONSCHEMA', $pwd ) ;
my $sth = $dbh->prepare( 'update TABLE set BLOBCOL=:data' );
$sth->bind( ':data', $binarystuff, {ora_type=>ORA_BLOB } );
$sth->finish ;
# The error:
# Bad file descripor: ORA-04043: object SCHEMATABLE.TABLE
# does not exist. (DBD SUCCESS: OCIDescribeAny(view)/LOB
# refetch) at <file> line ##.
#
Again, I apologize for distilling this down into a short snippet of generic code, but I'm not authorized to show more.
My hope is that another esteemed monk will recognize something in this error and give a pointer. As you can see, there is a LOB refetch occurring behind the scenes, and this is where the whole process seems to fail.
Peace, monks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.