# EssRenameDatabase

Description

EssRenameDatabase() renames an existing database within an application, either on the client or the server. If the database is running on the server, it is first stopped.

Syntax

    ESS_FUNC_M  EssRenameDatabase (hCtx, AppName, OldName, NewName);

ESS_HCTX_T | hCtx
ESS_STR_T | AppName
ESS_STR_T | OldName
ESS_STR_T | NewName

Parameters

hCtx | Essbase API context handle.
AppName | Application name.
OldName | Name of existing database to rename.
NewName | New name of database. Database names can be 8 characters long, and can contain all special characters allowed in DOS file names. No spaces, commas, tabs, slashes, backslashes, or periods are allowed. The use of some special characters is not recommended because they are often used by the operating system (for example, @, $, %, and &).

Return Value

None.

Notes

- Renaming a client database renames the local database directory.

Access

For a server database, the caller must have Database Create/Delete/Edit privilege (ESS_PRIV_DBCREATE).

Example

    ESS_FUNC_M
    ESS_RenameDatabase (ESS_HCTX_T hCtx)
    {
       ESS_FUNC_M  sts;
       ESS_STR_T  AppName;
       ESS_STR_T  OldName;
       ESS_STR_T  NewName;

       AppName = "Sample";
       OldName = "Basic";
       NewName = "Basic2";

       sts = EssRenameDatabase(hCtx, AppName, OldName,
             NewName);

       return(sts);
    }

See Also

EssRenameApplication()
EssRenameObject()