When you PREPARE a statement the ASA engine allocates some resources
(mostly memory) to represent that statement. There is no way of knowing
how long the application might require that prepared statement, so the
engine maintains it within the server until either the prepared statement
is freed (by an explicit application call) or a disconnect.
I often see this with Java applications, because programmers often assume
that Java's garbage collection will clean up all unused resources - but
Java itself doesn't issue the close() method on a PreparedStatement, and
hence one gets "leaks".
MAX_STATEMENT_COUNT is a limit of the number of prepared statements the
engine will handle before giving errors - it prevents incorrectly coded
applications from causing the ASA engine to leak memory until all
available memory is exhausted. You can turn off the prepared statement
governor by setting MAX_STATEMENT_COUNT to 0, but I don't at all
recommend doing that.
Glenn
Post by Peter StojkovicI am using ASA 9.01
ERROR [HY000] [Sybase][ODBC Driver][Adaptive Server Anywhere]Resource
governor for 'prepared statements' exceeded ???
Thanks
for any help
Peter Stojkovic
--
Glenn Paulley
Research and Development Manager, Query Processing
iAnywhere Solutions Engineering
EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all
To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm
SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288