# EsbArchiveBegin

Description

EsbArchiveBegin() prepares the server for archiving by changing server mode to "read-only."

Syntax

    EsbArchiveBegin (hCtx, AppName, DbName, FileName)

    ByVal hCtx     As Long
    ByVal AppName  As String
    ByVal DbName   As String
    ByVal FileName As String

Parameters

hCtx | Essbase API context handle.
AppName | Name of application to archive.
DbName | Name of database to archive.
FileName | Name of file to contain archive information.

Return Value

None.

Notes

- This function changes server mode to Read-Only. This allows the database administrator to back up all the files on the server and prevents writing to the files during the backup. The database files to back up are listed in the app\db directory specified by the FileName parameter.
- Any existing information in the specified file is overwritten by the archived data.

Access

The caller must have at least read access (ESB_PRIV_READ) to the database, and must select it as the active database using EsbSetActive().

Example

    Declare Function EsbArchiveBegin Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, ByVal FileName As String) As LongSub ESB_ArchiveBegin ()
       Dim sts As Long
       Dim AppName As String
       Dim DbName As String
       Dim FileName As String
       AppName = "Sample"
       DbName = "Basic"
       FileName = "Test.arc"
    sts = EsbArchiveBegin (hCtx, AppName, DbName, FileName)
    ****
    At this point, you can back up the server safely.

See Also

EsbArchiveEnd()
EsbRestore()
EsbGetProcessState()