Try OpenEdge Now
skip to main content
DataServer for Oracle
RDBMS Stored Procedure Details : RUN STORED-PROCEDURE details : RUN STORED-PROC statement with special internal option : ds-close-cursor option
 
ds-close-cursor option
The OpenEdge DataServer for Oracle supports a special built-in stored procedure call implementation that routes requests directly to the DataServer rather than routing request through the DataServer and onto the foreign data source. This special call enables you to close the inactive cursors—associated with the FIND statements that have already been executed in your application—that are either no longer (or minimally) required for future application use, thereby making more Oracle cursors available to your DataServer application. The close inactive cursor statement closes inactive cursors that are associated with FIND statements in your current application—directly from the SQL statement cache.

Syntax

RUN STORED-PROC ds-close-cursor ("FIND" [, number_of_cursors])
ds-close-cursor
The RDBMS special stored procedure call used to close inactive cursors in the Oracle DataServer.
FIND
Indicates the RDBMS stored procedure to close only the cursors associated with the FIND statement.
number_of_cursors
An optional parameter used to indicate the number of inactive cursors to be closed from the cursor cache.
Specify a value between 1 to 9999 for the number of inactive FIND cursors you want to close or specify no value to close all inactive FIND cursors from the application's SQL statement cache.
The following are examples of how to run stored procedures in ABL to close inactive cursors associated with the FIND statement.
RUN STORED-PROC for closing inactive cursors
RUN STORED-PROC ds-close-cursor ("FIND")
RUN STORED-PROC ds-close-cursor ("FIND",20)
The first and the second example in closes all the inactive cursors associated with the FIND statement.
The cursor closure operation can be initiated at any point in the run-time duration of the application. An entry is logged to dataserv.lg file each time the cursor closer operation is performed, provided the cursor log-entry-type is active.
Note: For more information on closing inactive cursors, see Closing inactive cursors.
*The special built-in procedure call is not a stored procedure call; it does not adhere to the rules and practices of using stored procedures.
*You do not need to acquire a handle to a special built-in procedure (ds-close-cursor) as there is no result set associated with the procedure call.
*You do not need to close the procedure call with CLOSE STORED-PROCEDURE.
*There is no error handling associated with the call, therefore, the NO-ERROR phrase is not applicable.