Search Results for

    Show / Hide Table of Contents

    GlobalEnv

    The globalenv table is a global system table holding the state for the entire database and LemonEdge system for this database.

    The globalenv database table is used for holding version and global setting information for the system. These values are global for all accounts within the database unless otherwise specified.

    The table itself is a simple key/value table of the following structure:

    Name Description
    Name The name column holds a string value representing the name of a global setting in the database
    Value The value column holds the corresponding value for the aforementioned name setting.

    The standard settings contained within the globalenv table are as follows:

    Name Default Value Description
    AllowCLRSQLFunctions 0 Indicates if this database is configured to allow the integration of .net clr sql functions into the database, such as the system standard xirr calculation.
    This can not be enabled if you are hosting the database in SQL Azure. However it is compatible with SQL Server or SQL Azure Managed Instances.
    See SQL Functions for more information.
    DBUpgradeStarted A datetime stamp The last time a database upgrade was initiated
    DBUpgradeTimeTaken A time span The amount of time the last database upgrade took
    DBVersion Current Version The current version of the database for the LemonEdge platform
    LastForcedCacheReset A datetime stamp The last time the server cache was forced to be reset
    LockedAPI false Indicates the API AddIns are locked and can not be modified through the application.
    ReUpgradeAllEntities 0 Indicates the system should force an upgrade which will recreate all functions/procedures and update the schema.
    UpgradingDatabase 0 Indicates the system (either through a service or directly connected application) is currently upgrading the database.
    This will be automatically set to 0 when the upgrade completes.
    Warning

    Note: The system will not attempt to upgrade while UpgradingDatabase is set to 1, as it will assume another process is still upgrading so will just wait.
    If no LemonEdge application is connected to the database processing the upgrade, then this will indicate the flag is "stuck", and no upgrade will start until this is reset to 0 manually.
    If you connect directly to the database (rather than via a web service) using the client application it will prompt if you want to force an upgrade if you know the flag is "stuck".


    Any custom AddIn also has the ability to store its own settings and version information within globalenv at the database level. For instance the AssetManagement product has the following version setting:

    Name Default Value Description
    1;;AssetManagementDBVersion Asset Management Version The version in the database of the asset management product

    All custom addin settings are of the format AccountID;;CustomAddInSettingName within the globalenv database. See the API documentation for more information.

    In this article
    Back to top © LemonEdge Technologies. All rights reserved.