Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Manufacturing Execution System 2023 R2

Clear the middleware stored procedure parameter cache

Clear the middleware stored procedure parameter cache

  • Last UpdatedOct 23, 2024
  • 2 minute read

For performance reasons, the MES middleware caches the parameter list of a stored procedure the first time the stored procedure is called. If a custom stored procedure's parameter list is subsequently changed, the middleware might not correctly call the stored procedure until the cache is cleared.

For example, a developer is modifying a custom stored procedure by adding a new parameter and is calling this stored procedure with the ExecSP() API method. Or, a supply chain connector has an import/export schedule already defined and then a developer makes changes to their stored procedure signature. Continuing to call the custom stored procedure or using the old signature without clearing the cache could cause unexpected results or issues.

To use the new parameter in the API call, the developer can either restart the MES middleware, call the ClearSpParameterCache() API method to clear the parameter cache, or use the MES Clear Parameter Cache utility to clear the parameter cache.

When putting changes to stored procedures into production, the MES Clear Parameter Cache utility can be used to clear the stored procedure parameter cache for the middleware. This must be performed on each middleware node to ensure that the changed stored procedures can be called from all clients.

The procedure described here clears the parameter cache for all stored procedures (custom and MES-specific stored procedures). To clear the parameter cache for a specific custom stored procedure, the ClearSpParameterCache(string) API method must be used.

Clear the middleware stored procedure parameter cache

  1. Make sure the MES middleware service is running.

  2. On the Start menu, locate and select MES Clear Parameter Cache.

    The Start menu MES Clear Parameter cache tile.

    A message appears, indicating that the cache has been cleared.

    The MES middleware clear parameter cache command window and dialog indicating the stored procedure parameter cache has been cleared.

  3. Close the message and the MES Clear Parameter Cache window.

TitleResults for “How to create a CRG?”Also Available in