Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: BUFFER OVERFLOW, how to retrieve data from BFILE column

RE: BUFFER OVERFLOW, how to retrieve data from BFILE column

From: Meomeo Nguyen <meomeo22_at_yahoo.com>
Date: Tue, 24 Sep 2002 13:23:36 -0800
Message-ID: <F001.004D8438.20020924132336@fatcity.com>

Hi Karniotis,

Thanks for your response.  I do appreciate it.  Well, after set serveroutput on size 60000 or so and executing DBMS_OUTPUT.ENABLE(60000), I am still unable to view the content of the BFILE column.  There are a lot of garbage in the output.  Anyone knows how to write a script to view data from the BFILE column, please help. 

Thanks

Lenka

 "Karniotis, Stephen" wrote:

You need to execute DBMS_OUTPUT.ENABLE (buffer size); with a max of 1000000 bytes.

 

Thank You

 

Stephen P. Karniotis

Product Architect

Compuware Corporation

Direct:                   (248) 865-4350

Mobile:                  (248) 408-2918

Email:                      Stephen.Karniotis@Compuware.com

Web:                        www.compuware.com

 

-----Original Message-----
From: Meomeo Nguyen [mailto:meomeo22@yahoo.com]
Sent: Tuesday, September 24, 2002 12:53 PM
To: Multiple recipients of list ORACLE-L
Subject: BUFFER OVERFLOW, LIMIT OF 2000 BYTES.

 

Hi All,

Below is a script to retrieve data from BFILE column and its output.  The external PDF file is around 53, 435 bytes (text and picture altogether in one file).  Anyone please have a fix for this script.  I am unable to view the content of the external PDF file on the sreen.  Any help is greatly appreciated.

Thanks alot

Lenka

set serveroutput on
DECLARE
  v_book_file  BFILE;
  v_length     NUMBER;
  v_position   NUMBER;
  v_piece      RAW (56,320);
BEGIN
  SELECT book_file
  INTO   v_book_file
  FROM   my_book_text
  WHERE  file_desc = 'testing';
  dbms_lob.open (v_book_file, );
  v_length := dbms_lob.getlength (v_book_file);
  v_position := 1;
  LOOP
    EXIT WHEN v_position > v_length;
    v_piece := dbms_lob.substr (v_book_file, 100, v_position);
    dbms_output.put_line (utl_raw.cast_to_varchar2(v_piece));
    v_position := v_position + 100;
  END LOOP;
  dbms_lob.close (v_book_file);
END;
/
=! ! =================

%PDF-1.3
%bcOS
1 0 obj
<<
/Creator
<feff001b7a68001b004d006900630072006f0073006f006600740020005700
6f007200640020>
/CreationDate (D:19991019160202)
/Title
<feff001b7a68001b003600310031003700700062006
30031002e005000440046>
/Author
<feff001b7a68001b0052006f006200650072007400630075>
/Producer (Acrobat
PDFWriter 4.0 for Windows)
/ModDate (D:20001019200402+08'00')
>>
endobj
2 0
obj
[
/PDF /Text /Ima
geB
]
endobj
3 0 obj
<<
/Pages 5 0 R
/Type /Catalog
/DefaultGray 31 0 R

/DefaultRGB 32 0 R
>>

endobj
4 0 obj
<<
/Type /Page
/Parent 5 0 R
/Resources << /Font << /F1 8 0 R
/F2 10 0 R /F0 6 0
R /F3 14 0 R /F4 16 0 R >>
/ProcSet [ /PDF /Text /ImageB ] >>
/Contents 57 0 R

>>
endobj
5 0 obj

<<
/Kids [ 4 0 R 18 0 R ]
/Count 2
/Type /Pages
/MediaBox [ 0 0 612 792 ]

>>
endobj
6 0 obj
<
<
/Type /Font
/Subtype /TrueType
/Name /F0
/BaseFont /Arial
/FirstChar 31

/LastChar 255
/Widt
hs [ 750 278 278 355 556 556 889 667 191 333 333 389 584 278 333 278 278
556
556 556 556 556 556 55
6 556 556 556 278 278 584 584 584 556
1015 667 667 722 722 667 611 778 722 278
500 667 556 833 722
778
667 778 722 667 611 722 667 944 667 667 611 278 278 278 469 556
333 556
556 500 556 556 278 55
6 556 222 222 500 222 833 556 556
556 556 333 500 278 556 500 722 500 500 500
334 260 334 584 750
556 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500
500 500 500 500
500 500 500 500 500
500 500 500 500 500 500 500
500 500 500 500 500 500 500 500 500 500 500 500 500
500 500 500
500 5
00 500 500 500 500 500 500 500 500 500 500 500 500 500 500
500 500 500 500 500
500 500 500 500 500
DECLARE
*ERROR at line 1:
ORA-20000: ORU-10027: buffer overflow,! ! limit of 2000 bytes
ORA-06512: at "SYS.DBMS_OUTPUT", line 91
ORA-06512: at "SYS.DBMS_OUTPUT", line 58
ORA-06 5! ! 12: at line 17

 


Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!




The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.




Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Meomeo Nguyen
  INET: meomeo22_at_yahoo.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Sep 24 2002 - 16:23:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US