# EssCopyApplication

Description

EssCopyApplication() copies an existing application, either on the client or the server, to a new application, including all associated databases and objects.

Syntax

    ESS_FUNC_M EssCopyApplication (hCtx, hSrcCtx, SrcApp, DestApp);

ESS_HCTX_T | hCtx
ESS_HCTX_T | hSrcCtx
ESS_STR_T | SrcApp
ESS_STR_T | DestApp

Parameters

hCtx | Essbase API context handle.
HSrcCtx | Not used - should be same as hCtx.
SrcApp | Name of existing application to copy.
DestApp | Name of new application.

Return Value

None

Notes

- Copying a client application copies the local application directory and contents.
- This function can only be used to copy a client application to a new application on the client, or a server application to a new application on the same server. Use EssCopyObject() to copy an application between different servers.
- The new application is not started. Call EssLoadApplication to start the newly copied application.

Access

For a server application, the caller must have Application Create/Delete/Edit privilege (ESS_PRIV_APPCREATE), and application designer privilege on the source application to be copied (ESS_PRIV_APPDESIGN).

Example

    ESS_FUNC_M

    ESS_CopyApp(ESS_HCTX_T  hCtx)

    {

       ESS_FUNC_M    sts = ESS_STS_NOERR;

       ESS_HCTX_T   hSrcCtx;

       ESS_STR_T    SrcApp;

       ESS_STR_T    DestApp;

       hSrcCtx = hCtx;

       SrcApp = "Sample";

       DestApp = "NewSamp";

       sts = EssCopyApplication(hCtx, hSrcCtx, SrcApp,

             DestApp);

       return (sts);

    }

See Also

EssCopyDatabase()
EssCopyObject()
EssLoadApplication