Re: [cx-oracle-users] BLOBs > 2GB
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2010-05-10 15:31:26
|
Hmm, just a question: why would you want to write more than 2 GB at a time? Why not write it in chunks smaller than 2 GB? Can you see if that workaround works for you? I'm not really in a position (limited machines) to test such a large amount of data at one time -- so can't really say if the limitation is in the cx_Oracle code, the Oracle code or your code. Anthony On Mon, May 10, 2010 at 9:14 AM, VJ Kumar <vj...@gm...> wrote: > 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 > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |