SET_MAX_OPEN_CURSORS¶

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

Set the maximum number of cursors you want the driver to use.

The driver will recycle the least used cursors if this limit is hit. The trade off is between increased resources on the server and re-preparing of cursors.

For a program that keeps 40+ files opened at the same time, 255 is a good number for the open cursors parameter. For programs that open less than 40 files, any number between 100-255 is sufficient. These numbers can be changed based on available server resources.

On Oracle this value should not exceed the value of open_cursors in init.ora

Note: Only change this setting if you are having performance issues and the server is indicating you are using up too many cursors or too much memory. GET_OPENED_CURSORS can be used to check the number of cursors the server has opened. If this number is hitting the limit, it is worth increasing the number, as long as the server has enough resources.

Syntax

SET_MAX_OPEN_CURSORS of {server} to {variable}

Parameter

Description

server

The name of the server

variable

Maximum number of cursors