Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8940673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:05:56+00:00 2026-06-15T11:05:56+00:00

I need to retrieve from the database a few large wave files and would

  • 0

I need to retrieve from the database a few large wave files and would like to retrieve divided into wave files smaller (about 5Mb). How can I do? I’ve seen the procedure dbms_lob.read, but this return maximum file size of 32Kb.

Regards

procedure extract_blob(p_id in number, wrote_length in out number, chunk out blob) is
   len_file binary_integer;
   myblob blob;
   myname varchar2(255);
   buffer_length number := 32760;

   begin    
     select file_wav_data, file_wav_name, dbms_lob.getlength(file_wav_data)
     into myblob, myname, lun_file 
     from t_wav 
     where id = p_id;

     if(len_file > wrote_length) then
         dbms_lob.read(myblob,buffer_length,wrote_length+1,chunk);
         wrote_length := wrote_length + buffer_length;
     else wrote_length := -999; --EOF
     end if;
   end;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:05:58+00:00Added an answer on June 15, 2026 at 11:05 am

    You probably want to use temporary LOBs:

    procedure extract_blob(
        p_id in number,
        offset in number,
        chunk_length in out number,
        chunk out blob
    ) is
        chunk blob;
        wav_data blob;
        full_length number;
        chunk_length number;
    
    begin    
        select file_wav_data, dbms_lob.getlength(file_wav_data)
        into wav_data, full_length
        from t_wav 
        where id = p_id;
    
        chunk_length := greatest(full_length - offset, 0);
        if chunk_length = 0 then
            return;
        end if;
    
        dbms_lob.createtemporary(chunk, TRUE);
    
        dbms_lob.copy(chunk, wav_data, chunk_length, 0, offset);
    
    end extract_blob;
    

    If possible, you should free the temporary LOB from the client side after you have processed it (using DBMS_LOB.FREETEMPORARY).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to retrieve the date from a UIDatePicker (Preferably I would also like
I retrieve few data from database then store it into hashmap and display it
I need to retrieve random rows from SQL Server database. I am looking for
I need to retrieve values from CakePHP's config file database.php from one of my
I retrieve data from database like this: OleDbDataAdapter dataAdapter = new OleDbDataAdapter(SELECT * +
I need to retrieve a row from a different database. How can I retrieve
I need to retrieve image from database and store it to a folder. Once
In my cakephp i need to retrieve datas from database. how can i display
I need to retrieve a record from a database, display it on a web
depending on what data I retrieve from the database, I need to update the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.