我需要从数据库中检索几个大的波形文件,并且想检索分成更小的波形文件(大约 5Mb)。我能怎么做?我看过程序 dbms_lob.read,但它返回的最大文件大小为 32Kb。
问候
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;