Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to read BLOB data from Oracle table

 
   Database Help (Home) -> Oracle -> Server RSS
Next:  Changing File Paths For Referenced Files - Issue ..  
Author Message
shweta.kaparwan

External


Since: Dec 16, 2008
Posts: 15



(Msg. 1) Posted: Fri Dec 26, 2008 1:11 pm
Post subject: How to read BLOB data from Oracle table
Archived from groups: comp>databases>oracle>server (more info?)

Hi All
How to read BLOB column using simple method.
I can do using TOAD ( export option).
Regards

 >> Stay informed about: How to read BLOB data from Oracle table 
Back to top
Login to vote
DA Morgan

External


Since: Dec 14, 2007
Posts: 757



(Msg. 2) Posted: Fri Dec 26, 2008 3:51 pm
Post subject: Re: How to read BLOB data from Oracle table [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

shweta.kaparwan DeleteThis @googlemail.com wrote:
> Hi All
> How to read BLOB column using simple method.
> I can do using TOAD ( export option).
> Regards

Define "READ."

Anyone can "read" a blob with the DBMS_LOB package.
http://www.psoug.org/reference/dbms_lob.html
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan DeleteThis @x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org

 >> Stay informed about: How to read BLOB data from Oracle table 
Back to top
Login to vote
Steve Howard

External


Since: Jan 16, 2008
Posts: 68



(Msg. 3) Posted: Sat Dec 27, 2008 7:37 am
Post subject: Re: How to read BLOB data from Oracle table [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 26, 4:11 pm, shweta.kapar....RemoveThis@googlemail.com wrote:
> Hi All
> How to read BLOB column using simple method.
> I can do using TOAD ( export option).
> Regards

Hi,

What application platform (java, .Net, etc.) environment are you
using?

Regards,

Steve
 >> Stay informed about: How to read BLOB data from Oracle table 
Back to top
Login to vote
Viktor Zacek

External


Since: Dec 29, 2008
Posts: 1



(Msg. 4) Posted: Mon Dec 29, 2008 9:25 am
Post subject: Re: How to read BLOB data from Oracle table [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

wrote:

> Hi All
> How to read BLOB column using simple method.
> I can do using TOAD ( export option).
> Regards

I do not know toad, but I would expect a way to export it.

If you can use Hora (from Keeptool, rival of toad Wink ):
Table
-> Tab: Content
-> select desired row
-> click on "..." beside the blob-field, then "save to file"
-> select folder and filename

here you go Wink


Best regards,
Viktor Zacek
 >> Stay informed about: How to read BLOB data from Oracle table 
Back to top
Login to vote
Mladen Gogala

External


Since: Jul 30, 2008
Posts: 67



(Msg. 5) Posted: Tue Dec 30, 2008 9:25 am
Post subject: Re: How to read BLOB data from Oracle table [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 26 Dec 2008 13:11:45 -0800, shweta.kaparwan wrote:

> Hi All
> How to read BLOB column using simple method. I can do using TOAD (
> export option). Regards

You can kiss the TOAD and will turn into a BLOB.

--
Mladen Gogala
http://mgogala.freehostia.com
 >> Stay informed about: How to read BLOB data from Oracle table 
Back to top
Login to vote
shweta.kaparwan

External


Since: Dec 16, 2008
Posts: 15



(Msg. 6) Posted: Tue Dec 30, 2008 4:05 pm
Post subject: Re: How to read BLOB data from Oracle table [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 27, 3:37 pm, Steve Howard wrote:
> On Dec 26, 4:11 pm, shweta.kapar....TakeThisOut@googlemail.com wrote:
>
> > Hi All
> > How to read BLOB column using simple method.
> > I can do using TOAD ( export option).
> > Regards
>
> Hi,
>
> What application platform (java, .Net, etc.) environment are you
> using?
>
> Regards,
>
> Steve

Hi Steve,
Sorry for the late response.
We are using Java. And we keep JMS database for message store. It has
tables with BLOB cols. those i wanted to read.
Regards
 >> Stay informed about: How to read BLOB data from Oracle table 
Back to top
Login to vote
Steve Howard

External


Since: Jan 16, 2008
Posts: 68



(Msg. 7) Posted: Tue Dec 30, 2008 5:53 pm
Post subject: Re: How to read BLOB data from Oracle table [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 30, 7:05 pm, shweta.kapar....DeleteThis@googlemail.com wrote:
> On Dec 27, 3:37 pm, Steve Howard wrote:
>
> > On Dec 26, 4:11 pm, shweta.kapar....DeleteThis@googlemail.com wrote:
>
> > > Hi All
> > > How to read BLOB column using simple method.
> > > I can do using TOAD ( export option).
> > > Regards
>
> > Hi,
>
> > What application platform (java, .Net, etc.) environment are you
> > using?
>
> > Regards,
>
> > Steve
>
> Hi Steve,
> Sorry for the late response.
> We are using Java. And we keep JMS database for message store. It has
> tables with BLOB cols. those i wanted to read.
> Regards

Try this...

SQL> select dbms_lob.substr(b,2000,1) from blobtest;

DBMS_LOB.SUBSTR(B,2000,1)
--------------------------------------------------------------------------------
7F454C460101010000000000000000000200030001000000208C040834000000582E000000000000
34002000080028002300200006000000340000003480040834800408000100000001000005000000
04000000030000003401000034810408348104081300000013000000040000000100000001000000
000000000080040


SQL> desc blobtest;
Name Null? Type
----------------------------------------- --------
----------------------------
C NUMBER
B BLOB

SQL> exit

linux2:oracle:tst10g1:/home/oracle>cat readBlob.java
import java.sql.*;
import oracle.jdbc.driver.*;

public class readBlob {
public static void main (String args[]) {
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:rep/rep@192.168.1.54:1521:tst10g1");
PreparedStatement psGetBlob = conn.prepareStatement ("select b "
+
"from
blobtest " +
"where c
= ?");
psGetBlob.setInt(1, Integer.parseInt(args[0]));
ResultSet rst = psGetBlob.executeQuery();
if (rst.next()) {
oracle.sql.BLOB blob = ((OracleResultSet)rst).getBLOB(1);
System.out.println(blob);
}
rst.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
}
linux2:oracle:tst10g1:/home/oracle>java readBlob 1
oracle.sql.BLOB@83ad50
 >> Stay informed about: How to read BLOB data from Oracle table 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Returning an object type that contains a blob from an Orac.. - I've written a pair of table returning functions, implemented in Java using the ODCITable Interface. One function returns rows containing objects that contain simple primitive data types (an integer and a double precision). This function works as..

NUMBER(p) vs. INTEGER data type and CHAR(x) vs. VARCHAR2(x.. - What are the main differences between NUMBER(p) and INTEGER for storing integer values? Is there any difference with space or performance? I understand using NUMBER(p) with a value for Precision only (no scale) gives you an integer, constrained by a max...

Help ! - How to resync sequence numbers to a table (Oracle) - Guys, I have imported huge amounts of data into a table without using the sequences (due to a logical reason) - now I need to re-sync the sequence to make sure that the next number generated is higher than the existing values... This process needs to b...

Help: Join a "glossary" table and a "data" table referring.. - I have a "glossary" table that holds a unique identifier (key) for each "text" string used elsewhere in the app. The fields in the data tables that should hold the text are then populated with the "key" instead of the text -...

Unifying Temp table behavior across oracle, mssql - Hi, I have an java application with a common persistence layer that now has the need for temporary tables. The need has arisen basically because we often need to do IN on large java arrays, and are hitting the bounds on the IN (1, 2, ... 1000s) for bot...
   Database Help (Home) -> Oracle -> Server All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]