EsbShutdownServer

Description

EsbShutdownServer() stops the Essbase Agent. This function sends a request to the Essbase Agent (ESSBASE.EXE) to shut itself down. The Agent then goes through its normal shutdown procedure, including committing data, stopping all applications and databases, and logging users off before stopping.

Only users with Supervisor privilege can shut down the Agent.

This function can be called at any time, however, it is normally called to shut down an Agent process which was started in the background. See the Database Administrator's Guide for details.

Syntax

EsbShutdownServer (hInst, Server, User, Password)
ByVal hInst    As Long
ByVal Server   As String
ByVal User     As String
ByVal Password As String

Parameters

hInstEssbase VB API context handle.
ServerNetwork server name string. Specifies the name of the server to shut down.
UserUser name string. Specifies the user who is requesting the shutdown.
PasswordPassword string. Specifies the password of the user requesting the shutdown.

Return Value

None.

Possible error conditions resulting from this function include:

Access

This function requires Supervisor privilege.

Example

Declare Function EsbShutdownServer Lib "ESBAPIW" (ByVal hInst As Long, ByVal Server As String, ByVal User As String, ByVal Password As String) As Long 

Sub ESB_ShutdownServer()
   Dim sts As Long
   Dim Server As String
   Dim UserName As String
   Dim Password As String

   Server = "Rainbow"
   UserName = "Admin"
   Password = "password"

   '******************
   ' Shut down Server
   '******************
   sts = EsbShutdownServer(hInst, Server, UserName, Password) 
End Sub

See Also

EsbSetPassword()
EsbUnloadApplication()
EsbUnloadDatabase()