By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,514 Members | 1,702 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,514 IT Pros & Developers. It's quick & easy.

Running long statements with Java/C++/CLP

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.