SQLCODE -134 - Unknown dynamic/cursor statement-id (aaaa) in Datacom Server with SQLMEM=FREE
search cancel

SQLCODE -134 - Unknown dynamic/cursor statement-id (aaaa) in Datacom Server with SQLMEM=FREE

book

Article ID: 33616

calendar_today

Updated On:

Products

Datacom DATACOM - AD Datacom/AD Datacom/DB Datacom/Server

Issue/Introduction

Datacom Server with SQLMEM=FREE may result in error:

     SQLCODE -134 - Unknown dynamic/cursor statement-id (aaaa)

Environment

Release: All supported releases.
Component: DBSRV

Cause

SQLMEM=FREE is being used when there the applications with JDBC prepared statements.

Resolution

Use SQLMEM=KEEP on Datacom Servers with application that have JDBC prepared statements.

SQLMEM can be specified via Datacom Server startup option or can be modified while the server is active via console command.

Additional Information

From the Datacom Server user guide.

SQLMEM= 

(Optional) Specifies the status of SQL statement storage when a cursor is closed. Traditionally, The SQL statement storage is kept in memory for reuse if the statement is re-executed, perhaps with different parameters. 

SQLMEM=KEEP specifies that SQL statement storage is kept in memory for reuse. It allows an application to prepare a statement once and execute it multiple times without intervening prepares. JDBC applications that use the PreparedStatement interface require SQLMEM=KEEP. 

SQLMEM=FREE specifies that SQL statement storage is released upon cursor close. Prepared statement storage is not saved. Any attempt to re-execute a statement without an intervening prepare results in SQLSTATE 07033 and SQLCODE -134 – Unknown dynamic/cursor statement-id (aaaa). SQLMEM=FREE reduces SQL memory usage in MUF.