# EsbListRequests

Description

EsbListRequests() returns information about sessions and requests in progress, terminated, or in the process of being terminated.

Syntax

      EsbListRequests (hCtx, UserName, AppName, DbName, Items)
      ByVal hCtx     As Long
      ByVal UserName As String
      ByVal AppName  As String
      ByVal DbName   As String
            Items    As Long

Parameters

hCtx | Context handle
AppName | Application name
DbName | Database name
UserName | User name
Items | Number of index and data files returned

Return Value

If successful, returns a count of the number of users in Items, and generates a list of users with access to the specified application and database that is accessible using EsbGetNextItem().

Notes

EsbListRequests() returns information about sessions and requests in progress, terminated, or in the process of being terminated.

- A session is the time in seconds between an Essbase user's login and logout.
- A request is a query sent to Essbase by a user or by another process; for example, starting an application or restructuring a database outline. Each session can process only one request at a time; therefore, sessions and requests have a one-to-one relationship.
- This function returns information on requests and sessions initiated by the process specified by the UserName, AppName, and DbName. If these parameters are null or empty, then all the processes in the system are listed. This function returns the number of current, terminating, and terminated requests and one ESB_REQUESTINFO_T structure for each request.
- After you call EsbListRequests(), call EsbGetNextItem(), using ESB_REQUESTINFO_TYPE, to retrieve the request information structures that you want.

Access

This function requires no special privileges.

Example

    Declare Function EsbListRequests Lib "ESBAPIW" (ByVal hCtx As Long, ByVal UserName As String, ByVal AppName As String, ByVal DbName As String, pItems As Integer) As Long

      Sub ESB_ListRequests ()
         Dim Items As Integer
         Dim ReqInfo As ESB_REQUESTINFO_T
         Dim UserName As String
         Dim AppName As String
         Dim DbName As String
         Dim sts As Long

        UserName = "Admin"
        AppName = "Demo"
        DbName = "Basic"

         '*************
         ' List Requests
         '*************
         sts = EsbListRequests (hCtx, Items)

         For n = 1 To Items
           '********************
           ' Get next Request Info
           ' from the list
           '********************
           sts = EsbGetNextItem (hCtx,
                 ESB_REQUESTINFO_TYPE, ByVal ReqInfo)
         Next
      End Sub

See Also

EsbKillRequest