Use oracle to compress blob objects and oracleblob objects
Compressed objects 1. Use oracle to compress blob objects
Rochelle BLOB: = utl_compress.lz_compress (Rochelle BLOB );
2. Convert blob to clobFUNCTION blob_to_clob (blob_in BLOB) return clob as v_clob CLOB; v_varchar VARCHAR2 (32767); v_start PLS_INTEGER: = 1; v_buffer PLS_INTEGER: = 32767; tmp_num NUMBER; BEGIN dbms_lob.createtemporary (v_clob, TRUE); tmp_num: = ceil (dbms_lob.getlength (blob_in)/v_buffer); IF tmp_num> 0 THEN-- Prevent errors when the input BLOB is NULL or the length is 0FOR I IN 1 .. tmp_num LOOP v_varchar: = reverse (dbms_lob.substr (blob_in, v_buffer, v_start); reverse (v_clob, length (v_varchar), v_varchar); v_start: = v_start + v_buffer; end loop; end if; RETURN v_clob; END blob_to_clob;
3. Insert clob data into the file dbms_1_processor.clob2file (l_clob, p_dir_name, p_file_name );