[cx-oracle-users] BLOBs > 2GB
Brought to you by:
atuining
From: VJ K. <vj...@gm...> - 2010-05-10 15:20:25
|
It seems that writing BLObs > 2GB is not possible. The code below: import cx_Oracle from struct import * from ctypes import create_string_buffer,sizeof time_key=201003110000 l=1 cdm_conn = cx_Oracle.connect('...') cdm_cur = cdm_conn.cursor() buf = create_string_buffer(2684770500) #2684770500 sql=""" insert into TMP( l, dimension_name_1, dimension_name_2, time_key, blob ) values( """+str(l)+""", 'a', 'b', """+str(time_key)+""", empty_blob() ) returning blob into :1""" blob_var = cdm_cur.var(cx_Oracle.BLOB) cdm_cur.execute(sql, (blob_var,) ) # blob_var.getvalue().write(buf.raw) --------- causes this error: cx_Oracle.DatabaseError: ORA-22993: specified input amount is greater than actual source amount If the buffer length < 2GB, it runs correctly. VJ |