Skip to main content
Version: 3.5.0 (Development)

uspConfigExMeXFramework

Purpose

The uspConfigExMeXFramework stored procedure is designed to modify global variables that configure and control various components of the ExMeX Core Framework. These global variables allow fine-tuned control over how the framework operates.

Motivation

The need for flexible configuration within scripts is crucial to ensure the ExMeX Core Framework remains adaptable and scalable. Moving key configuration settings directly into the database enhances maintainability and allows for centralized control, especially when settings need to be dynamically adjusted during runtime. A stored procedure such as uspConfigExMeXFramework is essential for enabling easier access to these settings via companion apps and ensuring smoother DevOps workflows.

Applicability

This stored procedure is typically used during initial setup or DevOps maintenance operations to modify global variables, adjusting the behavior of the ExMeX Core Framework as needed. It is especially useful for system administrators and DevOps engineers who require direct control over configuration settings without diving into scripts.

Structure

Below is the basic syntax for calling the uspConfigExMeXFramework stored procedure. Each parameter allows you to specify the variable you wish to change, along with its new value, datatype, and description.

 EXEC MetadataZoneCore.uspConfigExMeXFramework
@VariableName = <Variable Name to change>
,@VariableValue = <Value to set of Variable Name>
,@VariableDatatype = <Datatype of Variable Name - Do not change>
,@VariableDescription = <Description of Variable Name>

Which parameter provides the usp?

The following list shows all the parameters that are available in the stored procedure. See also the section How to set global variables and what is their purpose? for more details about global variables.

  • @VariableName: The name of the global variable you wish to modify.
  • @VariableValue: The new value that will be assigned to the variable.
  • @VariableDatatype: The datatype of the variable (e.g., INT, VARCHAR). This is primarily for reference and should not be modified.
  • @VariableDescription: A brief description of the variable and its purpose. This is primarily for reference and should not be modified.

Return Types

Returns integer.

Return Values

Return valueMeaning
0 Successful execution
42Violation of one of the submitted value for a global variable. See more information in provided error-message

Considerations and Consequences

  • This procedure should only be executed by authorized personnel, as it directly modifies the configuration of the ExMeX Framework Core.
  • It is essential to document any changes made using this stored procedure, as they may impact the system's behavior across multiple components.

By centralizing the configuration within the database, the uspConfigExMeXFramework procedure offers a more efficient and flexible way to manage the settings of the ExMeX Framework Core during runtime.

The stored procedure updates the following tables in the Metadata Zone Core:

  • MetadataZoneCore.HubConfigExMeXFramework
  • MetadataZoneCore.SatConfigExMeXFramework

Important: These tables should never be modified manually. All parts of the ExMeX Framework Core access configuration data in the Metadata Zone through the view MetadataZone.ConfigExMeXFramework.

As changes to global variables can have significant consequences across all parts of the ExMeX Framework Core, they must be made with caution and deliberation.

Example

The following code snippets show how the values can be changed using the global variable UseTargetEntityDB as an example.

Activate UseTargetEntityDB

    EXEC MetadataZoneCore.uspConfigExMeXFramework
@VariableName = 'UseTargetEntityDB'
,@VariableValue = '1'
,@VariableDatatype = 'BIT'
,@VariableDescription = 'Switch functionality to enable or usage of SQL-Statement USE [<TargetDatabaseName>] within all LPS. 0 = Off, 1 = On'

In this example, the global variable UseTargetEntityDB is set to 1, which controls that the SQL statement USE [UseTargetEntityDB] is included in the modules by the ExMeX Core Framework.

Disable UseTargetEntityDB

        EXEC MetadataZoneCore.uspConfigExMeXFramework
@VariableName = 'UseTargetEntityDB'
,@VariableValue = '0'
,@VariableDatatype = 'BIT'
,@VariableDescription = 'Switch functionality to enable or usage of SQL-Statement USE [<TargetDatabaseName>] within all LPS. 0 = Off, 1 = On'

In this example, the global variable UseTargetEntityDB is set to 0, which controls that the SQL statement USE [UseTargetEntityDB] is not included in the modules by the ExMeX Core Framework.