Create a customized MES database using modified database scripts
- Last UpdatedJan 29, 2025
- 2 minute read
You can dump all of the embedded resources in the database configuration, including the database scripts, to the FactDbResources folder from the MES Database Setup component in the Configurator. You can then modify the scripts and use them to create a customized MES database.
This option is useful when you run into specific problems during the execution of the default database script files. However, great care must be taken in modifying the script files, as Technical Support might not support an installation for which the core MES scripts have been modified.
Note: You cannot run the scripts manually to create an MES database. You must configure the MES Database Setup component in the Configurator to create the database, which will run the scripts in the FactDbResources folder by default.
To dump the database scripts
-
In the MES Database Setup configuration settings, click the Dump Scripts to Disk button.

The database scripts are dumped to the folder FactDBResources\v.v.v, where v.v.v is the MES version (for example, 5.03.0001). This folder is located in the installed MES Database folder, whose default path is C:\Program Files (x86)\Wonderware\MES\Database.
Also, the button label changes to Overwrite Scripts on Disk. Clicking this button causes the scripts in the FactDbResources folder to be overwritten with the default scripts.
Create a customized MES database using modified database scripts
-
Modify the scripts as needed.
-
In the MES Database Setup component settings, enter the server and database names and then click the Validate button.
The Configurator checks for access to SQL Server and the existence of the specified database to see if the database will be created or migrated.
-
If the validation is successful, complete the necessary database settings.
For details, see either Set up a new MES database or Update an existing MES database.
-
Click the Configure button to create the customized database.
Script modifications that result in an error will be logged as the script is executed.
Restoring the Default Database Scripts
Whenever you configure the MES Database Setup component after dumping the scripts, the component configuration always uses the scripts in the FactDBResources\v.v.v folder to create the database. If needed, you can overwrite the modified scripts with the default unmodified scripts to create a standard MES database. Or you can delete the FactDBResources\v.v.v folder and configure the Database Setup component to create or migrate the database.
To restore the default unmodified database scripts
-
In the MES Database Setup configuration settings, click the Overwrite Scripts on Disk button.