• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BatchUpdateException: [IBM][CLI Driver][DB2/LINUX] SQL0302N

 
Karthikeyan Rajendraprasad
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BatchUpdateException: [IBM][CLI Driver][DB2/LINUX] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001
the problem is like this. we have application that loads data from an UNL file into the db2 database. the process is like we load using prepared statement and batch update option. the file we load has 3 lakh records. the problem occurs exactly at the 1,68,560 record. we load as a bach of 10 records. when we use update and load record by record i am able to load all the 3lakh records successfully. we thought there might be an issue with the driver because the same problem occured in the same place in 2 other db2 servers. so we thought we can get the latest version of the driver and test it.
thanks and regards
Karthikeyan
 
Nagendra Prasad
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am afraid not.. something on the record u mention has a data field length that is greater than what is allowed in your databaase.
Check the data values in that record with the field length allowed in the table. I suspect you will find the answer there.
 
Karthikeyan Rajendraprasad
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
the problem is not with the data. as i have mentioned in my post the problem occurs when we use batch update. if i load it line by line in dont have any problem.
i am 100% sure that there should be no problem with the data because it is generated by a reporting module.
 
Jaydeep S. Deshmukh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi karthi,

Definitely the problem is with the application. I am facing same problem for which I tried to access NET but seems very obscure/profound. There must be something which is not understable by DB, may be some non-printable / special characers etc.
Try out openssl ...it may help you /.... as somebody told to me...even I am also not aware of the same... let's hope for the best
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic