473,386 Members | 1,969 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,386 software developers and data experts.

Running long statements with Java/C++/CLP

Hello

DB2 LUW v8 FP15. My Database STMTHEAP parameter is 4096 * 4k pages,
so there is plenty of space.

IF:

a) I use Java's and JCC, I am able to run long statements ( 65K ).

b) I use CLP (for example, db2 -tvf long_file_with_statement.sql), I
get 'DB21006E The input command is too long. The maximum length is
65535'. The file is indeed around 70k.

c) I use C++ applications, the same statement returns 'SQL0101N The
statement is too long or too complex.'

Why am I able to send long statements using Java, but unable to do the
same with C++ ?
Java does not use db2's client driver. Is there a CLI configuration
that may allow me to run really long statements, not limited to 65k?

Thanks, Michel.

Oct 22 '07 #1
2 3071
Michel,

While DB2 V8.2 introduced 64K statement text in the server not all
clients supported it in V8.2.
CLP was the major exception.
I'm not aware of embedded SQL being another one, but it may be possible.
It may also be possible that teh package creation for embedded consumes
some extra statement heap, which you can counteract by upping the heap.

IIRC in DB2 9 support fro 2MB statements has been completed.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Oct 22 '07 #2
On 22 out, 16:18, Serge Rielau <srie...@ca.ibm.comwrote:
Michel,

While DB2 V8.2 introduced 64K statement text in the server not all
clients supported it in V8.2.
CLP was the major exception.
I'm not aware of embedded SQL being another one, but it may be possible.
It may also be possible that teh package creation for embedded consumes
some extra statement heap, which you can counteract by upping the heap.

IIRC in DB2 9 support fro 2MB statements has been completed.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Thanks Serge,

According to http://tinyurl.com/2twjvw, v8 and v9 are compatible.

Just wondering ... what if I install a V9 Client (that supports >64K
statements) connecting to a V8 server ?

Should that do the trick ?

-M

Oct 22 '07 #3

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

Similar topics

4
by: Laura P | last post by:
Hi, I wasn't sure whether this should be posted in the Java are or in a Solaris thread, so I shall post it in both. Sorry for the duplication. I am new to Solaris and am having trouble...
0
by: Rennie deGraaf | last post by:
I want to create a long-running RMI server, which makes an object available to remote hosts, and does nothing else. However, the server consistently exists with no exception or error after >=60...
30
by: Rhino | last post by:
I am giving some thought to applying for some jobs that want people with Java and C++ experience. I have been writing Java for several years and am fluent enough that I don't have to get help with...
2
by: mskorik | last post by:
Hello all, Is it possible to pass 2 SQL statements in a single call ? I keep SQL statements in a text file and usually there are couples of several SQL statements that represent a named unit...
2
by: Micky | last post by:
Can any one give me some pointers on how to kill a running procedure in DB2? I have a long running procedure called from a Java routine and after I kill the Java routine, the procedure keeps...
11
by: Gregor Kovač | last post by:
Hi! I have an SQL script with bunch of CREATE TABLES, ALTER TABLES, ... I'd like it to run transactially. I have found that id I run a ALTER STATEMENT inside a transaction and then roll it back...
1
by: Aaron West | last post by:
Try this script to see what queries are taking over a second. To get some real output, you need a long-running query. Here's one (estimated to take over an hour): PRINT GETDATE() select...
3
by: WP | last post by:
Hello, I have a very simple script (or would you call it a batch file?) with the following content: connect to mydb2; DROP TABLE staff_employee_address; DROP TABLE...
4
by: Propad | last post by:
Hello, I know this issue pops up once in a while, but I haven't found a good answer to it. I need to debug a long running application under windows. The application is a combined java/python...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.