# EssArchiveBegin

Description

EssArchiveBegin() prepares the server for archiving by changing server mode to Read-Only.

Syntax

    ESS_FUNC_M EssArchiveBegin (hCtx, AppName, DbName, FileName);

ESS_HCTX_T | hCtx
ESS_STR_T | AppName
ESS_STR_T | DbName
ESS_STR_T | FileName

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 mode 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 (ESS_PRIV_READ) to the database, and must select it as the active database using EssSetActive().

Example

    ESS_FUNC_M
    ESS_ArchiveBegin(ESS_HCTX_T hCtx)
    {
       ESS_FUNC_M       sts = ESS_STS_NOERR;
       ESS_STR_T    AppName;
       ESS_STR_T    DbName;
       ESS_STR_T    FileName;
       AppName  = "Sample";
       DbName   = "Basic";
       FileName = "Test.arc";

       /* Begin Archive */
       sts = EssArchiveBegin(hCtx, AppName, DbName,
             FileName);
       return (sts);
    }

See Also

EssArchiveEnd()
EssRestore()