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
-
Make sure the MES middleware service is running.
-
On the Start menu, locate and select MES Clear Parameter Cache.

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

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