Skip to content

ABIGetVSession

ABIGetVSession#

Syntax#

int ABIGetVSession (
    ABIVSession          **aHandle,
    unsigned int         aExecutingOnly );

Arguments#

Data Type Argument In/Output Description
ABIVSession** aHandle Output The pointer which retrieves the memory address of the structure array that stores the result set
unsigned int aExecutingOnly Input 0: Select all session
1: Selects only active sessions

Return Values#

If successful, returns the number of rows in the result set that aHandle points to; otherwise, returns an error code.

Description#

This function selects the V$SESSION performance view. If this function executes successfully, the aHandle pointer (a pointer of the ABIVSession type that points to an array that stores the result set) is returned.

Example#

Please refer to sample_1.c for an application related to this function.

ABIVSession *sVSession;
ABIVSession *sVSessionActiveOnly;
int sRowCount;
int sRowCountActiveOnly;

/* Select all sessions */
sRowCount = ABIGetVSession(  &sVSession, 0 );

/* Select only active sessions */
sRowCountActiveOnly = ABIGetVSession( &sVSessionActiveOnly, 1 );