title: Blob file download from databse to local folder which is having size greater >32767 using UTL oracle package
body: <p>I want to download/export Blob data from database to local machine with the help of UTL package, but UTL package has a limit of 32767 bytes. is there are any alternative ways to download files .</p>
  
  <p>Many thanks in advance </p>
  
  <pre><code>declare
      bblobb blob;
      v_buff raw(32767);
      v_buff_size binary_integer;
      v_amount binary_integer;
      v_offset number(38):=1;
      v_chunksize    INTEGER;
      v_out_file utl_file.file_type;
  begin
      select blob_col  into bblobb from test_blob
      where id=12;
      v_chunksize := DBMS_LOB.GETCHUNKSIZE(bblobb);
  
      IF (v_chunksize &lt; 32767) THEN
          v_buff_size := v_chunksize;
      ELSE
          v_buff_size := V_CHUNKSIZE;
      END IF;
      v_amount := v_buff_size;
      v_out_file:=utl_file.fopen('IMAGE','2.PDF','wb');
      dbms_lob.read(lob_loc=&gt;bblobb, amount =&gt;v_amount, offset =&gt;v_offset, buffer =&gt;v_buff);
      utl_file.put_raw(file =&gt;v_out_file, buffer =&gt;v_buff, autoflush =&gt;true);
      utl_file.fflush(file=&gt;v_out_file);
      utl_file.fclose(v_out_file);
  end;
  </code></pre>
  
  <p>I need to download the file which is above the size 32767</p>