SQL Open Cursors (-SQLCursors)

Use SQL Open Cursors (-SQLCursors) to set the upper limit on the number of cursors (active result sets) that can be open simultaneously for a single connection. By limiting the number of open cursors, the system manages memory and resource usage efficiently, preventing any single connection from exhausting server resources.

Operating system and syntax UNIX / Windows -SQLCursors value
Use with Maximum value Minimum value Single-user default Multi-user default
SQL 512 10 50
value

Maximum number of cursors that can be open at any given time for a single connection.

The default value is 50, which is generally sufficient for most workloads. However, the limit may be reached in the following scenarios:
  • Poor resource management in the SQL application—If statements are not closed promptly or are left open unnecessarily, the number of active cursors can accumulate.
  • High application load—Applications that process multiple result sets concurrently, such as those executing many queries and intentionally keeping them open for processing may require more cursors. This is common in long-running transactions that open several cursors before closing them.

The SQL Open Cursors (-SQLCursors) parameter may be modified while your database is online using PROMON or through the _DbParams VST. This change will only take effect on the primary broker and its newly spawned servers.