19

How can I read blob data in Oracle SQL Developer. It is stored in byte[] format. Is there any possibility to read in string format.

1
  • text is not readable form Commented Feb 11, 2015 at 8:41

1 Answer 1

38

Follow these steps in Oracle SQL Developer -

  1. Open data window of your table.
  2. The BLOB cell will be named as (BLOB).
  3. Right click the cell.
  4. You will see a pencil icon. Click on it.
  5. It will open a blob editor window.
  6. You would find two check boxes against the option View as : Image or Text.
  7. Select the appropriate check box.
  8. If above step is still convincing, then use the Download option.

Update

OP says "text is not understandable manner it is showing �� �� like this "

Probably, the locale-specific NLS characterset doesn't support those characters. It might also be that those are Multi-Byte characters. I would suggest, SPOOL the result to an HTML file, open it with your browser, you could view the content as most of the browsers are capable of displaying multiple charactersets.

You could do something like this from SQL*Plus -

SET MARKUP HTML ON SPOOL ON
SPOOL report.html
select substr(clob_column, 1, 32767) from table_name...
SPOOL OFF

Update 2

Regarding SPOOL as HTML, test case -

SET MARKUP HTML ON SPOOL ON
SPOOL D:\report.html
SELECT substr(ename, 1, 5) ename FROM emp where rownum <=5;
SPOOL OFF

Works perfectly for me, html file opens up with my browser, look at the screenshot -

enter image description here

Sign up to request clarification or add additional context in comments.

12 Comments

What is readable format for you, please explain. I cannot address such a broad term.
What happens when you just do a SUBSTR over the column? At least you can view the first 32767 characters.
text is not understandable manner it is showing �� �� like this
I am alredy using that substring query iam getting text like this ��srcom.hexgen.orm.PortfolioAlloc/���ZisActiveL_hexGenEntityVersiont3Lcom/hexgen/core/orm/basetypes/HexGenEntityVersion;L allocationPertLjava/math/BigDecimal;L
there is no pencil!
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.