Note
For V2.2.77, this parameter is available starting with V2.2.77.
Description
open_cursors specifies the maximum number of cursors that can be opened in a single session.
Privilege requirements
Query the parameter
The
systenant and MySQL user tenant can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and MySQL user tenant can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Type | Int |
| Default value | 50
NoteStarting from V4.4.2 BP4, the default value for a new MySQL-compatible mode user tenant is adjusted to 500. For existing tenants, Oracle-compatible mode user tenants, and the |
| Value range | [0, 65535] |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
The maximum number of cursors that can be opened in a single session. If the number of cursors opened in a session exceeds this limit, an error
ORA-01000: maximum open cursors exceeded.is returned.The
open_cursorsparameter also limits the number of prepared statement (PS) handles.Starting from V4.4.2 BP4, a MySQL-compatible mode user tenant created by using the
CREATE TENANTstatement has this parameter initialized to500during creation. This adjustment only takes effect for newly created tenants; existing tenants are not affected. Oracle-compatible mode user tenants and thesystenant remain at50.
Examples
Set the maximum number of cursors that can be opened in a single session to 20. Example:
obclient> ALTER SYSTEM SET open_cursors = 20;