Solved

How to read BLOB data from Oracle and save as a file

Posted on 2004-10-04
5
919 Views
Last Modified: 2007-12-19
I am writing a script using Perl 5.6.1 and the DBI module to read data out of a table created by another program and create an IBM Rational ClearQuest record.  I will be using the ClearQuest API to create the record.  Some of the rows in the table I am reading contain BLOB data which where attachments added by the user of the other system.  In order to get the attachment into the ClearQuest database using its API, I have to reconstruct the BLOB data into a file on the file system.  Please send me some code samples that would show me how to read the BLOB data and save it to the file system in its original format (Word, Zip, XML, Text, etc...).
0
Comment
Question by:curmudjim72
  • 3
5 Comments
 

Author Comment

by:curmudjim72
ID: 12221478
The BLOB data I need to extract is in an Oracle 8.1.7 database.  I am using Windows 2K.
0
 

Author Comment

by:curmudjim72
ID: 12221534
The table I am reading, which contains the BLOB data, also has columns which contain the type and format of the BLOB data (application/msword and Long Text) for example.
0
 
LVL 12

Expert Comment

by:geotiger
ID: 12223118
0
 

Author Comment

by:curmudjim72
ID: 12226765
Thanks for the examples, but can this not be accomplished using perl?
0
 
LVL 8

Accepted Solution

by:
inq123 earned 500 total points
ID: 12229629
Hi curmudjim72,

A quick google search turns up:

http://coding.derkeiler.com/Archive/Perl/perl.dbi.users/2004-02/0278.html (perl answer to a question almost exactly like yours)
and this one's good too, a module and example:
http://www.cpan.org/modules/by-module/DBIx/DBIx-BLOB-Handle-0.2.readme

Cheers!
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question