Terminates specific user sessions or requests.
Syntax
EsbKillRequest (hCtx, ReqInfo) ByVal hCtx As Long ByVal pReqInfo As ESB_REQUESTINFO_T
Parameter | Description |
---|---|
hCtx | Context handle |
pReqInfo | Pointer to the Request Information structure. |
Notes
EsbKillRequest() uses the information in ESB_REQUESTINFO_T regarding current sessions and requests to terminate a specific user session. This function can also be used to terminate (without logging out the user) any active requests being made to an application, a database, or the system during a user session.
A session is the time in seconds between a user's login and logout.
A request is a query sent to Essbase Server 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 terminates the sessions and requests specified by the UserName, AppName, and DbName in the ESB_REQUESTINFO_T structure. If those fields are null, this function terminates all sessions and requests initiated by this process (user). The application program is responsible for allocating and freeing the memory used by ESB_REQUESTINFO_T.
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().
Access
This function requires no special privileges.
Example
Declare Function EsbKillRequest Lib "ESAPINW" (ByVal hCtx As Long, pReqInfo As ESB_REQUESTINFO_T) As Long Sub ESB_KillRequest() Dim Items As Integer Dim ReqInfo As ESB_REQUESTINFO_T Dim sts As Long Dim pAccess As Integer '********* ' List Requests '************* 'sts = EsbSetActive(hCtx, AppName, DbName, pAccess) 'Debug.Print "EsbSetActive = " & sts 'sts = EsbDefaultCalc(hCtx) 'Debug.Print "EsbDefaultCalc = " & sts sts = EsbListRequests(hCtx, UserName, AppName, DbName, Items) Debug.Print "EsbListRequests = " & sts & " " & Items For n = 1 To Items '******************** ' Get next Request Info ' from the list '******************** sts = EsbGetNextItem(hCtx, ESB_REQUESTINFO_TYPE, ReqInfo) Debug.Print "EsbGetNextItem = " & sts & " " & ReqInfo.LoginId & " " & ReqInfo.DbRequestCode sts = EsbKillRequest(hCtx, ReqInfo) Debug.Print "EsbKillRequest = " & sts Next End Sub
See Also