Remove MES Cloud integration components from the MES production database
- Last UpdatedSep 18, 2025
- 2 minute read
Use the Rollback_CloudIntegration_8_00_In_ProductionDB_23_01.sql script file to remove all Connected MES components from the MES 2023 R2 production database.
Executing the rollback script will not modify any data in the MES production database and the script will only remove the objects (tables, stored procedures, triggers, indexes) that were added or modified when AVEVA MES Cloud integration application was configured. If any existing objects were modified to support the Connected MES Cloud integration functionality, then those changes will be removed from those objects, and replaced with their original functionality. This is an optional step. If MES Cloud integration is uninstalled without running this script, the MES production database will continue to function normally. There will be some additional transaction activity for capturing delete transactions, but the records will be removed.
Remove Connected MES components from the MES production database
-
Copy the Rollback_CloudIntegration_in_productionDB_X_XX.sql file from the {%MES installation folder%}\Wonderware\MES\Cloud Integration\Database Resources folder to a folder on the same machine where the MES production database is located.
Note: AVEVA recommends removing Connected MES components for the MES production database before uninstalling the Connected MES Cloud integration application. If the application uninstall is completed first, the rollback script can still be obtained from the following location in MES installation media: {%CD-MESCloudIntegration%}\InstallFiles\Responsefiles.
-
Close all open SQL Server connections to the MES production database, including the following:
-
The MES Middleware Host connection.
-
The MES Service connection.
-
Any direct connections (for example, an ArchestrA script running a stored procedure using direct SQL connections).
-
Any connections associated with custom processes or implementations.
-
-
Open SQL Server Management Studio (SSMS), select the appropriate SQL Server instance, and sign in.
Notes: Before proceeding:
- Ensure that no other SSMS instance is open. If other instances are open, close them and exit out of SSMS.
- Ensure that no tabs or query windows are open with MES production database name to be reverted selected. If tabs are open, close them. -
In the View menu, select Object Explorer to open the Object Explorer window.
-
Navigate to the Database node for the SQL Server instance, right-click on the MES production database name to be reverted, and select New Query.
A new Query tab opens.
-
Open the Rollback_CloudIntegration_in_productionDB_X_XX.sql script by doing the following:
-
In the Query window, select Open from the File menu.
-
Navigate to the file location SQL file was saved to and select Open.
The script appears in the Query window.
-
-
Select Execute to run the script.
The script will begin to execute. If the script processes for more than 15 minutes, there may be open SQL Server connections to the MES production database. Do the following to troubleshoot the existence of open connections:
-
Open a new Query tab and execute the following:
SELECT * FROM sys.dm_exec_sessions WHERE database_id = DB_ID(DB_NAME()) AND is_user_process = 1
-
If the query returns open connections in addition to the connection associated with the rollback script, close those connections.
-
Re-run the script to verify that no additional connections are open, then close the Query tab.
Once all open SQL connections are closed, the rollback script will complete.
-