473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Java Exception thrown while Updating/ Inserting CLOB field.

Hi all,

We have files with about 20 to 30 fields per row.

We are trying to update such files with about 60 rows as contiguous
data in a CLOB field.

It passes through.

But when we try updating files with about 60 to 200 rows, we get the
below exception,

[IBM][CLI Driver][DB2/NT] SQL0302N The value of a host variable in the
EXECUTE or OPEN statement is too large for its
corresponding use. SQLSTATE=22001
And When we try updating more than 200 rows, we get the below
exception

[IBM][CLI Driver][DB2/NT] SQL0973N Not enough storage is available in
the "QUERY_HEAP" heap to process the statement.
SQLSTATE=57011

we are using SQLJ to update/ insert the CLOB field.

Any pointers to this ?

Thank you,
Srinadh
Nov 12 '05 #1
1 5895
Srinadh,

The fact that your program behaves differently depending on the number of
rows in the table makes me suspect that there is something wrong in your
program, not in DB2. DB2 should not normally behave differently for 60 rows
than it does for 60,000,000 rows, except that it will take longer for the
program to finish when there is larger number of rows. However, the
behaviour of the individual statements, like an INSERT or UPDATE, shouldn't
change.

Or do you mean 60 *columns*, instead of rows? If you do mean columns instead
of rows, it is possible that you are concatenating too much data together;
remember, there is a limit to the size of a CLOB (2 GB, if I am not
mistaken, but may vary for some platforms and versions of DB2.)

I think we need to see your code to help you figure out this problem.

Can you post your code - or at least the critical part of it - and the
definitions of some of the tables, perhaps a table with less than 60 rows, a
table with 60 to 200 rows, and a table with over 200 rows?

What OS are you using? What version of DB2 are you using?

Also, have you looked at the SQLJ samples in the SQLLIB/samples/Java
directory of DB2? They usually give you a good idea how to do things like
updating/inserting with CLOBs.

Rhino

"Srinadh" <sr*****@gmail.com> wrote in message
news:2e**************************@posting.google.c om...
Hi all,

We have files with about 20 to 30 fields per row.

We are trying to update such files with about 60 rows as contiguous
data in a CLOB field.

It passes through.

But when we try updating files with about 60 to 200 rows, we get the
below exception,

[IBM][CLI Driver][DB2/NT] SQL0302N The value of a host variable in the
EXECUTE or OPEN statement is too large for its
corresponding use. SQLSTATE=22001
And When we try updating more than 200 rows, we get the below
exception

[IBM][CLI Driver][DB2/NT] SQL0973N Not enough storage is available in
the "QUERY_HEAP" heap to process the statement.
SQLSTATE=57011

we are using SQLJ to update/ insert the CLOB field.

Any pointers to this ?

Thank you,
Srinadh

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
1
by: DJ DIGI | last post by:
Hello Everyone, I'm attempting to design a small web app to obtain customer feedback. The issue is when a user inputs >4000 characters in the COMMENTS section I get the following Err Msg: ...
4
by: Asfand Yar Qazi | last post by:
Consider the following operation: class C { public: ... virtual void override_me() = 0; struct AnException : public std::runtime_error { AnException(const std::string& arg)
3
by: gimme_this_gimme_that | last post by:
I'm driving Windows XP and could use a tip on installing a function written in Java. 1. I created the a Java jar file, named UdfUtils.jar, from the Java source file shown below: 2. I copied the...
4
by: Nikki | last post by:
When executing my insert statement, I am receiving the error message 'string literal too long'. The field is an xml datatype and I am inserting the xml as a string. Do I need to convert it to a...
8
by: gimme_this_gimme_that | last post by:
I have the following Java code : package com.rhi.bb.udf.utils; import java.sql.Clob; import java.sql.SQLException; import java.util.regex.Pattern; import java.util.regex.Matcher;
2
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: ...
2
by: khalidanwar123 | last post by:
i am getting the following error while updating a clob field. ERROR java.sql.SQLException: Data size bigger than max size forthis type: 4003 19:28:27,499 ERROR at...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.