JDBC session loading rows - no more spool files (3597)

Connectivity
Enthusiast

JDBC session loading rows - no more spool files (3597)

Hi,

Sessions opened in ANSI mode with JDBC connections are loading rows by thousands and sometimes are falling into error 3597.

about 3597 error KB (KCS001917) says:

"3597 occurs when 1 "request" exceeds max parser spool files. When multiple statements are packed into 1 request, 3597 occurs if the total # of
spool files for the multiple statements exceeds the max value."

How to deal with that ? Developper has limited the number of rows prepared for MERGE under limit of 4096. Is it possible to put statements in one transaction ? and how ?

Is a multi-statement accepted in that context ?

btw, where have gone the pages on JDBC documentation (error 404 today) ?

Thanks for help,

Pierre

 

 

 

2 REPLIES
Teradata Employee

Re: JDBC session loading rows - no more spool files (3597)

>>> where have gone the pages on JDBC documentation (error 404 today) ?

 

Sorry about the inaccessible documentation. That problem is being worked on.

Teradata Employee

Re: JDBC session loading rows - no more spool files (3597)

>>> Is it possible to put statements in one transaction ? and how ?

 

Yes, it is possible to execute multiple SQL statements within a single transaction. Your Java application must turn off auto-commit with the Connection.setAutoCommit(false) method, execute mulitple SQL statements, and then explicitly commit the transaction with the Connection.commit method.

 

 

>>> How to deal with that ? Developper has limited the number of rows prepared for MERGE under limit of 4096.

 

You should reduce the size of your batch to avoid Teradata Database error 3597.

 

 

>>> Is a multi-statement accepted in that context ?

 

Batches are implemented under the covers as a kind of multi-statement request, so you cannot use a batch in conjunction with a multi-statement request.