Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
142 views162 pages

MES Installation Guide

Uploaded by

midanyela.gomez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
142 views162 pages

MES Installation Guide

Uploaded by

midanyela.gomez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 162

AVEVA™ Manufacturing Execution System (MES)

Installation Guide
Version 7.0
December, 2022

aveva.com
© 2015-2023 by AVEVA Group plc or its subsidiaries. All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
means, mechanical, photocopying, recording, or otherwise, without the prior written permission of AVEVA
Group plc. No liability is assumed with respect to the use of the information contained herein.
Although precaution has been taken in the preparation of this documentation, AVEVA assumes no responsibility
for errors or omissions. The information in this documentation is subject to change without notice and does not
represent a commitment on the part of AVEVA. The software described in this documentation is furnished under
a license agreement. This software may be used or copied only in accordance with the terms of such license
agreement. AVEVA, the AVEVA logo and logotype, OSIsoft, the OSIsoft logo and logotype, ArchestrA, Avantis,
Citect, DYNSIM, eDNA, EYESIM, InBatch, InduSoft, InStep, IntelaTrac, InTouch, Managed PI, OASyS, OSIsoft
Advanced Services, OSIsoft Cloud Services, OSIsoft Connected Services, OSIsoft EDS, PIPEPHASE, PI ACE, PI
Advanced Computing Engine, PI AF SDK, PI API, PI Asset Framework, PI Audit Viewer, PI Builder, PI Cloud
Connect, PI Connectors, PI Data Archive, PI DataLink, PI DataLink Server, PI Developers Club, PI Integrator for
Business Analytics, PI Interfaces, PI JDBC Driver, PI Manual Logger, PI Notifications, PI ODBC Driver, PI OLEDB
Enterprise, PI OLEDB Provider, PI OPC DA Server, PI OPC HDA Server, PI ProcessBook, PI SDK, PI Server, PI
Square, PI System, PI System Access, PI Vision, PI Visualization Suite, PI Web API, PI WebParts, PI Web Services,
PRiSM, PRO/II, PROVISION, ROMeo, RLINK, RtReports, SIM4ME, SimCentral, SimSci, Skelta, SmartGlance, Spiral
Software, WindowMaker, WindowViewer, and Wonderware are trademarks of AVEVA and/or its subsidiaries. All
other brands may be trademarks of their respective owners.
U.S. GOVERNMENT RIGHTS
Use, duplication or disclosure by the U.S. Government is subject to restrictions set forth in the license
agreement with AVEVA Group plc or its subsidiaries and as provided in DFARS 227.7202, DFARS 252.227-7013,
FAR 12-212, FAR 52.227-19, or their successors, as applicable.
Publication date: Wednesday, January 11, 2023
Publication ID: 769606
Contact Information
AVEVA Group plc
High Cross
Madingley Road
Cambridge
CB3 0HB. UK
https://sw.aveva.com/
For information on how to contact sales and customer training, see https://sw.aveva.com/contact.
For information on how to contact technical support, see https://sw.aveva.com/support.
To access the AVEVA Knowledge and Support center, visit https://softwaresupport.aveva.com.
Contents

Chapter 1 Preparing to Install MES .................................................................... 7


Hardware and Software Requirements ..................................................................................................7
Notes About Security and Permissions...................................................................................................7
MES Firewall Exceptions List and Firewall Ports .....................................................................................8
MES Components..................................................................................................................................8
Server Components ...................................................................................................................................... 8
Client Components ....................................................................................................................................... 9
Application Objects................................................................................................................................. 11
MES BI Gateway Reports Components ...................................................................................................... 12
Development Library (API DLLs) ................................................................................................................. 13
PDF Documentation ................................................................................................................................... 13
BI Gateway, Licensing, and AVEVA Single Sign-On Components ............................................................ 15
MES Role-Based Installation ................................................................................................................ 15
MES Prerequisite Software .................................................................................................................. 18
MES and SQL Server ............................................................................................................................ 19
Datetime and Decimal Separator Requirements for Windows Regional Settings
and Custom Applications.....................................................................................................................19
Running MES in a 2-Node Failover Cluster Environment ....................................................................... 19
Installation and Setup Requirements for the Cluster Nodes ..................................................................... 19
Cluster Environment Considerations During MES Server Component Installation ................................... 20

Chapter 2 Preparing to Upgrade MES............................................................... 21


Upgrade Requirements ....................................................................................................................... 21
Migrating an MES Database to the Current Release ............................................................................. 21
Migrated Shift Schedules..................................................................................................................... 22

Chapter 3 Installing MES .................................................................................. 23

Chapter 4 Activating the MES Product Licenses ............................................... 32


Configuring the License Server Component .......................................................................................... 33
Activating the Product Licenses ........................................................................................................... 34
How MES Product Licenses Are Managed ............................................................................................ 35

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 3
Viewing MES Product License Information ........................................................................................... 37
Reserving Licenses When Multiple MES Systems Are Deployed ............................................................ 39
Deactivating MES Product Licenses ...................................................................................................... 40

Chapter 5 Configuring MES Components ......................................................... 41


About the Post-Install Configurator ..................................................................................................... 41
Specifying SQL Server User Authentication .......................................................................................... 45
Closing Configurator............................................................................................................................ 45
Post-Configuration Tasks ..................................................................................................................... 45

Chapter 6 Implementing Secure Communication


with System Management Server..................................................................... 47
MES Settings Affected When the System Management Server HTTPS Port Is Changed .......................... 48
System Management Server and Local Node Common Platform HTTPS Port Settings ............................ 48
Creating Client IDs to Obtain AIM Access Tokens ................................................................................. 49
Using an AIM Client ID to Obtain an Access Token ............................................................................... 50

Chapter 7 Creating or Migrating MES Databases .............................................. 51


Fixing Database Table Fragmentation .................................................................................................. 51
Creating an MES Database .................................................................................................................. 51
Migrating or Overwriting an Existing MES Database ............................................................................. 54
Creating a Customized MES Database Using Modified Database Scripts ................................................ 57
Importing Windows Active Directory Group SIDs into the MES Database .............................................. 59
Recommendations for Optimizing the MES Database ........................................................................... 60
MES Database Index Optimization Script ................................................................................................... 60
Monitoring Actual System Usage ............................................................................................................... 60
How Many Indexes to Use.......................................................................................................................... 61
Frequency of Index Rebuilding and Reorganizing ...................................................................................... 61
Choosing What to Index ............................................................................................................................. 61
Additional Assistance ................................................................................................................................. 61

Chapter 8 Configuring MES Middleware Communication with MES Databases 62


Using Windows Integrated Security vs. SQL Authentication to Access the MES Database ...................... 63
Manually Adding a SQL Server Login for the Middleware Service ............................................................. 64
Specifying the MES Production Database Connection String ................................................................. 69
Specifying the MES Restore Database Connection String ...................................................................... 71
The Middleware Service Windows User Account and Automatically Setting Database Access ............... 73
Guidelines for the MES Middleware Service Windows User Account ....................................................... 76
Configuring AVEVA Identity Manager Client Registration ..................................................................... 77
Testing and Saving the Database Connection Settings .......................................................................... 79

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 4
Reconfiguring the DB/MW Communication Component If the Common Platform HTTPS Port Number Is
Changed............................................................................................................................................ 80
Addressing MES Middleware Configuration Issues ............................................................................... 80
Adding MSDTC Firewall Exception for Remote MES Middleware to Database Communication .............. 81
Configuring the MSDTC Component Services ....................................................................................... 83

Chapter 9 Configuring the MES Middleware Proxy........................................... 86


Implementing Middleware Server and Proxy Communication When Using Windows Workgroups ........ 90
Addressing a "Proxy Failed to Connect to Middleware Server" Error .................................................... 90

Chapter 10 Configuring MES Web Portal .......................................................... 92


Configuring the MES Web Portal Component ....................................................................................... 92
Addressing IIS Feature Delegation Conflicts .............................................................................................. 94
IIS Feature Settings for MES Web Portal .................................................................................................... 95
Authentication – Anonymous ................................................................................................................. 95
Authentication – Windows ..................................................................................................................... 95
MIME Types ............................................................................................................................................ 95
Handler Mappings .................................................................................................................................. 95
Modules .................................................................................................................................................. 96
Default Document .................................................................................................................................. 96
Error Pages.............................................................................................................................................. 96
Making the Root SSL Certificate Available to MES Web Portal Users ..................................................... 96
Restarting the MES Middleware If MES Security Mode Is Changed ..................................................... 100
Setting the Web Portal User Session Cache Refresh Rate .................................................................... 100
What Happens to MES Web Portal Customization Files During an Uninstall ........................................ 101
Updating the Funcs.GetTranslations Method for Server-Side String Translations ................................ 101

Chapter 11 Configuring and Deploying MES BI Gateway Reports ................... 102


Configuring BI Gateway and MES Database Setup Components .......................................................... 103
Importing and Deploying the MES BI Gateway Model ........................................................................ 104
Deploying the SSRS MES Reports Against the BI Gateway Database ................................................... 108
Configuring Security Policies for the Quality Characteristic Detail Report ............................................ 113
Upgrading to the MES 2020 Intelligence Model .................................................................................. 113

Chapter 12 MES Service Monitor ................................................................... 123


Starting and Exiting the Service Monitor ............................................................................................ 123
Starting, Stopping, and Restarting the MES Middleware Host ............................................................. 123

Chapter 13 Running MES Install and Configurator from a Command Line ...... 125
Prerequisite Software ....................................................................................................................... 125

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 5
Command List File ............................................................................................................................. 125
MES Install Command ....................................................................................................................... 126
Install Response File XML Syntax ............................................................................................................. 126
Install Response File Component Entries ................................................................................................. 127
Sample Install Response Files Provided ................................................................................................... 128
Checking Installation Results in the MES Installation Logger File ............................................................ 128
MES Uninstall Command ................................................................................................................... 129
Configurator Command ..................................................................................................................... 129
Configurator Response File XML Syntax and Component Properties ...................................................... 129
MES Component Properties ..................................................................................................................... 130
MES Database Setup Component Properties ....................................................................................... 130
MES DB/MW Communication Component Properties......................................................................... 132
Middleware Proxy Component Properties ........................................................................................... 136
MES Web Portal Component Properties .............................................................................................. 137
MES BI Gateway Reports Component Properties ................................................................................ 138
Licensing Component Properties.......................................................................................................... 139
System Management Server Properties for AVEVA Single Sign-On Service......................................... 139
BI Gateway Components ...................................................................................................................... 140
Template Configurator Response File for MES ........................................................................................ 141

Chapter 14 Upgrading MES Development Components ................................. 142


Upgrading the MES Client API Script Libraries .................................................................................... 142
Upgrading MES .NET Controls for AVEVA OMI Apps ........................................................................... 143
Upgrading MES .NET Controls for AVEVA InTouch HMI Applications ................................................... 143

Chapter 15 Modifying, Repairing, and Uninstalling MES ................................ 145


Modifying What MES Products or Components Are Installed.............................................................. 145
Repairing the Installation .................................................................................................................. 151
Uninstalling MES ............................................................................................................................... 154
Tasks to Perform After MES Components Have Been Removed .......................................................... 156

Index ................................................................................................................ 157

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 6
Chapter 1

Preparing to Install MES

Before you begin the installation, you should:


 Make sure that the nodes on which MES will be installed meet the hardware and software requirements.
 Understand user security and permissions that are related to the installation. See Notes About Security and
Permissions on page 7.
 Identify which MES products and components will be installed on each node in the system. For assistance
with this task, see MES Components on page 8, the MES Deployment Guide, and the MES Virtual
Environment Implementation Guide.
 With the products and components to be installed on the nodes identified, determine which MES role-based
installation groups will be installed on each node. See MES Role-Based Installation on page 15.
 Make sure that the prerequisite software for the planned products and components is installed on each
node. See MES Prerequisite Software on page 18.

Hardware and Software Requirements


For hardware, software, operating system, and database requirements to install the MES software, see the MES
Readme, System Requirements section.
For updates to this information, see the AVEVA Knowledge and Support Center
https://softwaresupport.aveva.com website.

Notes About Security and Permissions


Note the following about security and permissions when running an MES installation:
 The user performing the installation must have administrator privileges for the Windows operating system
on the node on which the software is being installed.
 Beginning with the MES 2014 R3 (version 5.3) release, MES no longer uses the System Platform User
Account (also known as Admin User) for its inter-node communication. Instead, during the installation, a
services account named WCFHostService for the MES middleware service is created. When configuring the
MES DB/MW Communications component, you can select an option that will provide the necessary
permissions to the MES database server for this service account. See The Middleware Service Windows User
Account and Automatically Setting Database Access on page 73.
 When installing in a workgroup environment, permissions to access the MES database must be granted
manually to the MES middleware service's user account.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 7
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

 Beginning with MES 2020, the MES Middleware Web API uses AVEVA Identity Manager to authenticate
users. This requires that the MES Security Mode in MES Client be set to either OS Group or OS User and that
the AVEVA System Management Server component in the post-install Configurator be configured.
 Other access to the MES middleware for remote users (e.g., using the Stateless API) should be secured
through a VPN connection. It is also recommended that the Windows Firewall be used to limit the users who
are authorized to access the middleware.

MES Firewall Exceptions List and Firewall Ports


The firewall ports and exception white list entries specific to MES applications are created during the MES
DB/MW Communication component configuration. The default HTTPS, HTTP, and SQL Server firewall ports that
are required by MES applications are opened by default on Windows or by installing SQL Server.
The default port numbers that MES uses are listed in the following table.

Port Changeable?
Component
HTTP HTTPS HTTP HTTPS
MES Middleware Proxy Y N
MES Middleware Web API 80 Y N
443
MES Web Portal N Y
System Management Server N/A N Y

For a list of the firewall ports used by other AVEVA products with which MES works, refer to their
documentation:
 License Server and Manager: Enterprise Licensing Guide
 System Platform: System Platform Readme and Application Server User Guide
 Work Tasks: Work Tasks Administrator Guide
 BI Gateway: BI Gateway Installation Guide and BI Gateway Web Configuration Guide
For SQL Server and similar third-party products, refer to the appropriate product documentation.

MES Components
The following topics describe the components that can be installed or added during the MES installation.

Server Components
Database
The MES database is a centralized repository for the MES data.
The Database component also includes the OS Group SID utility, which is used to import Windows Active
Directory group SIDs into the MES database.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 8
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

To optimize performance on a system that will also be running BI Gateway, the MES database should be
installed on a separate server from the BI Gateway database.
Middleware
The MES middleware:
 Enables communication between the client components and the MES database
 Allows the node to support executing archive, purge, and restore (APR) jobs for MES database maintenance
 Changes shifts
 Generates and changes the status of quality samples
 Cleans up stale sessions
 Runs schedules of Supply Chain Connector
The Middleware component also includes:
 The Service Monitor utility, which is used to start, stop, and restart the MES middleware host service from
the Service Monitor icon in the Windows system tray
 The MES Web API, which can be used to develop custom applications
 The MES Clear Parameter Cache utility, which is used to clear the middleware stored procedure parameter
cache
 A License Client API for accessing the License Server
MES Web Portal
MES Web Portal is a web application that provides web-based access to MES.

Client Components
The client components can run on non-server nodes and interact with the server components on the server
nodes.
MES Client
MES Client is used to configure almost all aspects of the MES system, and interact with operational information.
You can:
 Configure system utilization states, reason groups, and reason codes
 Configure users, user groups, privileges, entity access, and user certifications
 Configure languages
 Configure physical entities
 Configure shift patterns and schedules and assign them to entities
 Set up system-wide values such as job states, document types, defaults for file extensions, labor
departments, and labor categories
 Configure General Parameters
 Configure items, BOMs, operations, and processes

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 9
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

 Configure archive, purge, and restore (APR) jobs for database maintenance
 Configure quality specifications, sample plans, and characteristics
 Create and manage work orders and jobs
 Set up data collection
 Store customer information and processing sales orders
For more information, see the MES Client User Guide or online help.
Application Objects
The Application Objects components include:
 The Operations Capability Object (OCO), which extends the System Platform IDE equipment model to trigger
production events and log associated production data in the MES database.
 The Utilization Capability Object (UCO), which extends the System Platform IDE equipment model to
monitor machine performance.
 The Sample Recording Object (SRO), which extends the System Platform IDE equipment model to monitor
quality samples for an entity.
For more information about these objects, see Application Objects on page 11.
Entity Model Builder
Entity Model Builder is a System Platform IDE extension. Therefore, the System Platform IDE must be installed
before attempting to install Entity Model Builder.
You can use Entity Model Builder to perform the following tasks:
 Creating entities from your System Platform equipment model that use the UCO for configuring
utilization/OEE support, the OCO for configuring production related entity support, and/or the SRO for
capturing quality data.
 Exporting the existing System Platform users and roles to MES to create corresponding MES users and
groups.
If you install Entity Model Builder, you must also install the MES Application Objects component and import at
least one of these objects into a System Platform galaxy. Running Entity Model Builder without having an MES
application object installed and imported is not a supported scenario.
For more information, see the MES Entity Model Builder User Guide.
Supervisor
Note: MES Supervisor will be removed in a future release.
You can use MES Supervisor to manage:
 Inventory
 Storage entities
 Supply Chain Connector import and export schedules
For more information, see the MES Supervisor User Guide or the MES Help online help.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 10
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

Note: MES Supervisor is not selected by default for installation. It must be manually selected using the Custom
Installation option during the installation process.

Data Editor
Note: MES Data Editor will be removed in a future release.
You can use MES Data Editor to filter, insert, and modify historical data from the MES database, such as:
 Item production and consumption
 Labor use and entity use
 Step data
 Lot information
For more information, see the MES Data Editor User Guide or the MES Help online help.
Operator
You can use MES Operator to control processes as an operator on the factory floor, such as:
 Executing jobs
 Claiming produced quantities and reporting consumption
 Entering data for steps, specifications, and the data logger
 Capturing machine utilization and labor data
For more information, see the MES Operator User Guide or the MES Help online help.
.NET Controls
The .NET controls are part of the client components’ user interface. You can use these controls as building blocks
for System Platform graphical interfaces and Operations Management Interfaces (OMI).
When the .NET Controls component is installed, the .NET control files and the MESControls.aaPKG file are
installed in the <MES program files path>\Wonderware\MES\Controls folder. The MESControls.aaPKG file,
which contains all of the DLLs, can be imported into the System Platform IDE. The MES Controls folder can be
imported as an OMI app.
Middleware Proxy
The MES middleware proxy is required by client components installed on remote nodes to access the MES
middleware service. These include, for example, nodes that have an application object (that is, a OCO, UCO, or
SRO) deployed on them.

Application Objects
Operations Capability Object (OCO)
The OCO extends the System Platform IDE equipment model to trigger production events and log associated
production data in the MES database.
Once you have deployed the OCO, you can:
 Create jobs running on the entity

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 11
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

 Start, pause, and end jobs on the entity


 Add production and consumption for jobs running on the associated entity.
A single instance of the OCO supports the following Production Events Module (PEM) events of the associated
equipment in the equipment model:
 Material events related to consumption, production, and movement
 Status events related to equipment, production data and operators
The Entity Model Builder (EMB) uses the information that is configured in the OCO to create entities in the MES
database.
You must import the OCO extension that is provided with this version of MES after you complete the
installation. The previous version of OCO will not work correctly with this version of MES. For more information
about how to install the OCO, see the Operations Capability Object User Guide.
Utilization Capability Object (UCO)
The UCO extends the System Platform IDE equipment model to monitor machine performance. The information
that is configured in the UCO is used to configure entities using the Entity Model Builder. Once you have
deployed the UCO, you can:
 Monitor machine performance and log utilization events on entities associated with it
 Set production attributes for jobs running on the associated entities
You must import the UCO extension that is provided with this version of MES after you complete the
installation. The previous version of UCO will not work correctly with this version of MES. For more information
about how to install the UCO, see the Utilization Capability Object User Guide.
Sample Recording Object (SRO)
The SRO extends the System Platform IDE equipment model to monitor quality samples for the entity. Once you
have deployed the SRO, you can:
 Monitor samples and characteristics within the samples
 Update sample information
 Update sample characteristic information
 Record sample characteristic result data
You must import the SRO extension that is provided with this version of MES after you complete the installation.
The previous version of SRO will not work correctly with this version of MES. For more information about how to
install the SRO, see the Sample Recording Object User Guide.

MES BI Gateway Reports Components


If the system includes BI Gateway, you can install the MES BI Gateway Reports component.
If the system does not include BI Gateway but you want to use MES BI Gateway Reports, you can also install the
BI Gateway Server, BI Gateway Model Builder, and BI Gateway Data Adapters components to support those
reports. To optimize performance, the MES database should be on a separate server from the BI Gateway
database.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 12
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

Note: During the installation, selecting the Report Server role option will install only the MES BI Gateway
Reports component. To install the BI Gateway Server, BI Gateway Model Builder, and BI Gateway Data Adapters
components as part of the MES installation, you have to choose the Customize Installation option in the Setup
tool and then manually select these components.
For information about using the MES BI Gateway Reports, see the MES BI Gateway Reports User Guide.

Development Library (API DLLs)


The Development Library component installs the MES API DLLs to support third-party application development.
These DLLs comprise the MES Stateless and Stateful APIs.
If you are upgrading a MES system that have scripts that use the MES Stateless or Stateful API DLLs, you must
also upgrade the DLLs to the current version. After the installation and configuration, see the procedure in
Upgrading MES .NET Controls for AVEVA InTouch HMI Applications on page 143.
The API DLLs that are included in the component are:
 Fact.Client.Common.dll
 Fact.Common.dll
 Fact.Common.Interfaces.dll
 FactMES.API.Commerce.dll
 FactMES.API.Common.dll
 FactMES.API.Core.dll
 FactMES.API.EnProd.dll
 FactMES.API.Labor.dll
 FactMES.API.Prod.dll
 FactMES.API.Quality.dll
 FactMES.API.Util.dll
 FactMES.Client.COM.dll
 FactMES.Client.Common.dll
 FactMES.Client.Interfaces.dll
 FactMES.Client.MiddlewareAccess.dll
For more information about using these DLLs in scripts, see the MES Stateless and Stateful API Reference online
help files.

PDF Documentation
The PDF Documentation component installs the MES user documentation PDFs and online help files.
MES Deployment Guide
Provides guidance on deploying a MES solution.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 13
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

MES Virtual Environment Implementation Guide


Provides information to assist with implementing MES in a virtualized environment.
ReadMe
Provides information about software and hardware requirements, known issues, licensing, and
documentation.
MES Installation Guide and online help
Provides information about installing MES applications.
MES Client User Guide and online help
Provides information about customizing and maintaining the plant floor information.
MES Dynamic Routing User Guide
Provides information required to set up dynamic routing of operations through a process defined in MES.
MES .NET Controls Developer Guide
Provides information about the properties and methods of the MES .NET controls for use in custom
applications and System Platform graphics.
MES Application Object (OCO, UCO, SRO) Help
Provides information about run-time behavior, configuration, and run-time attributes of UCO, OCO, and SRO
application objects. This help is accessed from the Object Editor Help menu in the System Platform IDE.
Operation Capability Object (OCO) User Guide
Provides information about installing, configuring, and using the Operations Capability Object to track
production transactions against equipment.
Sample Recording Object (SRO) User Guide
Provides information about installing, configuring, and using the Sample Recording Object to collect and
store values for samples.
Utilization Capability Object (UCO) User Guide
Provides information about installing, configuring, and using the Utilization Capability Object to collect
equipment performance data.
MES Entity Model Builder User Guide
Provides information about creating entities from the System Platform equipment model.
MES Stateless API Reference online help
Provides information about using the Stateless API within the System Platform IDE to develop and customize
System Platform scripts.
MES Stateful API Reference online help
Provides information about using the Stateful API within the System Platform IDE to develop and customize
System Platform scripts.
MES Web API V1 Reference online help
Provides information about using the MES Web API V1 to develop custom applications.
MES Web API V3 Reference online help
Provides information about using the MES Web API V3 to develop custom applications.
MES Operator User Guide
Provides information about executing production processes at the plant floor using the Operator
application.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 14
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

MES Web Portal User Guide and online help


Provides information about using the web browser-based MES Web Portal to customize and maintain the
MES system and execute jobs at the plant floor.
MES Middleware User Guide
Provides information about how to configure the MES middleware and what regularly scheduled tasks it
performs in the MES system. Also provides information about how to use middleware extensibility hooks to
perform custom actions before or after a specific middleware event is executed.
MES Supervisor User Guide
Provides information about managing inventory and Supply Chain Connector imports and exports.
MES BI Gateway Reports User Guide
Provides information about running and viewing MES BI Gateway Reports.
MES Help
Provides online information about MES Operator, Supervisor, and Data Editor.
MES Data Editor User Guide
Provides information about inserting and modifying data in the MES database.

BI Gateway, Licensing, and AVEVA Single Sign-On Components


The MES installation software also includes the following components:
 BI Gateway, which must be installed if MES BI Gateway Reports are going to be used.
Note: To install the Quality Characteristic Detail report's SPC Chart control, the MES BI Gateway Reports
component must be installed and configured on the same node as the BI Gateway Datastore and SQL Server
Reporting Services (SSRS).

 The License Server and Manager. The licensing components must be installed so that MES product licenses
can be added to the system.
 AVEVA Single Sign-On. The AVEVA Single Sign-On service provides secure access to MES when using MES
Web Portal or the MES Web API in custom applications.
It is possible that these components have already been installed in the system. However, if they are not
installed, then they can be selected during the MES installation using the custom installation feature.
In addition to these two licensing components, there is also a Licensing API that is automatically installed when
the MES Middleware or Web Portal components are installed. The licensing API can also be installed during an
MES command line (silent) installation by specifying LicAPI32 in the response file.

MES Role-Based Installation


The MES Setup tool allows you to select role-based groups of products and components for installation on a
node. The Setup tool also allows you to customize the installation by selecting specific components.
Role-based installation provides a combination of MES features specific to a node's role in a multi-node system.
For example, if the node is going to be located on the production floor for use only by production operators,
then only the Operator role's set of components needs to be installed.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 15
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

Note that more than one role can be selected for installation on a node, to support nodes that will be running a
number of MES clients or services. Although the MES installation software includes a limited version of BI
Gateway Server, none of the MES roles will install BI Gateway. During the installation, you have to select the
customize option to manually select the BI Gateway components.
It is recommended that you identify the appropriate role for each node before starting the installation. For
information about planning what components to install on the MES nodes, see the MES Deployment Guide.
The following roles are available for selection. Note that all roles include the entire library of MES user
documentation by default.
Database Server with MES
Select this role to install the MES database on the node.
This role includes the following components:
 MES Database
 MES Middleware
 MES Middleware Proxy
To optimize performance on a system that will also be running BI Gateway, the MES database should be
installed on a separate server from the BI Gateway database.
Operator Client
Select this role if production operators, application objects, or third-party applications will be using the node to
record production, utilization, or quality management data.
This role includes the following components:
 MES Operator
 MES .NET controls
 MES Development Library (API DLLs)
 MES Middleware Proxy
Web Portal
Select this role to install the MES Web Portal web application on the node.
This role includes the following components:
 MES Web Portal
 MES Middleware Proxy
Report Server
Select this role to install support for deploying MES BI Gateway Reports.
This role includes the following component:
 MES BI Gateway Reports

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 16
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

If you want to deploy MES BI Gateway Reports but BI Gateway has not been installed on the network, you can
customize the installation to include the BI Gateway Server, BI Gateway Model Builder, and BI Gateway Data
Adapters.
MES Middleware/DB Maintenance Server
Select this role to install the MES middleware service on the node, or to support executing
Archive/Purge/Restore jobs to maintain the MES database.
This role includes the following components:
 MES Middleware
 License Client API for accessing the License Server
 MES Middleware Proxy
To distribute the client load, a system can have multiple MES Middleware components installed. All
five-equipment licenses include two MES Middleware components. All larger equipment licenses include six MES
Middleware components. Additional MES Middleware components can be purchased separately. Dedicated MES
Middleware components are recommended for enterprise integration, MES Application object/scripting servers,
Work Tasks .NET workflow integration, and nodes making heavy use of the MES API through custom
applications.
Configuration Client
Select this role if MES administrators, supervisors, or developers will be performing configuration or supervisory
tasks from the node.
This role includes the following components:
 MES Client
 MES Data Editor
 MES Middleware Proxy
System Platform Development
Select this role if MES developers will be using System Platform and MES application objects to develop or run
MES applications on the node.
This role includes the following components:
 Application Objects (OCO, SRO, UCO)
 MES .NET Controls
 MES Entity Model Builder
 MES Development Library (API DLLs)
 MES Middleware Proxy
.NET Development
Select this role if MES developers will be using .NET Controls to develop or run custom MES applications on the
node.
This role includes the following components:

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 17
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

 MES .NET Controls


 MES Development Library (API DLLs)
 MES Middleware Proxy

MES Prerequisite Software


During the installation process, the MES Setup tool analyzes the software installed on the node and includes any
software that is required but not currently installed with the MES components that are being installed. This
analysis is based on the MES role-based installation groups or the custom list of components that are selected to
be installed.
The prerequisite software is listed below, based on the MES role-based installation groups.
If your organization is using MES with System Platform, System Platform 2023 is required and should be installed
or upgraded to prior to installing MES.
All roles require:
 Microsoft .NET Framework 4.8
 Microsoft .NET Core Runtime 6.0
Database Server with MES role requires:
 Microsoft Message Queue (MSMQ) Server
 Safenet Sentinel License Driver version 7.6.8 or higher
Operator Client role requires:
 Microsoft MSMQ Server
Web Portal role requires:
 Microsoft MSMQ Server
 Microsoft Internet Information Services (IIS) version 7.5 or higher
Report Server role requires:
 The version of the Microsoft Visual Studio C++ 4 x64 Runtime Redistributable that is compatible with the
Windows server software that running on the node
MES Middleware/DB Maintenance Server role requires:
 Microsoft MSMQ Server
 Safenet Sentinel License Driver version 7.6.8 or higher
Configuration Client role requires:
 Microsoft MSMQ Server
System Platform Development role requires:
 Microsoft MSMQ Server
 Application Server version compatible with the current version of MES

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 18
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

.NET Development role requires:


 Microsoft MSMQ Server

MES and SQL Server


Note the following about MES and SQL Server:
 If the SQL Server compatibility setting is for SQL Server releases before 2016, it should be changed to 2016
compatibility.
 MES supports SQL Server transport encryption.

Datetime and Decimal Separator Requirements for Windows


Regional Settings and Custom Applications
Windows Regional Settings
MES supports the default settings for datetimes and the decimal separator for any of the Windows regional
formats. This is because the MES client middleware proxy converts regional datetimes to universal time and any
decimal separator to a period (.) before the call is processed by the middleware.
However, changing the datetime format or the decimal separator from their default Windows regional format is
not supported. If custom formats are used, datetimes and doubles might not be stored in the MES database
with expected values or be displayed properly in client applications.
Custom Applications That Pass Datetimes and Decimal Separators in Strings
Custom applications that pass datetimes in strings using the MES Web or Stateless API in any format other than
according to the ISO 8601 standard must pass them in the universal format—that is, yyyy-MM-dd HH:mm:ss
(note that MES does not support milliseconds). Also, doubles should use a period as the decimal separator.
Examples would include passing datetimes and decimal separators in XML strings directly to the middleware
using the Web API DirectAccess or MiddlewareAccess operations or the Stateless API DirectAccess methods.

Running MES in a 2-Node Failover Cluster Environment


There are special installation and configuration considerations when running MES in a 2-node failover cluster
environment.
A typical MES cluster environment would have MES server software running (that is, the MES middleware) on
the two cluster nodes with the MES database on a separate database server.

Installation and Setup Requirements for the Cluster Nodes


In a cluster environment, observe the following installation and setup requirements:
 When configuring the quorum for the cluster, set the quorum mode to Node and Disk Majority.
 For both nodes, set the domain firewall to Off.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 19
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 1 – Preparing to Install MES

 Install any MES licenses on the license server. See Activating the MES Product Licenses on page 32. (Trial
licenses have to be installed on both cluster nodes.)
 Install only the MES server components on both cluster nodes.
 Start the MES middleware service on the host node.

Cluster Environment Considerations During MES Server Component


Installation
When configuring the MES Database Setup component in the post-install Configurator for the cluster nodes:
 Use the same database configuration settings for both cluster nodes.
 Use the same database connection string settings for both cluster nodes.
 Use the single exposed public IP address for the cluster when configuring the Middleware Proxy component.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 20
Chapter 2

Preparing to Upgrade MES

To prepare for upgrading MES to the latest version, you need to be aware of the upgrade requirements and
information about migrating the MES database.

Upgrade Requirements
Observe the following requirements when upgrading MES:
 You cannot upgrade to the current version of MES from a version older than 3.5. To upgrade from a version
older than 3.5 to the current version, you must first uninstall the previous version, and then install the new
version.
 If you are upgrading from version 3.5 or older, it is recommended that you change all passwords, since the
encryption scheme used in the older versions is not as secure as the newer encryption scheme.
 If your organization is using MES with System Platform, System Platform 2023 is required. If the system has a
previous version installed, it must be upgraded to System Platform 2023 prior to installing MES.
 If your organization is using MES .NET controls in System Platform, you have to first remove the previous
version of the MES .NET controls before upgrading to the current version of the controls. For the procedure,
see Upgrading MES .NET Controls for AVEVA InTouch HMI Applications on page 143.
 Any deployed System Platform client controls using MES (for example, MES application objects, API
scripting, .NET controls) should be undeployed from the node prior to upgrading.

Migrating an MES Database to the Current Release


 Make a backup of the existing database prior to upgrading it in case any issues occur during the upgrade
process.
 Make sure that you have enough disk space available on your computer before you start to migrate the MES
database to the latest version. The amount of disk space should be at least equal to the size of your MES
database or 30 GB, whichever amount is larger. Also, in the case of large databases, reduce the size of the
database and the transaction log file before you perform the upgrade. Then reduce the size of the
transaction log after the upgrade is complete.
 If the existing MES database has custom indices and keys that reference core MES tables, they must be
dropped before migrating the database to the current release. If they are not dropped, the database
migration will fail. They can be added back after the migration is complete.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 21
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 2 – Preparing to Upgrade MES

 Migration of MES databases from version 4.0 and later is supported. If you are migrating from versions
earlier than version 4.0, it is recommended to first migrate the database to version 4.0.
Another option is to record the contents of the FactIntelligence.cfg file prior to the upgrade and then use
that information to configure the new database in the post-install Configurator application (the database
connection information will not be automatically populated in Configurator). You can see the settings to
record by running the MES Database Connection String Editor on the old MES version.
Custom modifications to any version of the MES database might not be supported by the post-install
Configurator and might prevent migration. For more information on migrating an existing MES database, see
the procedure in Migrating or Overwriting an Existing MES Database on page 54.
 If you are migrating an MES database from a release prior to version 5.0, it will not have index optimization
that was available starting with the version 5.0. To apply this index optimization to the migrated MES
database, see MES Database Index Optimization Script on page 60.
 If you are migrating an MES database from version 5.3 or earlier, the migration of the utilization table
structure to the new structure can take a long time. A rough estimate is provided prior to migrating it. As a
precaution, all the original data remains in the database in tables labeled tablename_deprecated. Once you
are satisfied that the migration was successful, these tables can be deleted.

Migrated Shift Schedules


When upgrading MES from MES 2020 (6.2) or a prior version to the current version, the shift schedules and their
entity links are migrated to shift patterns, shift schedules, and shift pattern-entity links.
 Shift patterns created from migrated shift schedules are named MES DB n.n Upgrade Pattern – n.
 The shift pattern will have the same entity assignments as the shift schedule on which it was based.
 The shift pattern will have assigned to it any shifts that were defined in the shift schedule on which it was
based.
 The migrated shifts will retain their descriptions.
 Shift exceptions are not migrated during the upgrade. Therefore, any existing shift exceptions might have to
be re-configured.
For more information about shift patterns and schedules, see the MES Client User Guide or help.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 22
Chapter 3

Installing MES

Note the following before starting the installation:


 To install MES, you must have administrator privileges for the Windows operating system on the node on
which the software is being installed.
 It is recommended that you install the required Microsoft .NET Framework release, version 4.8.
 It is recommended that you install all MES product and component prerequisite software before starting the
installation. For more information, see MES Prerequisite Software on page 18.
To install MES products and components
1. Locate the installation folder on the MES installation media that has been loaded or copied to the local
node.
2. Run the Setup.exe file in the root directory of the installation folder.
o If a version of System Platform prior to System Platform 2023 is installed, a message appears that
instructs you to uninstall the previous version before continuing with the MES installation. If this is the
case, upgrade to System Platform 2023 or later before installing MES. Note that you do not have to
uninstall the existing version of System Platform; you can perform an upgrade.
o If previous releases of MES and its related products are already installed on the node, a message
appears that identifies the version and that the product will be updated.

Note: If a version of the License Server and License Manager prior to 3.5 is listed to be updated, it might
not install properly. Refer to step 11 for more information. Note that the License applications might be
identified as AVEVA or Schneider Electric products.
3. Click OK to close the messages.
If the required release of .NET Framework is not installed, you are prompted to install it.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 23
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 3 – Installing MES

Click Yes to install the required release of .NET Framework. At the conclusion of the .NET Framework
installation, you might be prompted to restart the system. If so, restart the system and then rerun the MES
Setup tool to continue with the MES installation.
Otherwise, the Setup tool opens and the Welcome to MES Setup message appears.
4. Click Next.
The End User License Agreement (EULA) appears.
5. Use the options to read the general EULA content and the specific schedules for each of the software
components available in the installation software.
You can use the controls above the license agreement box to print the agreement or adjust how it is
displayed.
6. To continue with the installation, select the I have read and accept the terms ... option, then click Agree.
If you are upgrading MES and any MES applications are running, you are prompted to close them.
The roles by which the MES components are grouped appears. Information about the highlighted role
appears in the description box on the right. For more information about these roles and which products and
components are installed with them, refer to MES Role-Based Installation on page 15.

7. Select the roles whose products and components you want to install on the local node and click Next.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 24
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 3 – Installing MES

A list of the products and components that will be installed appears.

8. Do one of the following, depending on whether you want to customize which products and components will
be installed or change the destination install folder:
 To install the default sets of products and components for the roles you selected and use the default
install destination folder (C:\Program Files (x86)), leave the Customize Installation check box cleared
and click Next.
A list of the prerequisite software that must be installed on the node prior to performing the MES
installation appears. Go to step 11.
 To customize the sets of products and components for the roles you selected, or to change the install
destination folder, select the Customize Installation check box and click Next.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 25
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 3 – Installing MES

The list of products and components appears. The products and components are selected based on the
roles selected in step 7. Information about the selected component appears in the description box on
the right. Go to step 9.

Note: To install the following components as part of the MES installation, you have to choose the Customize
Installation option and then manually select the components: License Server and Manager components;
MES Supervisor; BI Gateway components.
Note: To install the Quality Characteristic Detail report's SPC Chart control, the MES BI Gateway Reports
component must be installed and configured on the same node as the BI Gateway Datastore and SQL Server
Reporting Services (SSRS).
9. To change the install destination folder, click the Browse button and then navigate to and select the desired
folder.
10. To change the products or components to be installed, select the check boxes of only those products or
components that you want to install and click Next.
Note the following:
o If any prerequisite software cannot be installed by the MES installation, it will be identified in a message.
Install this software before proceeding.
o If you are using MES with System Platform, System Platform 2023 or later is required. You will be
prompted to install the Application Server component of System Platform 2023 or later if you selected
the Entity Model Builder.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 26
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 3 – Installing MES

MES is ready to be installed. A list of the products and components that will be installed appears. Also, any
prerequisite software that the MES installation can install is listed under Prerequisites:.

11. Click Install.


If any applications that might conflict with the installation are running, a list of them appears.
You have the following options:
 Close the conflicting applications and then click the Try Again button to see if there are still any conflicts.
 Click Next to continue with the installation.
If any conflicting applications are still running when you click Next, the Configurator tool will tell you if
you need to restart the system when you have finished the MES configuration.
Once the installation begins, the progress status appears.
Note: If the installation is updating a version of License Server and License Manager prior to 3.5, the
following error message might appear, indicating that it did not install properly: Service 'License Server Agent
Service' (License Server Agent Service) could not be deleted. Verify that you have sufficient privileges to
remove system services. To resolve this error, see the instructions below in "Recovering from the License
Manager Installation Error."

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 27
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 3 – Installing MES

When the installation is finished, you are prompted to configure products and components that require
configuration before they can be used.

12. To start the Configurator, click Configure.


The post-install Configurator application opens.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 28
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 3 – Installing MES

Initially, it is possible that not all of the components on which MES is dependent will appear in the
Configurator or will be available to be configured. For this reason, close the Configurator. The necessary
components will appear properly the next time you open the Configurator. However, before using the
Configurator to configure the MES components, see the instructions below in "Next Steps."
Next Steps: Activating the MES Product Licenses and Configuring AVEVA Single Sign-on
Before configuring the MES components in the post-install Configurator:
 The MES product licenses must be activated so that the MES middleware can be started. See Activating the
Product Licenses on page 34.
 If the Single Sign-on Service was installed as part of the MES installation, its component in the Configurator,
System Management Server, has to be configured. See Implementing Secure Communication with System
Management Server on page 47.
MES Service Monitor
If the MES Middleware component was installed on the node, the MES Service Monitor is installed and its icon
(shown below) is added to the system tray.

The Service Monitor allows users to start, stop, and restart the MES middleware host. For more information, see
MES Service Monitor on page 123.
MES Shortcuts in the Startup Menu
On the Start screen, MES application shortcuts will appear in the Manufacturing Execution System group. MES
user documentation shortcuts will appear in the AVEVA Documentation group. If you do not see these groups in
the Start screen, they should appear after restarting the node.
Recovering from the License Manager Installation Error
1. If the post-install Configurator application is open at the conclusion of the MES installation, close it.
2. Reboot the system.
3. Do one of the following:
 In the Control Panel Programs and Features applet, select Manufacturing Execution System and click
Change or Uninstall/Change on the toolbar.
 Run the Setup.exe file in the MES installation root folder.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 29
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 3 – Installing MES

The Setup tool options appear.

4. Select Modify, and then click Next.


The list of MES products and components appears. The check boxes of products and components that are
currently installed are selected by default.
5. Select the three Licensing product options:
o Licensing
o AVEVA Enterprise License Server
o AVEVA Enterprise License Manager

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 30
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 3 – Installing MES

6. Click Next.
7. When you are prompted that the Licensing features are currently installed and will be upgraded, click OK to
proceed with their installation.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 31
Chapter 4

Activating the MES Product Licenses

The MES product licenses must be activated before configuring the MES components with the post-install
Configurator application so that the MES services can be started.
The product license files would have been emailed once an order was placed for the MES product.
To activate the MES product licenses
1. If the License Server has not already been configured, use the post-install Configurator tool to configure it.
See Configuring the License Server Component on page 33.
2. Use the License Manager to activate your MES product licenses. See Activating the Product Licenses on page
34.
With License Manager, you can also:
 View the MES product license usage.
 For an environment in which there are multiple MES systems running and using the same License Manager
Server (for example, separate test and production systems), you can reserve licenses for a specific MES
server.
 Deactivate MES product licenses.
The following topics cover general information for performing these tasks. For more detailed information about
using the License Manager, see the License Manager Guide and the online help.
For more information on licensing requirements for MES, contact your distributor.
BI Gateway Product Licensing
The BI Gateway product uses the Licensing component and activation.
 If using BI Gateway for the MES Reporting content and for additional functionality, follow the licensing
guidelines provided by the BI Gateway documentation.
 If BI Gateway is only being used as the reporting database for MES BI Gateway Reports, then the BI Gateway
Service does not require a license to be activated. The reporting solution only allows a connection to the
MES reporting source. In this scenario, BI Gateway can work with one deployed data source only—the MES
reporting database.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 32
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 4 – Activating the MES Product Licenses

Configuring the License Server Component


1. If the post-install Configurator is not already open, from the Start screen of the node on which MES was
installed, open the Configurator app.

2. In the post-install Configurator, select the License Server component.

3. Enter the server name of the node and click the Test Connection button to verify connectivity to the server.
4. If the test was successful, click the Configure button.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 33
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 4 – Activating the MES Product Licenses

If the License Server was properly configured, a success message appears in the Configuration Messages
box. Also, the License Server status indicator changes to a green check mark.

Activating the Product Licenses


The following procedure is specific to activating MES product licenses. For complete information about
activating and managing product licenses, see the Enterprise License Manager User Guide or help.
1. Do one of the following:
 From the Start men, open the Enterprise License Manager website.
 In a web browser, enter the URL localhost/AELicenseManager.
License Manager opens and the License Server tile should be shown.
2. Click the License Server tile.
The server's license page appears with the License Summary tab selected.
3. Click Add License.
The License Activation dialog appears.
4. Click the Browse license file browse button and then navigate to and select an MES product license.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 34
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 4 – Activating the MES Product Licenses

The license file would have been emailed once an order was placed for the MES product.
The license appears in the license grid.
5. Browse to and add any other MES product licenses to be activated.
6. Select the check boxes for the MES product licenses and click Activate.
The dialog closes and the licenses are listed on the License Summary tab.

You can now continue configuring the MES components.


 To understand how to use the post-install Configurator, see Configuring MES Components on page 41.
 To begin configuring the MES components, see Creating or Migrating MES Databases on page 51.

How MES Product Licenses Are Managed


During MES Middleware Startup
During startup, the MES middleware performs the following steps to acquire licenses:
1. When the middleware starts, it attempts to contact the License Server.
2. If the License Server is found, the middleware attempts to acquire an MES middleware license.
o If a middleware license is not found, the middleware stops.
o If a middleware license has been obtained, then the middleware attempts to acquire licenses for
Operations, Performance, and Quality. If no such licenses are found, only the freely licensed features
will be active.
o If the License Server is in Grace Period, the middleware stops.
3. The middleware requests the License Server for an MES middleware count by node name.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 35
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 4 – Activating the MES Product Licenses

4. The middleware requests all entity counts by a name built from the MES database server name and MES
database name.
Note: When entering the server name during MES middleware configuration, use either the host name or IP
address. Be consistent in this when configuring MES middleware on different nodes, as the system will not
know that a host name and IP address point to the same server. See Specifying the MES Production
Database Connection String. If you enter localhost, it will be converted to the local server name when
building the database connection string.
For example, it might request 20 Operations entities, 10 Performance entities, 5 Quality entities, 35
Production entities, and 205 Storage entities (Inventory).
Note that the name can be altered to remove any characters that are not allowed in the naming of Windows
files and directories, since the License Server uses the name to create a directory on the server itself.
o If any counts cannot be acquired, the middleware reports warnings but still starts.
o If another MES middleware already has these licenses but by a different name, there will be an error
and the middleware will not start.
o If another MES middleware already has these licenses using the same name (that is, both are configured
against the same database Server/database name), then the middleware will start with the same counts
as the already running middleware.
5. If using Enterprise Integration, the Enterprise Integration service first attempts to acquire the professional
feature and then the standard feature. Either feature enables MES Supply Chain Connector functionality
During Run Time
 During run time, the middleware validates its connection to the License Server every hour. If it fails to
contact the License Server, warnings are logged but all calls will continue to be executed.
Note: Do not attempt to restart the middleware without a connection to the License Server as the middleware
will not start.

 If a license expires, the middleware will log a warning within one day of expiration and then every day for
two weeks before no longer allowing calls to pass through.
 When a middleware shuts down, it releases the Middleware count feature. If it is the last middleware to
shut down (that is, no other middleware features are in the acquired state), then the middleware also
releases the Operations, Performance, Quality, Production, and Inventory features. This behavior is relevant
only if the middleware is sharing licenses with other MES middleware instances. Note that sharing means
that the various middleware instances are configured to use the same database server node and database.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 36
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 4 – Activating the MES Product Licenses

Viewing MES Product License Information


Summary Information on the Usage Summary Tab
You can view summary information about each of the features of the activated product licenses on the Usage
Summary tab.

The Usage Summary tab shows the combined count of a specific feature. In this example, the license server has
a 1000-equipment count license for Operations, Performance, and Quality. Each of these provide 6 middleware
counts for a total of 18. They each also provide a total count of 10,000 production entities that can run jobs. The
Operations license provides for a total of 20,000 inventory entities. In this example, there are no licenses
reserved, 1 MES Middleware license in use, and all functional entities acquired.
Detail Information on the License Details Panel
You can view details about a product license, such as the quantities available for each feature included in the
license, from the License Summary tab.
1. On the License Summary tab, select the check box of the product license.
2. Click Details.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 37
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 4 – Activating the MES Product Licenses

The License Details panel appears.

You can also view details about MES product license feature usage on the License Manager Usage Details tab.

The features that are available from the activated product licenses are listed. Included in the information is to
what device they are currently assigned and the In Use/Total counts.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 38
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 4 – Activating the MES Product Licenses

Reserving Licenses When Multiple MES Systems Are Deployed


If you have multiple MES deployments (that is, multiple MES databases) and are managing their product licenses
through one License Server, you can use the Reservation feature to reserve features for a particular deployment.
Although this is possible, it is recommended to use separate license servers for each when possible.
Using the Reservation feature through one License Server requires that there be two or more license counts
available. So, for example, if the license server has both a 10-count Performance license and a 100-count
Performance license installed, it is possible to reserve the 10-count license for a development/test server and
the 100-count license for a Production server.
When configuring reservations, only reserve the functional features (MES Operations Functional Entities, MES
Performance Functional Entities, and MES Quality Functional Entities). The production entities and inventory
entities are automatically calculated from the functional features acquired and do not require separate
reservations. You can also reserve middleware instances but note that they are acquired by node name and
must be reserved by the node name. If there is no concern about running out of middleware instances, then
there is no reason to reserve them.
Reservations can be released.
While reserving licenses is possible, it does cause the system to behave slightly different with releasing feature
counts. Since middleware instances share licenses and only the last middleware to shut down will release its
feature counts, there will be features indicating they are still in use even after all systems are shut down. As an
example: Two reservations are made for MESDB A and MESDB B. A middleware for MESDB A starts and acquires
its feature counts and then a middleware for MESDB B starts and acquires its features counts. The License
Manager shows the two different devices and the licenses acquired. The middleware for MESDB A shuts down
but sees that there is still a remaining middleware license in use and does not release its feature counts. The
middleware for MESDB B shuts down and, being the last middleware, releases its licenses. The licenses from
MESDB A still remain and would show in use even though there are no middleware instances running. In
general, this will not cause a problem as the next time a middleware from MESDB A starts, it will get the same
licenses that it had previously.
To reserve MES features for a MES server:
1. On the Device Reservation tab, click Add Device.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 39
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 4 – Activating the MES Product Licenses

The Add Device dialog appears.

2. In the Device Name field, enter the device name as the MES server name and the MES database name with
an underscore (_) character between them.
The server name cannot contain any special characters that are not allowed in the naming of Windows files
and directories.
3. For each feature to be reserved for this device, select the feature and enter the count to be reserved In the
Count column.
4. Click Add.

Deactivating MES Product Licenses


You can deactivate an MES product license for use on another MES deployment.
1. On the License Summary tab, select the check boxes of the product licenses to be deactivated.
2. Click Deactivate.
The product licenses are now available for use on another deployment.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 40
Chapter 5

Configuring MES Components

MES configuration is performed by configuring the MES components in the post-install Configurator application.
The topics in this section:
 Describe the Configurator
 Explain how to specify SQL Server user authentication in Configurator, which is required for several of the
MES components
 Explain closing Configurator and whether the node needs to be restarted to complete the configuration
 Discuss post-configuration tasks
Details about how to configure the MES components are described in the following sections. The sections are in
the recommended order for configuring them.
 Implementing Secure Communication with System Management Server on page 47
 Creating or Migrating MES Databases on page 51
 Configuring MES Middleware Communication with MES Databases on page 62
 Configuring the MES Middleware Proxy on page 86
 Configuring MES Web Portal on page 92
 Configuring and Deploying MES BI Gateway Reports on page 102

About the Post-Install Configurator


MES configuration is performed using the same post-install Configurator application that is used by other AVEVA
software components that are installed with the common installation mechanism.
To run the Configurator, you must have Windows administrator privileges on the node.
To start the Configurator
 Do one of the following:
 On the last screen of the MES Setup tool, click the Configure button.
 From the Start menu, open the Configurator app.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 41
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 5 – Configuring MES Components

 Launch the Configurator application file from Windows Explorer. The default path is:
C:\Program Files (x86)\Common Files\ArchestrA\Configurator.exe
Product Tree
The post-install Configurator includes a product tree that lists the components for each of the products that
require post-installation configuration.

If Configurator has been launched from the Configure button on the last page of the MES Setup tool, then only
the MES-related components are listed in the product tree. Otherwise, all products and components that can be
configured are listed.
The MES components are listed in the order in which they are recommended to be configured. This starts with
creating or migrating the MES database, configuring the MES middleware and security settings to access the
MES database, and finishing with the Middleware Proxy, Web Portal, and BI Gateway Reports components.
Configuration Status
The status of each product or feature configuration is indicated by the following icons.

An error occurred during configuration.

The component is installed but not configured.

The configuration is complete, but with warnings.

The configuration completed successfully.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 42
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 5 – Configuring MES Components

Required or Invalid Entries


Boxes that have no entry but are required or have an invalid entry are outlined in red to indicate the condition,
as shown below.

Configuration Messages
As you perform configuration tasks, messages appear in the Configuration Messages box. Messages indicating
errors are highlighted in red.

To view additional information about a message


 Double-click the message.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 43
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 5 – Configuring MES Components

A dialog box appears with the additional information.

To view the entire Configurator message log


 Click the All Messages button.
The message list appears in a new window.

To save the list of messages in the Configurator Messages Lists window to a text file
 Click the Export to file button.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 44
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 5 – Configuring MES Components

Specifying SQL Server User Authentication


Several of the product components require you to specify a user account to access SQL Server. The MES
components use a common interface that might look slightly different from other product components. For the
MES components, the two user account options are described below.
 To use the currently logged-in Windows user account, select the Use Windows integrated security option.
No user name or password entry is required.

 To use SQL Server Authentication, clear the the Use Windows integrated security option. Enter the
appropriate SQL Server Authentication user name and password.

If using this option, make sure that the SQL user account has been created. If the user account is being used
to access the MES production or restore database, make sure that it is assigned the appropriate database
roles. See Manually Adding a SQL Server Login for the Middleware Service on page 64.

Closing Configurator
After completing the configuration tasks in Configurator, you can close it. Depending on what components were
configured, you might have to restart the node to finalize the configuration and start the required services at
startup.
To close Configurator
1. Click the Close button.
If configured components require a node restart, you are prompted to restart the computer.
2. Click one of the buttons to restart the node now or later.
If you click the Restart Later button, you will have to restart the node before attempting to use MES on it.

Post-Configuration Tasks
After you have configured the MES components, depending on which components were installed and
configured you might have to perform the following tasks:

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 45
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 5 – Configuring MES Components

 If the Application Objects component was installed, you will have to import the updated objects into the
System Platform IDE. For more information, refer to the object guides.
 If the Development Library was installed and a previous version of the MES Client API script libraries was on
the Application Server, you will have to upgrade them. See Upgrading the MES Client API Script Libraries on
page 142.
 If the MES .NET Controls component was installed and a previous version of them was being used in the
System Platform IDE, you will have to upgrade them in the System Platform IDE. See Upgrading MES .NET
Controls for AVEVA InTouch HMI Applications on page 143.
 If MES BI Gateway Reports were installed, they must be deployed. See Configuring and Deploying MES BI
Gateway Reports on page 102.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 46
Chapter 6

Implementing Secure Communication with


System Management Server

Security measures for System Platform network topology are enabled through the System Management Server
and the AVEVA Identity Manager (AIM). These measures include secure encrypted communications between
nodes, AVEVA Single Sign On (SSO), and certificate management. The System Management Server stores shared
security certificates and establishes a trust relationship between nodes in the System Platform network
topology. These security components together make up the common platform security measures.
If not already installed as part of a System Platform installation, System Manager Server and AIM are installed
when any of the following MES components are installed: MES Middleware, MES Middleware Proxy, and MES
Web Portal.
To implement secure communication with the MES middleware and for user authentication with the MES Web
API, the System Management Server must be configured prior to configuring the MES components in the
post-install Configurator. If MES is being upgraded, then the MES components must be reconfigured to
implement the latest security measures. In addition, all MES nodes on the network must be able to
communicate with the System Management Server.
Note: MES does not support Azure AD in the System Platform configuration of System Manager Server.
There should only be a single System Management Server in your System Platform network topology (additional
redundant single sign-on servers can be configured). However, each node in the network has a System
Management Server component that must be configured using the post-install Configurator.
Note: System Management Server's Redundant Single-Sign On capability is not supported by the MES
middleware or MES Web Portal.
The System Management Server component settings include:
 Specifying whether the System Management Server is on the local node or a remote node.
 If on the local node, specifying the HTTPS port for the System Management server. This port number also
serves as the HTTPS port number for the local node's common platform communication over web ports.
 If on a remote node, specifying the HTTPS port used by the local node for common platform communication
over web ports. Generally, this will be the same as the HTTPS port number for the System Management
Server, but it could be different.
For complete information about configuring System Management Server, refer to the topic "System
Management Server Configuration" in the System Platform Installation Guide.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 47
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 6 – Implementing Secure Communication with System Management Server

The procedures for configuring the MES components will refer to the System Management Server settings as
needed.

MES Settings Affected When the System Management Server


HTTPS Port Is Changed
If the System Management Server or common platform HTTPS Port number is changed, the following MES
components are affected and need to be reconfigured in the post-install Configurator.
DB/MW Communication
 If the System Management Server HTTPS Port number is changed, on the AVEVA Identity Manager tab
change the AIM HTTPS Port number to match it and reconfigure the DB/MW Communication component.
See Configuring AVEVA Identity Manager Client Registration on page 77.
 If the System Management Server and MES middleware are on different nodes and the common platform
HTTPS Port number is changed on the MES middleware node, reconfigure the DB/MW Communication
component on that node. See Reconfiguring the DB/MW Communication Component If the Common
Platform HTTPS Port Number Is Changed on page 80.
Middleware Proxy
 If the System Management Server and MES middleware are on the same node and the HTTPS Port number
is changed, change the proxy HTTPS Port number to match it and reconfigure the Middleware Proxy
component.
 If the System Management Server and MES middleware are not on the same node and the common
platform HTTPS Port number for the MES middleware node is changed, change the proxy HTTPS Port
number to match it and reconfigure the Middleware Proxy component.
See Configuring the MES Middleware Proxy on page 86.
Web Portal
If the System Management Server HTTPS Port number is changed, change the AIM HTTPS Port number to match
it and reconfigure the Web Portal component.
See Configuring the MES Web Portal Component on page 92.

System Management Server and Local Node Common Platform


HTTPS Port Settings
The common platform HTTPS and HTTP port settings that the System Management Server uses are on the Ports
tab of the System Management Server component's Advanced Configuration dialog.
 If the System Management Server is on the local node, the port settings can be changed from their default
values on this tab.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 48
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 6 – Implementing Secure Communication with System Management Server

 If the System Management Server is on a remote node, they are shown on this tab but cannot be edited.
They can only be changed from the remote node.

Creating Client IDs to Obtain AIM Access Tokens


Custom client applications require an AIM token to access MES. When a valid client ID and client secret are
passed to AIM, an AIM access token is returned. This token is then required to be passed to access MES for the
current client application user session.
The MES installation software includes a PowerShell script that can be used to create the client IDs. You can
create as many AIM client IDs as are needed to support the MES custom client applications.
The PowerShell script creates a service-to-service flow.
 For service-to-service, the MES middleware uses the default background user configured for the User ID for
background tasks system attribute (configured in MES Client; attr_id 199 in the System_Attr table). The
default entry for this system attribute is Default Background User.
 By default, the lifetime of the token is 24 hours. To change this setting, you can edit the PowerShell script.
To create an AIM client ID
1. Open a user session on the node on which the System Management Server is running.
2. In the MES installation software on that node, open the \InstallFiles\CD-MES\AIMRegistration folder.
3. As an admin user, open the PowerShell script file RegisterAIMServiceClient.ps1.
4. Complete the prompts for the following input:
Client ID
The client ID to be used by the custom client application.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 49
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 6 – Implementing Secure Communication with System Management Server

Client Secret
A secret, or password, for the client ID.
User Name (domain\user) and Password
A user name and password that has login access to AIM.
After completing entries to these prompts, the client ID registration is performed and you should see a
message indicating that the client has been registered successfully. This client ID and client secret can now
be used by client applications to obtain AIM access tokens.

Using an AIM Client ID to Obtain an Access Token


A client application initiates a user session with MES by first obtaining an AIM access token.
The following client ID information must be provided:
 Client ID
 Client Secret
For example:
 When using MES Web API calls, the client ID and secret must be passed when obtaining an AIM access
token. For an example of an Application Server-based script that passes this information when obtaining a
token, see the topic "Application Server Usage Example" in the MES Web API V3 Reference help.
 When using the MES Web API with MES model-driven application content and service-to-service token
access, the client ID and token information is provided in the Work Tasks Edit Web API List Item form. For
more information, see the topic "Configuring User Access Token Mode for the MES Web API" in the MES
Web API V3 Reference help.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 50
Chapter 7

Creating or Migrating MES Databases

The first step in configuring a new MES system is to create the MES database. This step requires a SQL Server
database server to be available on the network or local node. A Windows or SQL Server user account with access
to the server and rights to create a database must be known to successfully configure the Database Setup
component.
The MES Database Setup component settings in the Configurator allow you to:
 Create the MES production database, and optionally a restore database, for a new installation
 Migrate an existing MES database to the current MES version
 Dump the MES database scripts to disk, so they can be customized and used to create a custom MES
database

Fixing Database Table Fragmentation


To fix table fragmentation, any MES database that has a page count of 1,000 or greater will be automatically
evaluated for reindexing when it is created or migrated.
 If an index's fragmentation is greater than 5% but less than or equal to 30%, the index will be reorganized.
 If an index's fragmentation is greater than 30%, the index will be rebuilt.

Creating an MES Database


The Database Setup component can be used to create as many MES databases as are needed. The databases
can be on the same or different SQL Server database servers to support production, restore, test, development,
and other types of databases.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 51
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 7 – Creating or Migrating MES Databases

The initial MES Database Setup component settings and controls are shown in the following figure.

To create an MES database


1. Complete the database server and MES database name settings:
Server Name
The name of the server that is hosting the MES database. The server name defaults to the local server.
Supported server names include IP names (IPv4 and IPv6), SQL server named instance conventions, cluster
names, and SQL Server Availability Groups.
When using a Failover or Availability Group naming convention, the configuration must be performed when
the primary node is active.
Database Name
The name of the MES database. The name defaults to MESDB.
2. Specify the user account to use to access SQL Server.
For more information about specifying a user account, see Specifying SQL Server User Authentication on
page 45.
3. To access SQL Server and check for the existence of the specified database, click Validate.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 52
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 7 – Creating or Migrating MES Databases

If the validation is successful and the named database does not exist, the New Database settings appear.

If the named database exists but is not an MES database, an error message appears.
4. Optionally, to set the path, initial size, or percentage growth of either the MES database's data file or log file,
click the Advanced settings title to expand the settings.

Path
The path of the data or log file.
Initial Size
The initial size, in MB, of the data or log file.
Percent Growth
The percent by which to limit the percent growth of the data or log file.
When you have completed validating the SQL Server connection and optionally entering any advanced
database settings, you are ready to create the MES database.
5. Click Configure.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 53
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 7 – Creating or Migrating MES Databases

The SQL scripts that create the database run. A message appears, asking to wait while the database
configuration is performed.

Progress information and any errors, if they occur, appear in the Configuration Messages box.
If the database creation completes successfully, a success message appears in the Configuration Messages
box. Also, the MES Database Setup status indicator changes to a green check mark.
If errors are encountered, check the Operations Control Management Console Log Viewer for details. To
enable additional details, enable the Log Script Execution log flag in the Log Viewer and run the Configure
operation again.

Migrating or Overwriting an Existing MES Database


If you are upgrading MES and there is an existing MES database, you have the following options:
 Migrate the existing database to the new MES version.
 Overwrite the existing database with a new MES database.
 Keep the existing database and not run the MES Database Setup configuration. Note that this option leaves
the database unusable, as the current version of MES will not work with a previous version of the database.
To migrate or overwrite an existing MES database
1. Complete the database server and MES database name settings:
Server Name
The name of the server that is hosting the existing MES database. The server name defaults to the local
server. Supported server names include IP names (IPv4 and IPv6), SQL server named instance conventions,
cluster names, and SQL Server Availability Groups.
When using a Failover or Availability Group naming convention, the configuration must be performed when
the primary node is active.
Database Name
The name of the existing MES database. The name defaults to the existing database, if one is found.
2. Specify the user account to use to access SQL Server.
For more information, see Specifying SQL Server User Authentication on page 45.
For the Database Setup component, the user account provided must have adequate rights on SQL Server to
create a database.
3. To check that the user account you have specified can access the specified SQL server and MES database,
click Validate.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 54
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 7 – Creating or Migrating MES Databases

As part of the validation, as estimate is calculated for how long upgrading the existing database will take. If
the estimate is more than 10 minutes, the estimated time is displayed in a message box.

If the validation is successful, the Existing Database settings appear.

If the specified database is not found, then the settings for creating a new database appear. Try entering the
correct name for the existing database and clicking the Validate button again.
4. Do one of the following:
 To migrate the existing database to the new release, select the Overwrite and Migrate data options.
Then go to step 6.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 55
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 7 – Creating or Migrating MES Databases

 To overwrite the existing database with a new MES database, select the Overwrite option but clear the
Migrate data option. Then go to step 5.
When the Overwrite option is selected and the Migrate data option is cleared, the Advanced settings
title appears with the settings collapsed.
 To keep the existing database and not run the Database Setup configuration, select the Keep option.
Note: If you choose to overwrite or migrate the existing MES database, it is strongly recommended that you
back up the existing database before proceeding in case you need to recover its content. You can back up
the database from SQL Server Management Studio.
5. Optionally, to set the path, initial size, or percentage growth of either the new MES database's data file or
log file, click the Advanced settings title to expand the settings and enter them. Then go to step 7.

Path
The path of the data or log file.
Initial Size
The initial size, in MB, of the data or log file.
Percent growth
The percent by which to limit the percent growth of the data or log file.
6. If the existing MES database that you are migrating has the system parameters for recording distinct
production records set but instead you want to aggregate these records into hourly records and disable
distinct production records, select the Aggregate existing item production records option.
If the existing MES database already has the system parameters for recording distinct production records set
to False, then the setting of this option has no effect.
It is recommended to aggregate production records into hourly buckets, as this will improve the overall
system performance for recording production and reporting on production data. In versions prior to MES
version 4.5, recording distinct production records was required for reporting hourly KPIs, but this is no
longer the case. You might still want distinct production records for other reasons, in which case do not
select this option.
7. To migrate or overwrite the existing MES database, click Configure.
CAUTION: While the database is being migrated from a prior version, the Configurator application cannot be
closed or switched to a different component's configuration. If the Configurator application is stopped
prematurely (such as closing the application or shutting down the computer), the MES database will be in an
inconsistent state and might not function correctly.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 56
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 7 – Creating or Migrating MES Databases

The SQL scripts that migrate or create the database run. A message appears, asking to wait while the
database configuration is performed.

Progress information and any error messages appear in the Configuration Messages box.
If the database migration or creation completes successfully, a success message appears in the
Configuration Messages box. Also, the MES Database Setup status indicator changes to a green check mark.
During migration, if the database is configured to use OS Group security and does not already have the OS
Group SIDs in the MES database, the configure operation will attempt to create them. If the domain is not
available, then use the OS Group SID Utility to update them later when the domain is available. See Importing
Windows Active Directory Group SIDs into the MES Database.
If migrating from MES 2014 R3 (version 5.3) or earlier, the migration process creates new tables for tracking
utilization data and moves the existing data into these new tables. The original tables still remain in the
database but have been renamed to util_log_deprecated, job_util_log_link_deprecated, and
tpm_stat_deprecated. These deprecated tables can be deleted once the migration is deemed to have completed
successfully. New views are created with the original table names of util_log, job_util_log_link, and tpm_stat to
ensure any existing queries or reports continue to function after migration.

Creating a Customized MES Database Using Modified Database


Scripts
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.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 57
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 7 – Creating or Migrating MES Databases

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.
To create a customized MES database using modified database scripts
1. Modify the scripts as needed.
2. 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.
3. If the validation is successful, complete the necessary database settings.
For details, see either Creating an MES Database on page 51 or Migrating or Overwriting an Existing MES
Database on page 54.
4. 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.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 58
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 7 – Creating or Migrating MES Databases

Importing Windows Active Directory Group SIDs into the MES


Database
If an existing MES database has the MES Security Mode system parameter set to OS Group and there is
connectivity to the Windows Active Directory (AD) domain controller, then the group SIDs are updated
automatically during the database migration process. (For information about setting the MES Security Mode
system parameter, see the MES Client User Guide or online help.)
However, if the AD domain controller was temporarily not able to be contacted at the time of the upgrade, a
message indicating that the server could not be contacted will appear in the Configurator Configuration
Messages box. This is because the AD domain controller from which to retrieve the SIDs could not be found.
When contact with the AD domain controller is restored, the group SIDs can be retrieved and updated in the
MES database using the following procedure.
To import the Windows AD group SIDs into the MES database
1. From the Start menu, open the OS Group SID Importer app.

The OS Group SID Import Utility window appears.

2. Click Start.
The SID import progress appears. During the import process, the Start button becomes a Stop button to
allow you to stop the import. The utility will retrieve only the SIDs for any group that does not have a SID in
the database. This might happen so quickly that you cannot detect the button label transitioning from Start
to Stop and back to Start.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 59
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 7 – Creating or Migrating MES Databases

When the import is complete, the completion status appears in the window.

3. Check the status messages to see if any groups have errors. These errors will have to be addressed and the
utility run again to correct the errors.
4. Click the window's Close button to close the utility.

Recommendations for Optimizing the MES Database


For MES version 5.0, the MES database structure was optimized by adding new indices and removing other
indices that were no longer needed. A fresh installation of MES version 5.0 or later will include the optimized
index scheme.
However, these optimizations are not automatically applied when migrating MES databases for versions prior to
version 5.0. This approach was used to prevent custom index optimizations that might have been applied to the
MES database from being overwritten.
If your MES database has not had custom index optimizations and you would like to incorporate the version 5.0
optimization scheme, you can run an index optimization script that is installed as part of the MES database
installation.
The following topics describe the optimization script and provide some additional optimization
recommendations.

MES Database Index Optimization Script


If your MES database has not had custom index optimizations and you would like to incorporate the version 5.0
optimization scheme, you can run an index optimization script.
The index optimization script is stored in a SQL directory in the following directory path:
…\Wonderware\MES\Database\Optional Scripts\SQL Server
The script is called Version 5.0 Index Changes.

Monitoring Actual System Usage


The optimal set of indexes is strongly dependent on the actual usage of the system; that is, how frequently data
is:

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 60
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 7 – Creating or Migrating MES Databases

 Added
 Changed
 Read
 Deleted or moved to offline storage (and thus in conjunction with the how frequently data is added, how big
various tables can become)
So actual statistics about the usage of the database should drive the choice of indexes.
Be careful to collect statistics during a wide enough period of time so that the results are representative of the
way the system operates as a whole. Traffic at a shift change, for example, might be very different from that in
the middle of a shift. Also, be sure to catch the generation of any large sets of periodically-generated reports.
Monitoring system activity should be an ongoing database administration task. As the system grows and its
usage changes over time, new statistics should be obtained and indexes should be re-examined.

How Many Indexes to Use


Indexes typically help to speed up retrieving data but slow down writing data. The optimal amount of indexes
depends on your actual system activity. Putting indexes on everything or having no indexes at all are probably
extremes to be avoided—though having many bad indexes is worse than not having any.

Frequency of Index Rebuilding and Reorganizing


Periodic rebuilding or reorganizing of indexes is a normal part of maintaining a database. There are rules of
thumb (though not hard and fast numbers) for the points at which these should occur. Consult SQL Server web
resources for more information.

Choosing What to Index


Choosing what to index depends on the structure of your typical query statements. For example, to be used for
SELECT statements, indexes have to match at least the beginning of the WHERE clause. A simple index on
column A would not be usable for the SELECT statement "WHERE B = 6 and A = 99"; neither would a composite
index on columns A and B. A simple index on just column B would be usable; so would a composite index on
columns B and C. Best of all, from the standpoint of that specific query, would be an index on columns B and A.
It would not matter (again from the standpoint of this specific query example) whether it also included other
columns after those.

Additional Assistance
There are automated tools available to help you find missing indexes that ought to be added, as well as
identifying unused indexes that can be dropped. A web search on "SQL Server index optimization" will result in
numerous links to such tools.
You can also consult web resources for SQL Server database maintenance for specific information about those
databases. For more information, see the Microsoft SQL Server web site.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 61
Chapter 8

Configuring MES Middleware


Communication with MES Databases

The DB/MW Communication component is used to create the database connection strings that the MES
middleware service uses to access MES databases. In addition:
 It is used to create a firewall inbound rule exception to allow the MES middleware proxies to communicate
securely with the MES middleware.
 It is used to register the MES middleware with the AVEVA Identity Manager (AIM) for the MES Web API
authentication.
 It can also be used to assign the minimal SQL permissions required to access and query an MES database to
the MES middleware service's Windows user account. Otherwise, the SQL permissions have to be assigned
manually.
If the MES middleware and the MES database are on separate nodes, the Microsoft Distributed Transaction
Coordinator service (MSDTC) must be added to the Windows Firewall exception list on both nodes to allow them
to communicate.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 62
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

The Security tab of the DB/MW Communication component is shown below.

The Security, AVEVA Identity Manager, and Production tabs, and optionally the Restore tab if the Enable
Restore Database option is selected, need to be completed before clicking the Configure button to configure
the component. The order in which they are completed does not matter. The next few topics describe the
Production and Restore tabs first, and then the Security and AVEVA Identity Manager tabs.
 Database connection string information is entered on the Production and Restore tabs.
 The MES middleware service's Windows user account is shown on the Security tab. If this user account will
be used to access the MES database using Windows integrated security, then the option to automatically
create a SQL Server login for that account is also provided on this tab.
 The AVEVA Identity Manager client registration information for the MES middleware on this node is entered
on the AVEVA Identity Manager tab.

Using Windows Integrated Security vs. SQL Authentication to


Access the MES Database
The MES middleware service must be assigned to a SQL Server login that has the proper permissions to access
the MES database.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 63
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

Unless Workgroups is being used to manage user accounts and the middleware is on a different node than the
MES database, the MES middleware service can use Windows integrated security to access the MES database. If
this approach is chosen, the MES DB/MW Communications component Security tab includes an option to
automatically add the middleware service Windows user account as a SQL Server login when the MES DB/MW
Communications component is configured.
If Windows integrated security is not or cannot be used, then the middleware service must use an existing SQL
Server login with the appropriate access to the MES database. See Manually Adding a SQL Server Login for the
Middleware Service on page 64.

Manually Adding a SQL Server Login for the Middleware Service


If the MES middleware service is going to use SQL authentication to access the MES database, a SQL Server
database administrator must create the middleware service SQL Server login and grant the roles and minimal
permissions described in this topic to it.
Proper permissions are granted by assigning the following SQL Server database roles to the SQL Server login.
Alter
Required to add attributes that will be seen in the work queue and the inventory grid, which alters tables in
the MES database.
Connect
Required to connect to the MES database.
Delete
Required to be able to delete records from the MES database.
Execute
Required to execute SQL commands on tables in the MES database.
Insert
Required to be able to insert records into the MES database.
Select
Required to be able to do selections on the MES database.
Update
Required to be able to update records in the MES database.
It is important that you do not grant these database roles to the SQL Public server role. Instead, they should be
granted to the middleware service SQL Server login. This login should be assigned the Public server role, as
described in the following procedure.
The screen shots in this procedure are based on SQL Server Management Studio 18. Depending on what version
you are using, the steps and screens might be different.
To create the MES middleware service SQL Server login
1. If the MES database has not been created yet, run the MES installation and configure the MES Database
Setup component in the post-install Configurator to create it.
2. Log into SQL Server Management Studio as a user with administrator rights.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 64
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

3. In the Object Explorer window, create a SQL Server login by right-clicking Logins under Security and then
clicking New Login.

The Login - New dialog appears.

4. In the General settings, select SQL Server authentication, enter the login name and password, and clear
Enforce password policy.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 65
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

5. In the Server Roles settings, assign the MES middleware service login only the Public server role, as shown
below.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 66
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

6. In the User Mappings settings, select the MES database and any other database to which the MES
middleware service requires access, as shown below.

7. Click OK to save the SQL login.


The dialog closes and the login is added to the list in Logins under Security in the Object Explorer window.
8. In the Object Explorer window, under Databases right-click the MES database and click Properties.
The Database Properties window appears.
9. In the Permissions settings, select the MES middleware service SQL Server login you just created in the User
or roles list.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 67
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

10. Select the Grant check box for each of the required database roles: Alter, Connect, Delete, Execute, Insert,
Select, and Update.

11. Click OK to save the assignments.


You can now use the username and password of this SQL Server login for the Database Connection settings of
the DB/MW Communications component Production and Restore tabs.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 68
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

Specifying the MES Production Database Connection String


The production database connection string information is entered on the Production tab. The connection string
specifies which MES database to use as the production database, the user account for accessing it, and any
additional advanced connection settings.

1. Complete the database server and MES database name settings:


Server Name
The host name or IP address of the server that is hosting the MES production database. The server name
defaults to the node's host name if a connection string was not previously saved or to the server name
entered for the previously saved connection string. Supported server name entries include IP addresses
(IPv4 and IPv6), SQL server named instance conventions, cluster names, and SQL Server Availability Groups.
When using a Failover or Availability Group naming convention, the configuration must be performed when
the primary node is active.
Note: For the server name, enter either the host name or IP address. Be consistent in this when configuring
MES middleware on different nodes, as the system will not know that a host name and IP address point to
the same server. If you enter localhost, it will be converted to the local server name when building the
database connection string.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 69
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

Database Name
The name of the MES production database.
If this is a new installation and the connection string has not been created yet, the name defaults to MESDB.
If the connection string has been previously created or the database was migrated from a previous release,
the actual database name appears.
2. Specify the user account that the MES middleware service will use to access the MES production database.
If the Use Windows integrated security option is selected, then the MES middleware will use the MES
Middleware Host user account that appears on the Security tab. Otherwise, the MES middleware will use
the SQL Server login entered here.
When using SQL Server credentials, the login entered here must have appropriate rights and access to the
MES database. This configuration component will not grant privileges to a SQL Server login. See Manually
Adding a SQL Server Login for the Middleware Service on page 64.
For more information about entering a user account, see Specifying SQL Server User Authentication on page
45.
3. (Optional) Configure the connection string's Advanced Settings.
The advanced settings allow you to set properties that affect the database connection behavior, such as
tuning the connection to your environment or setting up database mirroring. For example, entering Connect
Timeout=300 would cause the connection to attempt to connect to the database for up to 300 seconds.
For a list of the SQL database connection properties that can be set, see the SqlConnectionStringBuilder
Class topic in the Microsoft online documentation.
Any advanced settings will be appended to the database connection string.
4. Click the Validate button.
The system checks the database connection using the entered settings. It also returns the Preferred MW
Host and the Default Time Zone settings that are currently set in the MES database. When the Database
Setup component is configured, the time zone is set to the local time zone of the server where the MES
database is installed.
5. (Optional) If multiple MES middleware hosts are running in a multi-node environment, select the Preferred
MW Host: Set to current middleware host check box to specify the local middleware host as the preferred
middleware host for the MES system.
The preferred MES middleware host handles all scheduled tasks, such as:
o Executing minutely, hourly, and daily tasks for the management of shifts and utilization reasons
o Cleaning up stale sessions
o Running Supply Chain Connector (SCC) schedules
o Generating future quality samples.
If a preferred MES middleware host is not specified for the system, the first available middleware host will
be used to perform scheduled tasks.
Clearing the Preferred MW Host: Set to current middleware host check box will remove the designation of
a preferred MES middleware host in the system.
6. (Optional) To change the default time zone for the database, select it in the Default Time Zone list.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 70
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

Note: If you click the Validate button before clicking the Configure button, the Preferred MW Host and
Default Time Zone settings will be reset to those currently in the database.
Next:
 If using an MES restore database, you are ready to specify the MES restore database connection string. See
Specifying the MES Restore Database Connection String on page 71.
 If not using an MES restore database, you are ready to configure the MES middleware user account's access
to the database. See The Middleware Service Windows User Account and Automatically Setting Database
Access on page 73.

Specifying the MES Restore Database Connection String


The restore database connection string information is entered on the Restore tab. The connection string
specifies which MES database to use as the restore database, the user account for accessing it, and any
additional advanced connection settings.
The restore database must be a different database than the production database and already exist in SQL
Server.
1. If MES is going to support a restore database, make sure that the restore database has already been
created. If it has, select the Enable Restore Database option.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 71
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

The Restore tab appears.

During an MES upgrade, if a restore database was previously configured, the Enable Restore Database
option will be selected by default, even if the restore database no longer exists.
2. Complete the database server and MES database name settings:
Server Name
The host name or IP address of the server that is hosting the MES restore database. The server name
defaults to the node's host name if a connection string was not previously saved or to the server name
entered for the previously saved connection string. Supported server name entries include IP addresses
(IPv4 and IPv6), SQL server named instance conventions, cluster names, and SQL Server Availability Groups.
When using a Failover or Availability Group naming convention, the configuration must be performed when
the primary node is active.
Note: For the server name, enter either the host name or IP address. Be consistent in this when configuring
MES middleware on different nodes, as the system will not know that a host name and IP address point to
the same server. If you enter localhost, it will be converted to the local server name when building the
database connection string.
Database Name
The name of the MES restore database.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 72
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

If this is a new installation and the restore database connection string has not been created yet, the name
defaults to RestoreDB. If a restore database connection string has been previously created or the database
was migrated from a previous release, the actual database name appears.
3. Specify the user account that the MES middleware service will use to access the restore database.
If the Use Windows integrated security option is selected, then the MES middleware will use the MES
Middleware Host user account that appears on the Security tab. Otherwise, the MES middleware will use
the SQL Server login entered here.
When using SQL Server credentials, the login entered here must have appropriate rights and access to the
MES database. This configuration component will not grant privileges to a SQL Server login. See Manually
Adding a SQL Server Login for the Middleware Service on page 64.
For more information about entering a user account, see Specifying SQL Server User Authentication on page
45.
4. (Optional) Configure the connection string's Advanced Settings.
The advanced settings allow you to set properties that affect the database connection behavior, such as
tuning the connection to your environment or setting up database mirroring. For example, entering Connect
Timeout=300 would cause the connection to attempt to connect to the database for up to 300 seconds.
For a list of the SQL database connection properties that can be set, see the SqlConnectionStringBuilder
Class topic in the Microsoft online documentation.
Any advanced settings will be appended to the database connection string.
5. Click the Validate button.
The system checks the database connection using the entered settings.
Note: If you click the Validate button before clicking the Configure button, the Preferred MW Host and
Default Time Zone settings on the Production tab will be reset to those currently in the database.
Next, you are ready to configure the MES middleware user account's access to the database. See The
Middleware Service Windows User Account and Automatically Setting Database Access on page 73.

The Middleware Service Windows User Account and Automatically


Setting Database Access
The Security tab shows the Windows user account that is currently assigned to the MES middleware service.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 73
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

If you are using Windows integrated security for the database connection strings on the Production and Restore
tabs, you can select the Set the minimal SQL permissions on the database for the service account option. This
will cause the middleware service Windows user account to automatically be added as a SQL Server login when
the DB/MW Communications component is configured. This login will have the permissions to perform
transactions with the MES database.

Account Name
A read-only field that shows the Windows user account that is currently assigned to the MES middleware
service. The default user account is NT Service\WCFHostService, which is created during the MES Middleware
component installation. This is a virtual service account that is based on using Active Directory (AD) for user
account management.
 If AD is being used to manage user accounts, you can leave the default user account or change it to another
AD user account.
 If Workgroups is being used to manage user accounts, you must change the middleware service's user
account to a local Workgroups user account. Also, if the MES database is on a remote server, the
Workgroups user account must also be set up on the remote node where the database is located.
Changing the user account should be performed prior to the MES DB/MW Communication component
configuration.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 74
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

To change the user account


1. Open the Services control panel applet and locate the MES Middleware Host service.
2. Right-click the service entry and click Properties.
3. Enter the new user account on the Log On tab.
If you change the user account after the MES DB/MW Communication component has been configured, perform
the configuration again. For additional information about changing the service's Windows user account if the
MES middleware and database are on different server nodes, see Guidelines for the MES Middleware Service
Windows User Account on page 76.
Set the minimal SQL permissions on the database for the service account
Select this option to automatically add the middleware service Windows user account as a SQL Server login
when the DB/MW Communications component is configured.
This option can be used in the following two scenarios:
 AD is being used to manage user accounts.
 Workgroups is being used to manage user accounts and the MES middleware service is running on the same
node as the MES database server.
Both of these scenarios also require that the database connection strings on the Production and Restore tabs
are set to use Windows integrated security.
If Windows integrated security is not or cannot be used, then the middleware service must use an existing SQL
Server login with the appropriate access to the MES database. See Manually Adding a SQL Server Login for the
Middleware Service on page 64.
If you run the DB/MW Communication configuration and the middleware service user account was not given the
minimum SQL permissions to access the MES database, sample SQL statements to provide authorization are
logged in the output window. You can also run these SQL statements manually to provide the minimum SQL
permissions to the local user account.
Production Database Admin Credentials for setting permissions
This setting only appears if the Set the minimal SQL permissions option is selected.
The user account specified here is used to create the SQL Server login for the middleware service Windows user
account for the MES production database. Therefore, the user must have the SQL Server administrator
credentials required to add a SQL Server login and assign it access to the MES production database.
 To use the currently logged-in Windows user account, select the Use Windows integrated security option.
 To use a SQL Server login, clear the Use Windows integrated security option and enter the SQL Server login
username and password.
For more information about specifying the user account to access SQL Server, see Specifying SQL Server User
Authentication on page 45.
Note that if a SQL Server login is provided for this option, the account information is not persisted by the
Configurator.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 75
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

Use Production Database Credentials for Restore Database


This setting only appears if the Enable Restore Database option and the Set the minimal SQL permissions
option are selected.
Select this option to use the same user account to create the SQL Server login for the MES restore database as
the one being used for the production database.
If not selected, the Restore Database Admin Credentials for setting permissions option appears.
Restore Database Admin Credentials for setting permissions
This setting only appears if the Set the minimal SQL permissions option is selected and the Use Production
Database Credentials for Restore Database option is not selected.
The user account specified here is used to create the SQL Server login for the middleware service Windows user
account for the MES restore database. Therefore, the user must have the SQL Server administrator credentials
required to add a SQL Server login and assign it access to the MES restore database.
 To use the currently logged-in Windows user account, select the Use Windows integrated security option.
 To use a SQL Server login, clear the Use Windows integrated security option and enter the SQL Server login
username and password.
For more information about specifying the user account to access SQL Server, see Specifying SQL Server User
Authentication on page 45.
Note that if a SQL Server login is provided for this option, the account information is not persisted by the
Configurator.
Next Step
After configuring the middleware security settings, you are ready to register the MES middleware with the
AVEVA Identity Manager. See Configuring AVEVA Identity Manager Client Registration on page 77.

Guidelines for the MES Middleware Service Windows User Account


If the MES middleware and database are on different server nodes, use the following guidelines to change the
MES middleware service's Windows user account from the default account. This will ensure that the MES
middleware user account has proper SQL permissions for the MES database.
Note that changing the MES middleware service's user account should be performed prior to configuring the
DB/MW Communication component.
Using a Domain User Account
If the account used by the MES middleware service is a valid domain account (for example,
ourDomain\mesuser), then that domain account can be used when the minimum SQL permissions are set
during the DB/MW Communication component configuration.
Using a Virtual Service Account
If the account used by the MES middleware service is a virtual service account (for example, NT
Authority\Network Service or NT Authority\Local Service), then the minimum SQL permissions that are set
during the DB/MW Communication component configuration will be given against the domain and the MES
Middleware server node (for example, ourDomain\MESMWNode$).

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 76
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

Using a Local User Account


If the account used by the MES middleware service is a valid local account (for example,
MESMWNode\mesuser), then that user account will not be given the minimum SQL permissions during the
DB/MW Communication component configuration. Sample SQL statements to provide authorization are logged
in the output window. You can run these SQL statements manually to provide the minimum SQL permissions to
the local user account.

Configuring AVEVA Identity Manager Client Registration


The MES middleware's Web API is implemented using the security measures for System Platform that are
enabled through the System Management Server. These measures include secure encrypted communications
between nodes, AVEVA Single Sign On (SSO), and certificate management. The AVEVA Identity Manager (AIM)
manages the SSL certificates.
Regardless of whether the MES Web API is going to be used, the MES middleware must be registered with the
Identity Manager.
When you configure the MES DB/MW Communication component:
 The MES middleware fetches the SSL certificate from the Identity Manager Server and adds the information
to the local node's Trusted Root folder.
 The MES middleware is registered with the Identity Manager.
 A Windows firewall inbound rule exception is created to allow the MES middleware proxies to communicate
securely with the MES middleware.
Note: System Management Server's Redundant Single-Sign On capability is not supported by the MES
middleware or MES Web Portal.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 77
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

The Identity Manager client registration information for the MES middleware is entered on the AVEVA Identity
Manager tab.

 Complete the client registration settings:


AIM Host
The fully qualified domain name of the node on which the Identity Manager is running.

Note: IP addresses are not supported.


AIM HTTPS Port
The port number for the Identity Manager. The port number defaults to the default HTTPS port (443).
The Identity Manager port number must match the System Management Server's HTTPS port number, which
can be viewed or set on the System Management Server component's Advanced Configuration settings (see
System Management Server and Local Node Common Platform HTTPS Port Settings on page 48).
User Name and Password
The user name and password of an admin account on the node on which the Identity Manager is running. If
user accounts are managed with Windows Active Directory, the User Name entry must include the domain
and user name in the format domain\username.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 78
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

Next Step
After completing the Identity Manager registration information, you are ready to test the database connection
settings and save them. See Testing and Saving the Database Connection Settings on page 79.

Testing and Saving the Database Connection Settings


When you have finished specifying the MES middleware and database connection settings on the Security,
Production, AVEVA Identity Manager, and optionally the Restore tab, you are ready to test and save them.
To test and save the database connection settings
 Click the Configure button.
During the configuration, the following occurs:
 If the Set the minimal SQL permissions option on the Security tab was selected, the minimal SQL
permissions to the databases for the MES middleware service Windows user account are granted. This is
performed regardless of whether the connection string tests are successful.
 The local Trusted Root folder is checked to see if the SSL certificate from the Identity Manager already exists.
 The MES middleware client registration with the Identity Manager is performed.
 The database connection strings are tested and saved.
 MES middleware custom performance monitor counters are installed. For more information about these
counters, see MES Middleware Performance Counters.
 MES middleware service user account access to the Archive root directory is set, to support MES database
Archive/Purge/Restore operations.
 The Archive root directory is specified by the Archive root directory path system parameter, which can be
modified in MES Client. The default path is <MES application folder path>\MES\Archives.
 The MES Async Private Message Queue—mesasyncqueue—is created, with the following permission
settings:
o Everyone: Send Message
o Anonymous Logon: Send Message
o MES Middleware Service user account: Receive Message and Peek Message
o Users in the local Administrators group: Full control
 The MES middleware service user account access to the HTTPS port is set so that the MES middleware can
open a secured HTTPS connection on this port.
 A Windows inbound firewall rule exception for the configured TCP port is added so that the middleware
proxy on a client node can connect to the middleware without having to disable the Windows Firewall on
the MES middleware node. TCP information required to add the rule exception is read from the middleware
configuration file. Note that changes to the middleware configuration file should only be performed using
the Middleware Configuration Editor.
 The MES middleware is started.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 79
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

Reconfiguring the DB/MW Communication Component If the


Common Platform HTTPS Port Number Is Changed
The MES Web API uses the HTTPS port that is specified in the common platform HTTPS Port setting of the
System Management Service component's Advanced Configuration dialog (see System Management Server and
Local Node Common Platform HTTPS Port Settings on page 48).
If the common platform HTTPS Port number is changed in the System Management Server component for the
node on which the MES middleware is configured, reconfigure the DB/MW Communication component on that
node so that the MES Web API uses the appropriate port.

Addressing MES Middleware Configuration Issues


Access to Message Queuing system message is denied
If the message Access to Message Queuing system message is denied appears in the Configuration Messages
box, the current Windows user does not have the required permissions to access the MSMQ MESAsyncQueue.
The appropriate permissions—all permissions except Special permissions—can be assigned on the Security tab
of the MESAsyncQueue Properties dialog box, accessed in the Control Panel Computer Management applet. See
the example below for the user mesadmin.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 80
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

Please remember to restart your middleware service to utilize new connection strings
If the message Please remember to restart your middleware service to utilize new connection strings appears in
the Configuration Messages box, the middleware failed to restart. You will have to start the middleware
manually for the database connection setting changes to take effect. See Starting, Stopping, and Restarting the
MES Middleware Host on page 123.
Database Connection Fails
If any of the database connections fail, correct the settings that caused the failure and click the Configure button
again. Once the connections are successful, the MES middleware service is started (or restarted) so that it is
using the most recent settings. The success or failure of the restore database connection does not affect the
starting of the MES middleware service.

Adding MSDTC Firewall Exception for Remote MES Middleware to


Database Communication
If the MES middleware service and the MES database are on separate nodes, the Microsoft Distributed
Transaction Coordinator service (MSDTC) must be included in the Windows Firewall exception list on both nodes
to allow them to communicate.
This procedure is based on Windows Server 2019; depending on what Windows version you are using, the steps
and screens might be different.
1. On the node, navigate to the Windows Defender Firewall settings in the Control Panel.
2. Click the Allow an app through Windows Firewall link.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 81
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

The Allow Apps settings and controls appear.

3. Click the Allow another app button.


The Add an app dialog box appears.

4. Click the Browse button, select the msdtc.exe file in the folder C:\WINDOWS\system32, and click Open.
The MSDTC service is added to the apps list.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 82
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

5. Select the MSDTC service and click Add.

The MSDTC service is added to the apps list.

6. Click OK to close the Allow Apps settings and controls and save the addition of the MSDTC service to the
exceptions list.

Configuring the MSDTC Component Services


If the MES middleware service and the MES database are on separate nodes, you must configure the MSDTC
component services on both nodes to allow them to communicate.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 83
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

The following procedure is based on Windows Server 2019; depending on what Windows version you are using,
the steps and screens might be different.
1. On the node, in the Administrative Tools section of the Control Panel, open Component Services.
The Component Services window appears.
2. In the left pane, expand Component Services, Computers, My Computer, and Distributed Transaction
Coordinator.

3. Right-click Local DTC, and then click Properties.


The Local DTC Properties dialog box appears.
4. On the Security tab, select the following options:
o Network DTC Access
o In the Client and Administration section, Allow Remote Clients and Allow Remote Administration.
o In the Transaction Manager Communication section, Allow Inbound and Allow Outbound.
o No Authentication Required.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 84
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 8 – Configuring MES Middleware Communication with MES Databases

o Enable XA Transactions

5. Click OK to close the window and save your changes.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 85
Chapter 9

Configuring the MES Middleware Proxy

You can access a MES middleware server from remote nodes on which MES client products or components are
running by configuring the MES middleware proxy on the remote nodes.
 You must install the MES middleware proxy on all remote nodes on which OCOs, UCOs, or SROs are
configured (e.g., using System Platform Object Editor or through GR-Access) or deployed to run. For
high-transaction MES objects, it is recommended that a full MES Middleware component be installed on the
node hosting MES objects.
 If you are configuring the MES middleware proxy on a node, make sure that you have installed, configured,
and started the MES middleware service on the remote server before configuring the MES middleware
proxy.
 In a multi-node system that has multiple MES middleware servers installed, each middleware server can be
configured for the proxy to use. This allows the proxy to move communications to another middleware
server if its current middleware server stops running. If this occurs, the proxy will attempt to connect to the
next middleware server according to their order in the list.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 86
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 9 – Configuring the MES Middleware Proxy

The MES Middleware Proxy component is shown in the following figure.

The default proxy connection information that is set here is used by all client applications running on the
computer. An individual application can override the information with its own connection information.
To configure the MES middleware proxy
1. To add a middleware server to the list, click Add.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 87
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 9 – Configuring the MES Middleware Proxy

A server entry is added to the list.

2. Enter the proxy settings for each middleware server:


Middleware Host
The fully qualified domain name of the node on which the middleware service is running.
Protocol
The communication protocol, TCP or HTTP, to use for communications with the MES middleware service.
The default is TCP.
HTTP is typically used when the Middleware Server and client nodes are not located in the same building.
TCP is typically used when the Middleware Server and client nodes are located in the same building.
HTTP Port
The HTTP port number used by the MES middleware's WCFHostService account for sending asynchronous
messages, such as for MSMQ and EventBroker.
If the Security Mode for HTTP Communication setting in the Middleware Configuration Editor is set to
NONE and HTTP is being used rather than TCP for communication between the middleware server and client
middleware proxies, this is also the HTTP port number that the MES middleware server and proxies will use.
The default value is 80, which is the default port number for HTTP. The port number entered here must
match the HTTP Port setting in the Middleware Configuration Editor.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 88
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 9 – Configuring the MES Middleware Proxy

The HTTP port is always used to retrieve the middleware configuration settings regardless of the Protocol
setting. You must change this value only when you cannot access port 80 through the firewall.
HTTPS Port
The port number for the MES Web API.
The default value is 443, which is the default for HTTPS.
The port number entered here must match the common platform HTTPS Port setting of the node on which
the MES middleware is running. On the MES middleware node, this setting is on the System Management
Service component's Advanced Configuration dialog (see System Management Server and Local Node
Common Platform HTTPS Port Settings on page 48).
3. Click Configure.
If the middleware proxy can communicate with a middleware service successfully, a success message
appears in the Configuration Messages box.
If the proxy could not successfully communicate with a middleware service, a failure message appears in the
message box.
The MES Middleware Proxy component configuration status changes according to the following conditions:
 If the proxy was able to successfully communicate with all of the middleware servers, the indicator changes
to . Client applications on the node can now communicate with any of the middleware servers.
 If communication failed with one or more middleware servers but succeeded with at least one, the indicator
changes to . Client applications on the node can now communicate with any of the middleware servers
for which communication succeeded.
 If communication failed with all of the middleware servers, the proxy component configuration fails and the
indicator changes to . Communication with at least one of the middleware servers will have to be
established before client applications on the node can use the MES proxy.
To remove one or more middleware servers from the list
1. Select the server entries.
2. Click Remove.
Reconfiguring the Middleware Proxy If the MES Middleware HTTPS Port Number Is Changed
 If the System Management Server and MES middleware are on the same node and the HTTPS Port number
is changed, change the proxy HTTPS Port number to match it and reconfigure the Middleware Proxy
component.
 If the System Management Server and MES middleware are not on the same node and the common
platform HTTPS Port number for the MES middleware node is changed, change the proxy HTTPS Port
number to match it and reconfigure the Middleware Proxy component.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 89
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 9 – Configuring the MES Middleware Proxy

Implementing Middleware Server and Proxy Communication When


Using Windows Workgroups
To make user account setup easier for small systems (for example, for demo or proof-of-concept systems), MES
supports using Windows Workgroups instead of Active Directory to manage user accounts. Refer to the
following subtopics to ensure proper communication between the MES middleware and client middleware
proxies when using Workgroups.
Adding Client Node User Accounts to the MES Middleware Server Node
If your network is using Windows Workgroups to manage user accounts rather than an Active Directory domain
controller, MES user accounts on the client nodes must also be added to the node where the MES Middleware
Server is located. This will allow those MES users on the client nodes to perform operations through the MES
middleware.
You can add users to the MES Middleware Server node using the Computer Management applet, which can be
accessed from the Administrative Tools applet in the Control Panel. In the Computer Management applet, go to
System Tools, Local Users and Groups, and then Users or Groups. You can right-click Users or Groups and then
select Help to get more information on adding a user account and assigning it to a group.
After adding the client user accounts to the Middleware Server node, restart all affected nodes.
Reinstating TCP Communications Between Nodes
If TCP is being used for middleware-to-middleware proxy communication and the TCP connection is lost
between a client node and the Middleware Server node, try restarting both nodes. This should reinstate the TCP
connection.

Addressing a "Proxy Failed to Connect to Middleware Server" Error


If communication with the MES middleware is down and the Logger shows the message Proxy failed to connect
to Middleware Server service endpoint, perform the following steps to verify that the middleware configuration
is correct.
1. From the command prompt on the client application node, use the ping command to verify that there is
TCP/IP connectivity with the Middleware Server node.
2. On the Middleware Server node:
o In the post-install Configurator, verify that the MES DB/MW Communication component is installed
correctly and its status is Configured (green indicator).
o From the Windows Services app or from the Service panel, verify that the Wonderware MES Middleware
Host service is running.
o Verify that a firewall inbound rule exception has been added to Windows Defender Firewall Allowed
Apps page with the name MES Middleware TCP NetBinding and that its Domain and Private check
boxes are selected. Or verify that the Windows Domain Networks firewall status is off.
3. If the MES middleware and client middleware proxy are on different nodes, then in the post-install
Configurator on each node verify that the HTTP and HTTPS port numbers configured for the MES
Middleware Proxy component on the client proxy node match those configured for the MES Middleware
Proxy component on the Middleware Server node.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 90
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 9 – Configuring the MES Middleware Proxy

If the MES Middleware and client middleware proxy are on the same node, then in the post-install
Configurator verify that the HTTPS port number configured for the MES Middleware Proxy component is the
same HTTPS port number configured for the System Management Server (click Advanced and refer to the
Ports tab on the Advanced Configuration dialog).
4. If the MES middleware and client middleware proxy are on different nodes, then in the post-install
Configurator verify the following about the System Management Server:
o If the System Management Server configuration on the Middleware Server node is set to This node is
the System Management Server, then the System Management Server configuration on the client
middleware proxy node should be set to Connect to an existing System Management Server and point
to the Middleware Server node.
o If the System Management Server configuration on the Middleware Server node is set to Connect to an
existing System Management Server and the configured target node is different than the client
middleware proxy node, then the System Management Server configuration on the client middleware
proxy node should use the option Connect to an existing System Management Server and use the same
target node name of the System Management Server that is configured on the Middleware Server node.
That is, the target node being pointed to as the location of the existing System Management Server
should be the same on the Middleware Server and client middleware proxy nodes.
o If the System Management Server configuration on the Middleware Server node is set to Connect to an
existing System Management Server and the configured target node is same as the client middleware
proxy node, then the System Management Server configuration on the client middleware proxy node
should be set to This node is the System Management Server.
5. In the post-install Configurator on the node where the System Management Server resides, verify that the
System Management Server status is Configured (green indicator).

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 91
Chapter 10

Configuring MES Web Portal

MES Web Portal configuration includes the following:


 To set up MES Web Portal, you must configure the MES Web Portal component in Configurator. The
configuration process:
o Installs the MES Web Portal web site in Internet Information Services (IIS) and creates the required
directories and files on the server node.
o Performs the Identity Manager client registration for the MES Web Portal
o Sets the SSL certificate and HTTPS port for the MES Web Portal.
See Configuring the MES Web Portal Component on page 92.
 Once the component is configured, you can change the Web Portal user session cache refresh rate. See
Setting the Web Portal User Session Cache Refresh Rate on page 100.
 Changing MES Security Mode requires that the MES middleware be restarted. See Restarting the MES
Middleware If MES Security Mode Is Changed on page 100.
Note: System Management Server's Redundant Single-Sign On capability is not supported by the MES
middleware or MES Web Portal.

Configuring the MES Web Portal Component


Note: The MES Web Portal configuration requires that the IIS default web site be called Default Web Site. If this
name has been changed (for example, to Default Website with no space in Website), then the configuration will
fail.
The MES Web Portal component, shown in the following figure, includes Identity Manager settings. These
settings specify:
 The Identity Manager client registration for the MES Web Portal
 The SSL certificate and HTTPS port for the MES Web Portal

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 92
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 10 – Configuring MES Web Portal

To configure the MES Web Portal


1. Decide whether to select the Update option. See Addressing IIS Feature Delegation Conflicts on page 94.
2. Complete the Identity Manager client registration settings:
AIM Host
The fully qualified domain name of the node on which the Identity Manager is running.
If you enter localhost or the standard host name, it will be converted to the fully qualified domain name
during configuration.
AIM HTTPS Port
The port number for the Identity Manager.
The default value is 443, which is the default for HTTPS.
The Identity Manager port number must match the System Management Server's HTTPS port number, which
can be viewed or set on the System Management Server component's Advanced Configuration settings (see
System Management Server and Local Node Common Platform HTTPS Port Settings on page 48).
User Name and Password
The user name and password of an admin account on the node on which the Identity Manager is running. If
user accounts are managed with Windows Active Directory, the User Name entry must include the domain
and user name in the format domain\username.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 93
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 10 – Configuring MES Web Portal

3. Complete the SSL configuration settings:


SSL Certificate
The SSL certificate for MES Web Portal.
If you switch from an SSL certificate that has already been configured to a different certificate, you will get a
warning prompt indicating that the HTTPS port is already configured with the thumbprint of the current
certificate. To proceed with replacing the currently configured certificate, click Yes. To cancel the
replacement of the currently configured certificate, click No.
Note the following about assigning an SSL certificate to MES Web Portal:
o MES Web Portal can be assigned a wildcard SSL certificate, which can cover multiple subdomains of your
domain. For example, the wildcard certificate that is issued for *.yourdomain.com could cover
plantA.yourdomain.com, plantB.yourdomain.com, and so on.
o The certificate that is assigned to MES Web Portal can be different than the certificate that is assigned to
the System Management Server.
HTTPS Port
The port number for MES Web Portal.
The default value is 443, which is the default for HTTPS.
This port number does not need to match the System Management Server HTTPS Port number.
4. Click Configure.
The Configurator checks for IIS feature delegation conflicts. If any IIS feature delegation conflicts are found,
a message is logged that feature delegations were detected that must be added to the IIS configuration to
support MES Web Portal. For more information, refer to Addressing IIS Feature Delegation Conflicts on page
94.
When the MES Web Portal configuration is complete, a success message appears in the Configuration
Message box. Also, the MES Web Portal status indicator changes to a green check mark.
Reconfiguring the Web Portal If the System Management Server HTTPS Port Number Is Changed
If the System Management Server HTTPS Port number is changed, change the AIM HTTPS Port number to match
it and reconfigure the Web Portal component.

Addressing IIS Feature Delegation Conflicts


IIS feature delegation allows a web administrator to manage certain web configuration features. Web
configuration is also handled by a web application’s web.config file.
If some of the web feature delegation settings are locked in IIS (that is, their delegation is set to Read Only), then
MES Web Portal cannot automatically include those configuration settings in the MES Web Portal web.config
file.
There are two options for handling this conflict:
 Select the Update option and click the Configure button. The Configurator will update the IIS
applicationHost.config file with the proper MES Web Portal configuration settings, and remove those
settings from the MES Web Portal web.config file. (The feature settings can only be included in one of these
files, but not both. Otherwise, the MES Web Portal web site will not run.)

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 94
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 10 – Configuring MES Web Portal

 Do not select Update option and click the Configure button. The Configurator does not update the IIS
applicationHost.config file and leaves the conflicting feature settings in the web.config file. A message is
logged that feature delegations were detected that must be added to the IIS configuration to support MES
Web Portal.
To allow the MES Web Portal web site to run, a web administrator must then either:
o Change the setting for the conflicting feature delegations to Read/Write in IIS Manager, or
o Edit the IIS applicationHost.config file manually to set the feature settings to the appropriate MES Web
Portal values and remove those settings from the MES Web Portal web.config file.
For instructions about how to set feature delegations in IIS Manager and how to manually modify the
applicationHost.config file, refer to the IIS Feature Delegation topics on the Microsoft TechNet web site.

IIS Feature Settings for MES Web Portal


Following is a list of the IIS feature delegations whose settings must be specified either in the MES Web Portal
web.config file (if the feature delegation in IIS Manager is set to Read/Write) or the IIS applicationHost.config
file (if the feature delegation in IIS Manager is set to Read Only). The headings in the list are the actual names of
the feature delegations, which are listed in the Features Delegation screen of IIS Manager.
If any of the MES Web Portal configuration settings are specified in the IIS applicationHost.config file, then they
must be removed from the MES Web Portal web.config file.

Authentication – Anonymous
Conflicts with web.config section:
<security>
<authentication>
<anonymousAuthentication enabled ="false">
</anonymousAuthentication>
</authentication>
</security>

Authentication – Windows
Conflicts with web.config section:
<authentication mode="Windows"></authentication>

MIME Types
Conflicts with web.config section:
<staticContent>
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<remove fileExtension=".json" />
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>

Handler Mappings
Conflicts with web.config section:

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 95
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 10 – Configuring MES Web Portal

<handlers>
<remove name="WebDAV" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
</handlers>

Modules
Conflicts with web.config section:
<modules runAllManagedModulesForAllRequests="true"
runManagedModulesForWebDavRequests="true">
<remove name="RoleManager" />
<remove name="WebDAVModule" />
</modules>

Default Document
Conflicts with web.config section:
<defaultDocument>
<files>
<remove value="default.aspx" />
<remove value="iisstart.htm" />
<remove value="index.htm" />
<remove value="Default.asp" />
<remove value="index.html" />
<remove value="Default.htm" />
<remove value="index.cshtml" />
<add value="MES.cshtml" />
</files>
</defaultDocument>

Error Pages
<httpErrors>
<clear/>
</httpErrors>

Making the Root SSL Certificate Available to MES Web Portal Users
A Root SSL certificate is a certificate issued by a trusted certificate authority (CA). By default, the Windows
Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the
requirements of the Microsoft Root Certificate Program.
The System Management Server has a private CA that can be used to issue self-signed certificates for use by
HTTPS connections to nodes in the System Platform network topology. The root certificate for this private CA is
installed in the Trusted Root Certification Authorities certificate store. The root certificate name for a self-signed
certificate that was issued by the System Management Server includes the host name of the node on which the
AVEVA Identity Manager is running followed by ASB Root CA (e.g., MESTP ASB Root CA).

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 96
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 10 – Configuring MES Web Portal

If the Identity Manager and MES Web Portal are installed on different nodes, the root certificate file for the
certificate that was assigned to MES Web Portal must be installed in Windows on client machines of Web Portal
users. This enables the client machines to trust and allow the HTTPS connection to MES Web Portal. You have to
provide the root certificate file to those users. Instructions for exporting the root certificate to a file are
provided below. The MES Web Portal User Guide and help include instructions for how to install the Root
certificate file in Windows on a client machine.
To export the root certificate to a file
1. On the node on which the Identity Manager is running, open Microsoft Management Console (open the Run
application and type mmc).
A console window appears.
2. On the File menu, click Add/Remove Snap-in.
3. On the Add or Remove Snap-ins dialog, select Certificates and click Add >.
4. On the Certificates snap-in dialog, leave the default selection and click Finish.
5. On the Add or Remove Snap-ins dialog, click OK.
6. In the console window navigation panel, expand Certificates, expand Trusted Root Certification Authorities,
and select Certificates.
The trusted root certificate CAs are listed.
7. Locate the root certificate CA for the certificate that was assigned to MES Web Portal.
The CA selected in the figure below is an example of a private CA used by System Management Server.

8. Right-click the root certificate CA, click All Tasks, and then click Export.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 97
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 10 – Configuring MES Web Portal

The Certificate Export Wizard appears.

9. Click Next.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 98
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 10 – Configuring MES Web Portal

10. Leave the default No, do not export the private key option selected and click Next.

11. Leave the default DER encoded binary file format option selected and click Next.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 99
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 10 – Configuring MES Web Portal

12. Enter a file path and file name for the certificate file, then click Next.

13. Review the file settings and click Finish.

Restarting the MES Middleware If MES Security Mode Is Changed


If the MES Security Mode is changed (by changing the Security Mode system parameter in MES Client), you have
to restart the MES middleware. This causes the security mode change to be implemented for MES Web Portal.

Setting the Web Portal User Session Cache Refresh Rate


There are two configuration settings in the <appSettings> section of the MES Web Portal web.config file for
setting the cache reset rate for an MES Web Portal user session:
 LongLivedCacheExpirationMinutes. This setting is used for the license setting and for the security mode. The
default is 60 minutes.
 ShortLivedCacheExpirationSeconds. This setting is used for all other cached values, which include the user’s
settings, privileges, entity access, and line access. The default is 2 seconds.
Entering a value of 0 turns off the cache completely for that cache setting.
If you change a cache refresh setting, you must restart the MES Web Portal web site in IIS for the change to take
effect.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 100
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 10 – Configuring MES Web Portal

What Happens to MES Web Portal Customization Files During an


Uninstall
If you uninstall MES on a node on which the MES Web Portal is installed, during the uninstall operation the
existing MES Web Portal content will be backed up to save any custom web files. This option allows web files
that might have been added to the MES directory for MES Web Portal customization to be retained.
The MES Web Portal content will be backed up to the <MES program files path>\Wonderware\MES\Web
Portal\MES (archive <timestamp>) folder, where <timestamp> is the date and time when the uninstall was
completed. Any custom web files are stored in this directory.

Updating the Funcs.GetTranslations Method for Server-Side String


Translations
Most of the MES Web Portal pages use the Funcs.GetTranslations method for string translations.
If any of the Web Portal pages have been customized, the method must be updated to pass the following
required parameters: middlewareHost, token, languageId.
An example implementation is shown below.
@using MES.Web;
@{
int[] stringsToTranslate = { 15, 1053, 2489, 7736 };
var token = Request.Headers.Get("mes-token");
var middlewareHost = Request.Headers.Get("mes-middleware");
var languageId = Request.Headers.Get("mes-language");
var translatedStrings = Funcs.GetTranslations(middlewareHost, token,
languageId, stringsToTranslate);
}

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 101
Chapter 11

Configuring and Deploying MES BI


Gateway Reports

The MES reporting content defaults to using the BI Gateway database as the source for the report data. The BI
Gateway model includes content from Performance, Operations, and Quality data tables.
This section describes how to configure and deploy the MES BI Gateway reports. There are multiple steps
involving software components other than MES [that is, BI Gateway and SQL Server Reporting Services (SSRS)].
The MES installation software includes a limited version of BI Gateway Server that can be used solely with MES
BI Gateway reports. The MES BI Gateway reports will also work with a full version of BI Gateway.
The configuration and deployment of the MES BI Gateway reports includes the following procedures:
1. If not already performed, configuring the BI Gateway components and MES Database Setup component.
2. Importing and deploying the MES BI Gateway model.
3. Deploying the SSRS MES reports against the BI Gateway database.
4. Configuring the security policies for the Quality Characteristic Detail report.
Prerequisites
Prior to configuring and deploying MES BI Gateway reports, note the following prerequisites:
 For BI Gateway, MES only supports the use of a local SQL Server and not Azure SQL.
 Prior to configuring and deploying the MES BI Gateway reports, verify that the SSRS Report Server has been
configured using the Report Server Configuration Manager. This configuration creates the Report Server
database and the Report Server Web Service and Web Portal URLs. Also verify that the SSRS service is
running.
 To install the Quality Characteristic Detail report's SPC Chart control, the MES BI Gateway Reports
component must be installed and configured on the same node as the BI Gateway Datastore and SSRS.
Upgrading the MES BI Gateway Model
 The MES 2023 BI Gateway Model is the same as the MES 2017 R2 and MES 2020 Intelligence Model. If you
upgraded from MES 2017 R2 or MES 2020 to MES 2023, there is no need to upgrade the MES Intelligence
Model.
 If you are upgrading from MES 2014 R3 (version 5.3) or MES 2017 (version 6.0), and Intelligence 2014 R3
(version 2.1), perform the procedure in Upgrading to the MES 2020 Intelligence Model on page 113.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 102
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

Configuring BI Gateway and MES Database Setup Components


If not previously performed, the BI Gateway and MES Database Setup components must be configured in the
post-install Configurator.
If you have an existing MES 2014 R3 or Line Performance Suite 1.x Intelligence Reporting database, it is
recommended to create a new BI Gateway database with this release as the new model does not support
migration/upgrade from the older model. If all the source data exists in the MES database, an alternative is to
delete the existing Intelligence database and regenerate the data.
1. On the node on which BI Gateway is installed, open Configurator and configure the BI Gateway components.
The following screen shot is from the MES installation and shows only the options provided in the limited
version of BI Gateway Server. BI Gateway must be configured before configuring the MES BI Gateway
Reports component. However, the MES database can be set up prior to or after configuring the BI Gateway
components.

For more information about the BI Gateway components, see the BI Gateway Software Installation Guide.
Note: If you have upgraded from Intelligence to BI Gateway, the BI Gateway component status indicators
might incorrectly show that they have already been configured. You must still configure each component.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 103
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

2. On the node on which the MES Database Server component was installed, use Configurator to configure the
MES Database Setup component and create the MES database or migrate an existing one to the current
version.
See Creating or Migrating MES Databases on page 51.
3. After completing the configuration tasks, click Close to close the Configurator.
You are prompted to reboot the computer for the configuration changes to take effect.
4. Reboot the computer.
You must reboot the computer to avoid BI Gateway permission issues.
5. After the reboot is complete, continue to the next task of importing the MES BI Gateway model.

Importing and Deploying the MES BI Gateway Model


1. When the computer has rebooted after completing the configuration tasks, open the BI Gateway Model
Builder in a web browser by entering the URL https://localhost:61075.
Note: The BI Gateway Model Builder supports only Chrome web browser.

2. On the main menu, click Import.


The Import Model screen appears.
3. Click the Choose a File button, then navigate to and select the MESIntelligenceModel.json file.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 104
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

The file is stored in the BI Gateway Reports folder within the MES application folder.

4. Select the Overwrite option.


If the Overwrite option is not selected, duplicated MES objects will be created.
5. Optionally, enter a date for the Override Data Backfill.
If no value is provided here, then the Backfill dates defined in the JSON model file for each dimension will
apply.
6. Click Import.
7. When the import is completed, click Done.
The measures, dimensions, and data source appear. They are tagged in yellow, indicating that they are not
deployed.

8. To configure the MES BI Gateway Reports data source, select the MESRDBMESDB data source object.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 105
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

9. In the General tab in the right panel:


o In the Data Source time zone field, select (UTC) Coordinated Universal Time.
o In the Server name field, enter the host name of the node where the MES database is stored.
o In the Database name field, enter the MES database name.

10. Click Connect.


You are prompted whether you want to continue to connect to the data source and get the schema.

11. Click Continue.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 106
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

12. When the schema has been retrieved, click Done.

13. In the Windows Services tool on the node on which BI Gateway is installed, make sure the Intelligence
Service is running.
14. On the main menu, click Deploy All.
You are prompted whether you want to deploy all objects.

15. Click Keep Data.


16. When the objects have been deployed, click Done.
The measures, dimensions, and data source are tagged in green, indicating that they are deployed.

17. You can close BI Gateway Model Builder.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 107
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

Deploying the SSRS MES Reports Against the BI Gateway Database


Note: To install the Quality Characteristic Detail report's SPC Chart control, the MES BI Gateway Reports
component must be installed and configured on the same node as the BI Gateway Datastore and SQL Server
Reporting Services (SSRS).
1. In the Windows Services tool on the node on which SSRS and BI Gateway is installed, make sure the SSRS
service is running.
2. Open Configurator and select the MES BI Gateway Reports component.

A message in the Configuration Messages box prompts you to install the BI Gateway hotfix.
3. Install BI Gateway hotfix HF_2172196, which can be found in the BI Gateway Reports folder within the MES
application folder. This is a cumulative hotfix that also includes BI Gateway HF_1848891. Refer to the
instructions in the hotfix Readme file.
4. In Configurator, change the MES BI Gateway Reports configuration settings from the default entries as
needed.
BI Gateway Database Node
o Server Name: The server name on which the BI Gateway database is stored. This can be localhost or the
local node's host name.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 108
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

o Database Name: The name of the BI Gateway database.


Note: If BI Gateway was upgraded from a previous version of Intelligence, make sure that the database
name entered here matches the existing Intelligence database name (and not the BI Gateway default
name BIGateway_DataStore). Also, the name of the existing Intelligence database cannot be changed.
o User account information: The user account for accessing the BI Gateway database. See Specifying SQL
Server User Authentication on page 45. The user account specified here requires read access to the BI
Gateway database.

SQL Server Reporting Services Node


o Target Report Server: The name of the report server on which SSRS is running. This can be localhost or
the local node's host name.
o Virtual Folder: The name of the report server's virtual folder.
o Target Report Folder: The name of the target report folder that will be created by the configuration
operation for the MES reports.
o User account information: The user account for accessing the report server on which to deploy the MES
reports. See Specifying SQL Server User Authentication on page 45.

5. Click Configure.
The data source to connect to the BI Gateway database, the MES reports folder, and the MES BI Gateway
reports are created on the SSRS server.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 109
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

6. From the Reporting Services Configuration Manager application, verify that the MES Reports have been
deployed and that their links are accessible from the MES Reports - Report Manager web page.

7. Verify that the following views, stored procedures, and functions were created in the BI Gateway database.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 110
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 111
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 112
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

Loading of MES Data into the BI Gateway Database


Once all the configuration steps have been completed, the BI Gateway services extract data from the MES
database, transform it, and populate the newly created tables in the BI Gateway database.
The initial loading of the BI Gateway database might take some time, depending on either:
 The Override Data Backfill date entered in the Import Model dialog of the BI Gateway Model Builder when
importing the model
 The Data Collection Start date entered in the BI Gateway Model Builder
While the backfill process continues, the BI Gateway service will start collecting current data for the reports.
Wait at least an hour after deployment for the MES data to be loaded into the BI Gateway database before
attempting to run any MES BI Gateway reports.
Some of the reports will not show data until the second run of the BI Gateway service to update the dimensional
data. Unless specifically changed by an end user, this can take up to an hour.
If there is no MES data in the BI Gateway database, then verify that the BI Gateway services are running. Also
check the System Management Console error log of BI Gateway.

Configuring Security Policies for the Quality Characteristic Detail


Report
The MES Quality Characteristic Detail report includes a subreport containing a .NET control for displaying the
SPC Chart. This report requires that certain security policy settings for Reporting Services are configured to
display the .NET control.
To configure these security policy settings, follow the instructions provided in the Reporting Services Security
Configuration.txt file that is located in the BI Gateway Reports\Reports folder of the MES application folder.

Upgrading to the MES 2020 Intelligence Model


Note: MES 2023 does not support directly upgrading the MES Intelligence model from MES 2017 or earlier. This
section is retained from the MES 2020 documentation to describe the upgrade process to be completed prior to
upgrading to MES 2023.
Perform the following procedure to upgrade the MES Intelligence model from MES 2014 R3 (version 5.3) or MES
2017 (version 6.0) to the MES 2020 (version 6.2) model. This procedure also performs the required upgrade of
Intelligence 2014 R3 (version 2.1) to Intelligence 2017 U1 (version 3.1).
Note: The MES 2020 Intelligence Model is the same as the MES 2017 R2 Intelligence Model. So there is no need
to upgrade the model from MES 2017 R2 to MES 2020. If not already installed, you can install Intelligence 2017
U1 (version 3.1) as part of the MES 2020 installation or upgrade.
1. Depending on which MES release you are upgrading from, do one of the following:
 MES 2014 R3 (version 5.3): Go to step 2.
 MES 2017 (version 6.0): Go to step 3.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 113
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

2. Install the MES 2014 R3 P02 patch.


For installation instructions, refer to the patch Readme file.
During the patch installation, the Intelligence report database and the obsolete dimension
MESRDBEquipment is deleted. This dimension, if not deleted, would cause a problem when importing the
MES 2020 JSON model into Intelligence Model Builder. If the MES database does not contain all the source
data to repopulate the Intelligence database, then the existing MES 2014 R3 report database should be kept
and a new Intelligence reporting database should be used.
3. To start the upgrade to MES 2020, run the Setup.exe file in the root directory of the installation folder.
You are prompted that MES and Intelligence will be upgraded.

4. Click OK.
The License Agreement screen appears.
5. Review the license agreement, select the I have read and accept the terms ... option, then click Agree.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 114
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

The MES Setup tool runs an upgrade readiness check on the Intelligence installation software.

6. As the important message on this screen recommends, review the "Upgrading Intelligence" section of the
Intelligence Installation Guide to familiarize yourself with the Intelligence upgrade process.
7. When you are ready to continue, click Next.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 115
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

The Export Model screen appears, showing the Intelligence datastore server name and datastore name that
were configured.

8. Click Next.
The existing model is exported to a JSON model file format. The upgraded JSON model file Data.json is
stored in the \Bin\MigrationFiles folder of the Intelligence application folder.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 116
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

The Undeploy All Intelligence Objects screen appears.

The message on this screen explains that you have to undeploy all Intelligence objects before proceeding.
9. To undeploy all Intelligence objects, do one of the following:
 If you used the Intelligence Model Builder utility to deploy the Intelligence 2014 R3 Patch 2 model, it
does not have a control to undeploy the model. You must manually run the following SQL script against
the Intelligence database to undeploy the model.
truncate table [Model].SourceDataItems
GO
UPDATE Model.DataItems
SET IsDeployed = 0,
SerializedConfiguration = REPLACE(SerializedConfiguration,
'<DeployState>Deployed</DeployState>',
'<DeployState>NotDeployed</DeployState>')
GO
 If you used the System Platform IDE to deploy Intelligence 2014 R3 Patch 2 model, then undeploy the
Intelligence model from the System Platform IDE.
10. After undeploying the Intelligence objects, return to the MES Setup tool and click Next.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 117
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

The list of the components that are selected for installation or upgrading appears.

Because you are performing an upgrade of Intelligence 2014 R3, the Intelligence installation components,
including the new Intelligence Model Builder utility, are automatically selected to be installed.
11. Click Next.
The Ready to Install the Application screen appears.
12. Click Install.
13. After the installation completes, use the post-install Configurator to configure the following components:
o MES Database Setup
o MES DB/MW Communication
o MES Middleware Proxy
o Intelligence Server
o Intelligence Data Adapter
o Intelligence Model Builder
14. After completing the configuration tasks, click Close to close the Configurator.
You are prompted to reboot the computer for the configuration changes to take effect.
15. Reboot the computer.
You must reboot the computer to avoid Intelligence permission issues.
16. After the reboot is complete, open the Intelligence Model Builder in a web browser by entering the URL
https://localhost:61075.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 118
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

Note: The Intelligence Model Builder supports only Chrome web browser.
After the Intelligence Model Builder opens, it shows the upgraded JSON model from the MES 2014 R3 P02 or
MES 2017 installation. The measures, dimensions, and data source are tagged in yellow, indicating that they
are not deployed.

17. To configure the MES Intelligence Reports data source, select the MESRDBMESDB data source object.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 119
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

18. In the General tab in the right panel, enter the MES database name in the Database name field.

19. Click Connect.


You are prompted whether you want to continue to connect to the data source and get the schema.

20. Click Continue.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 120
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

21. When the schema has been retrieved, click Done.

22. In the Windows Services tool on the node on which Intelligence is installed, make sure the Intelligence
Service is running.
23. On the main menu, click Deploy All.
You are prompted whether you want to deploy all objects.

24. To deploy all of the MES objects in the upgraded model and keep existing report data, click Keep Data.
Note that if any custom changes were made to the dimensions or measures, Intelligence will remove the
data and recreate it. This will be indicated by a message in the Operations Control Management Console
Logger similar to the following:
Intelligence.Com... Measure MESRDBHourlyUtilization has been modified to the extent that its data will be
deleted.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 121
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 11 – Configuring and Deploying MES BI Gateway Reports

25. When the objects have been deployed, click Done.

The measures, dimensions, and data source are tagged in blue, indicating that they are deployed.

26. You can close Intelligence Model Builder.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 122
Chapter 12

MES Service Monitor

You can use the MES Service Monitor to start, stop, or restart the MES middleware host.
If the Work Tasks Connector for MES has been installed, it can also be started, stopped, or restarted from the
Service Monitor.

Starting and Exiting the Service Monitor


If the MES Middleware component was installed on the node, the MES Service Monitor is installed and its icon
(shown below) is added to the system tray.

The Service Monitor allows users to start, stop, and restart the MES middleware host. If the Work Tasks
Connector for MES has also been installed on the node, its service can also be started and stopped from the MES
Service monitor. See Starting, Stopping, and Restarting the MES Middleware Host on page 123.
To exit the Service Monitor and remove it from the system tray
 Right-click the Service Monitor icon and click Exit.
Note that exiting the Service Monitor does not affect the state of the MES middleware host.
To start the Service Monitor and add it to the system tray
 From the Start menu, open the Service Monitor app.

Starting, Stopping, and Restarting the MES Middleware Host


You can manually start, stop, and restart the MES middleware host.
1. Right-click the System Monitor icon on the system tray.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 123
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 12 – MES Service Monitor

2. Click MES Middleware Host and then click Start, Stop, or Restart.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 124
Chapter 13

Running MES Install and Configurator from


a Command Line

The MES install and Configurator commands allow you to install MES and configure the installed components
from a command line. Installation and configuration settings are passed to the commands using XML-formatted
response files. The uninstall command allows you to uninstall MES from a command line.
To understand how these commands work, it is recommended that you read Installing Wonderware MES and
Configuring MES Components on page 41 to see how the MES installation and configuration is performed from a
user interface.
Note the following about the MES install, Configurator, and uninstall commands:
 The commands must be run by a user with a Windows Administrator user account.
 Only a new MES install, an upgrade from a previous version, or an uninstall can be run from a command line.
To modify or repair MES software, you must use either the Control Panel Programs and Features applet or
the MES Setup tool.
 If you are upgrading MES using the install command, any MES applications that are currently running will be
stopped before the installation is performed. Also, see the topics in Preparing to Upgrade MES on page 21.
 Localization of the response files used with the install and Configurator commands is not supported.

Prerequisite Software
During the installation process, the MES installation analyzes the software installed on the node. The installation
will attempt to install missing prerequisite software, but some missing software might have to be installed
manually. Any issues with prerequisite software will be entered in the Logger file for the MES product. See
Checking Installation Results in the MES Installation Logger File on page 128.
To avoid issues with missing prerequisite software during a command line installation, it is recommended that
you install all prerequisite software before running the MES installation. For more information, see MES
Prerequisite Software on page 18.

Command List File


The MES install folder \InstallFiles\ResponseFiles includes the file Silent Installation_Commands.txt. This file
includes entries that show the syntax of the MES install and uninstall commands, and Configurator command.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 125
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

MES Install Command


The MES install command syntax is:
Setup.exe /silent /mingui install_response_file
where
 Setup.exe is the file path (if needed) and file name of the MES Setup tool executable file.
 /silent is the switch that causes the installation to run in the background without a user interface.
 /mingui is an optional switch that, if included, runs the installation with minimum GUI.
 install_response_file is the file path (if needed) and file name of the XML response file that specifies what
MES components to install. Only one response file can be entered.
For example:
C:\CD-MES>Setup.exe /silent response.txt
The command must be run by a user with a Windows Administrator user account.

Install Response File XML Syntax


The install response file includes the following XML tags.
<responsefile> </responsefile>
The header tag that marks the file as a response file.
<install> </install>
The install tag includes the list of install settings.
Note the following about the install response file:
 Localization of the response file is not supported.
 Comment lines in the response file must be preceded by the hash (#) character.
Install Settings
Install settings are included within the <install> tag. The install settings have the format:
setting name=value
The available settings are described below.
FeatureForm.SInstallDir
Optional. Specifies the target installation directory. If not included, the default installation directory is
C:\Program Files (x86).
FeatureForm.SFeatureList
The following values are supported:
o All: All MES components are installed.
o A component list: A list of the components to install, separated by commas. See Install Response File
Component Entries on page 127.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 126
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

Install Response File Component Entries


MES.PDFDocs
The MES user documentation PDF and help files.
MES.Development
The MES API DLLs.
Client.Supervisor
The MES Supervisor application.
Client.Operator
The MES Operator application.
Client.EntityModelBuilder
The MES Entity Model Builder.
Client.AppObjects
The MES application object files.
Client.DataEditor
The MES Data Editor application.
Client.ClientFramework
The MES Client application.
Client.NETControls
MES .NET controls.
Client.MiddlewareProxy
The MES middleware proxy.
Server.WebPortal
The MES Web Portal.
Server.FactDB
The MES database.
Server.FactMiddle
The MES middleware service.
Reports.IntelligenceReports
MES BI Gateway Reports.
AVEVA BI Gateway.EMIAdapterCommon
The BI Gateway Data Adaptors.
AVEVA BI Gateway.EMIRuntime
The BI Gateway Server.
AVEVA BI Gateway.EmiModelConfig
The BI Gateway Model Builder.
AVEVA BI Gateway.PDFDocumentation
The BI Gateway PDF documentation files.
LicAPI32, LicAPI64
The Licensing APIs.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 127
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

Licensing.AELicenseServer
The License Server.
Licensing.AELicenseManager
The License Manager.
AVEVA Single Sign-On Service.ASBRuntime
The AVEVA Single Sign-On Service.
AVEVA Single Sign-On Service.ASBServiceRepository
The AVEVA Single Sign-On Service repository.

Sample Install Response Files Provided


The MES install folder \InstallFiles\ResponseFiles includes the following sample response XML files. You can use
these as a basis for the install response files required by the MES nodes on your system.
Response_AllProduct_Install.txt
This response file installs all MES components.
<responsefile>
<install>
FeatureForm.SFeatureList=ALL
</install>
</responsefile>

Response_SelectedFeatures.txt
This response file is a template for installing selected MES components.
<responsefile>
<install>
FeatureForm.SInstallDir=<Install directory>
FeatureForm.SFeatureList=<Feature list>
# Each feature name in the feature list should be in the format ParentFeatureName.ChildFeatureName,
separated by commas. For a complete list of feature names, see the commented list below.
# List of features
# MES.PDFDocs, MES.Development,
# Client.Supervisor, Client.Operator, Client.EntityModelBuilder, Client.AppObjects,
Client.DataEditor, Client.ClientFramework, Client.NETControls, Client.MiddlewareProxy,
# Server.WebPortal, Server.FactDB, Server.FactMiddle,
# Reports.IntelligenceReports,
# AVEVA BI Gateway.EMIAdapterCommon, AVEVA BI Gateway.EMIRuntime, AVEVA BI Gateway.EmiModelConfig,
AVEVA BI Gateway.PDFDocumentation
# LicAPI32, LicAPI64
# Licensing.AELicenseServer
# Licensing.AELicenseManager
# AVEVA Single Sign-On Service.ASBRuntime
# AVEVA Single Sign-On Service.ASBServiceRepository
</install>
</responsefile>

Checking Installation Results in the MES Installation Logger File


The installation results are recorded in the MES installation Logger file. The default location for this file is:

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 128
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

C:\Program Files (x86)\Common Files\ArchestrA\Install\


{3F836811-8203-46B1-9815-E1A27A78CFFE}\ILogtimestamp.log

MES Uninstall Command


The uninstall command syntax is:
Setup.exe /silentuninstall {3F836811-8203-46B1-9815-E1A27A78CFFE}
where
 Setup.exe is the file path (if needed) and file name of the MES Setup tool executable file.
 /silentuninstall is the switch that causes the uninstall to run in the background without a user interface.
 3F836811-8203-46B1-9815-E1A27A78CFFE is the MES product GUID for the current version of MES.
The command must be run by a user with a Windows Administrator user account.
Note: Uninstalling MES from the command line will uninstall BI Gateway if the limited version of BI Gateway
Server was installed as part of the MES installation. However, it does not uninstall License Manager. If you want
to uninstall License Manager, it has to be uninstalled separately.

Configurator Command
The Configurator command format is:
Configurator.exe /silent=true /action=add /feature=<component_list>
/response=Configurator_response_file
where
 Configurator.exe is the post-install Configurator executable file. The default path for this file is:
C:\Program Files (x86)\Common Files\ArchestrA.
 /action=add is the switch that causes the components to be configured.
 /feature=component_list is the switch that specifies which components are being configured.
 /response=Configurator_response_file is the switch that specifies the file path (if needed) and file name of
the response file that specifies the settings for the components being configured.
For example:
C:\Program Files (x86)\Common Files\ArchestrA\Configurator.exe /silent=true /action=add
/feature=MES:WebPortal,MES:MiddlewareProxy /response=C:\response.txt
The command must be run by a user with a Windows Administrator user account.

Configurator Response File XML Syntax and Component Properties


The Configurator response file includes the following XML tags.
<responsefile> </responsefile>
The header tag that marks the file as a response file.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 129
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

<configurator> </configurator>
The Configurator tag includes the list of Configurator component properties. For the list of properties, see
MES Component Properties on page 130.
Note the following about the Configurator response file:
 Localization of the response file is not supported.
 Comment lines in the response file must be preceded by the hash (#) character.

MES Component Properties


The MES component properties described in the following topics are included within the <configurator> tag of
the Configurator response file. Properties are required unless they are indicated as optional.
The component property entries have the format:
component_property=value

MES Database Setup Component Properties


Database Server, Name, and Authentication
MES.FactDB.ServerName
The name of the server that is hosting the MES database.
If this property is not specified, the server name defaults to the local server.
Supported server names include IP addresses (IPv4 and IPv6 addressing is supported), SQL server named
instance conventions, and cluster names.
MES.FactDB.DatabaseName
The name of the MES database. If this property is not specified, the name defaults to MESDB.
MES.FactDB.UseIntegratedSecurity
Values are:
o True: Use Windows Integrated Security. The currently logged-in Windows user account will be used to
access SQL Server. No user name or password has to be specified in the response file.
o False: Use SQL Server Authentication. Specify the appropriate SQL Server Authentication user name and
password with the UserName and DatabasePassword properties.
When False, the UseIntegratedSecurity property must always precede the UserName and
DatabasePassword properties. Otherwise, the False setting of this property will cause the values of the
UserName and DatabasePassword properties to be cleared.

The default value True is used if this property is not specified.


MES.FactDB.UserName
If SQL Server Authentication is being used, the SQL user name.
MES.FactDB.DatabasePassword
If SQL Server Authentication is being used, the SQL user password.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 130
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

Advanced Properties
These properties are optional and apply only to new MES databases.
MES.FactDB.DataFilePath
The file path of the data file. See the installed version of SQL Server for the default data file path that is used
if this property is not specified.
MES.FactDB.DataFileSize
The initial size, in MB, of the data file. The default value 30 is used if this property is not specified.
MES.FactDB.DataFilePercentGrowth
The percent by which to limit the percent growth of the data file. The default value 10 is used if this property
is not specified.
MES.FactDB.LogFilePath
The file path of the log file. See the installed version of SQL Server for the default log file path that is used if
this property is not specified.
MES.FactDB.LogFileSize
The initial size, in MB, of the log file. The default value 30 is used if this property is not specified.
MES.FactDB.LogFilePercentGrowth
The percent by which to limit the percent growth of the log file. The default value 10 is used if this property
is not specified.
Upgrading Properties
These properties apply only when upgrading to a new version of MES.
MES.FactDB.Overwrite
Values are:
o True: If the MigrateData property is set to True, migrate the existing MES database to the new release.
If the MigrateData property is set to False, overwrite the existing database with a new MES database.
o False: Keep the existing MES database with no changes. You might use this setting in case, for example,
the named MES database already exists but was not expected to be there. The database would not be
overwritten, but the upgraded MES would not be usable until a new MES database was created or the
existing one was migrated.

The default value True is used if this property is not specified.


MES.FactDB.MigrateData
Values are:
o True: If the MES.FactDB.Overwrite property is True, migrate the existing MES database to the new
release.
o False: If the MES.FactDB.Overwrite property is True, overwrite the existing database with a new MES
database.

The default value True is used if this property is not specified.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 131
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

MES.FactDB.AggregateItemProduction
Applies only if the Overwrite and MigrateData properties are set to True. Values are:
o True: If the existing MES database that you are migrating has the system parameters for recording
distinct production records set, aggregate these records are aggregated into hourly records and distinct
production records are disabled.
o False: Do not aggregate distinct production records.

The default value True is used if this property is not specified.


It is recommended to aggregate production records into hourly buckets, as this will improve the overall
system performance for recording production and reporting on production data. In versions prior to MES
version 4.5, recording distinct production records was required for reporting hourly KPIs, but this is no
longer the case. You might still want distinct production records for other reasons, in which case set this
property to False.

MES DB/MW Communication Component Properties


MES Production Database Connection String Properties
These properties specify the connection string that the MES middleware service will use to connect to SQL
Server and the MES production database.
MES.FactMiddle.ProductionServerName
The name of the server that is hosting the MES production database.
If this property is not specified, the server name defaults to the node name if a connection string was not
previously saved or to the server name entered for the previously saved connection string.
MES.FactMiddle.ProductionDatabaseName
The name of the MES production database.
If this property is not specified:
o If this is a new installation and the connection string has not been created yet, the name defaults to
MESDB.
o If the connection string has been previously created or the database was migrated from a previous
release, the actual database name is used.

MES.FactMiddle.ProductionUseIntegratedSecurity
Specifies which security method should be used to connect to the production database.
Values are:
o True: Use Windows Integrated Security. The currently logged-in Windows user account will be used to
connect to SQL Server and the MES database. No user name or password has to be specified in the
response file.
o False: Use SQL Server Authentication. Specify the appropriate SQL Server Authentication user name and
password with the ProductionUserName and ProductionDatabasePassword properties.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 132
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

When False, the ProductionUseIntegratedSecurity property must always precede the


ProductionUserName and ProductionDatabasePassword properties. Otherwise, the False setting of this
property will cause the values of the ProductionUserName and ProductionDatabasePassword properties
to be cleared.

The default value True is used if this property is not specified.


MES.FactMiddle.ProductionUserName
If SQL Server Authentication is being used, the SQL user name.
MES.FactMiddle.ProductionDatabasePassword
If SQL Server Authentication is being used, the SQL user password.
MES.FactMiddle.ProductionAdvancedSettings
Optional. Used to append advanced settings to the database connection string.
The advanced settings allow you to set properties that affect the database connection behavior, such as
tuning the connection to your environment or to set up database mirroring. For example, entering Connect
Timeout=300 would cause the connection to attempt to connect to the database for up to 300 seconds.
For a list of the SQL database connection properties that can be set, see the Microsoft MSDN
SqlConnectionStringBuilder Class
https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder(v=vs.110).aspx
topic.
MES.FactMiddle.ProductionSetPreferredMiddlewareHost
Optional. If multiple MES middleware hosts are running in a multi-node environment, you can designate
which one is the preferred middleware host for this database. To use the local middleware host, if one is
installed, set this property to True. The default is False.
MES.FactMiddle.ProductionDefaultTimeZoneId
Optional. To change the time zone for the database, use this property to specify the new time zone. Unless it
has been changed, the time zone defaults to that of the server on which the database is installed.
The time zone entry must be in the standard Windows time zone format [e.g., (UTC-08:00) Baja California].
You can see a list of time zones and their proper format using the following methods:
o In the post-install Configurator, in the Default Time Zone list on the Production tab of the MES DB/MW
Communication component
o By running the following command in a Windows Command Prompt window: tzutil /l
MES Restore Database Connection String Properties
These properties specify the connection string that the MES middleware service will use to connect to SQL
Server and the MES restore database.
MES.FactMiddle.EnableRestoreDatabase
If MES is going to support a restore database, set this property to True. If not, set it to False.
If set to True, make sure that the restore database has already been created.
The default value False is used if this property is not specified.
MES.FactMiddle.RestoreServerName
The name of the server that is hosting the MES restore database.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 133
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

If this property is not specified, the server name defaults to the node name if a connection string was not
previously saved or to the server name entered for the previously saved connection string.
MES.FactMiddle.RestoreDatabaseName
The name of the MES restore database.
If this property is not specified:
o If this is a new installation and the connection string has not been created yet, the name defaults to
RestoreDB.
o If the connection string has been previously created or the database was migrated from a previous
release, the actual database name is used.

MES.FactMiddle.RestoreUseIntegratedSecurity
Specifies which security method should be used to connect to the restore database
Values are:
o True: Use Windows Integrated Security. The currently logged-in Windows user account will be used to
connect to SQL Server and the MES database. No user name or password has to be specified in the
response file.
o False: Use SQL Server Authentication. Specify the appropriate SQL Server Authentication user name and
password with the RestoreUserName and RestoreDatabasePassword properties.
When False, the RestoreUseIntegratedSecurity property must always precede the RestoreUserName
and RestoreDatabasePassword properties. Otherwise, the False setting of this property will cause the
values of the RestoreUserName and RestoreDatabasePassword properties to be cleared.

The default value True is used if this property is not specified.


MES.FactMiddle.RestoreUserName
If SQL Server Authentication is being used, the SQL user name.
MES.FactMiddle.RestoreDatabasePassword
If SQL Server Authentication is being used, the SQL user password.
MES.FactMiddle.RestoreAdvancedSettings
Optional. Used to append advanced settings to the database connection string.
The advanced settings allow you to set properties that affect the database connection behavior, such as
tuning the connection to your environment or to set up database mirroring. For example, entering Connect
Timeout=300 would cause the connection to attempt to connect to the database for up to 300 seconds.
For a list of the SQL database connection properties that can be set, see the Microsoft MSDN
SqlConnectionStringBuilder Class
https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder(v=vs.110).aspx
topic.
MES Middleware Service User Account Properties
These properties specify:

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 134
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

 Whether to automatically set the minimum SQL permissions on the MES databases for the MES middleware
service Windows user account
 If permissions will be set automatically, the admin user accounts that are authorized to set the permissions
on the MES databases

MES.FactMiddle.SetMinimalSqlPermissions
Set this property to True to have the minimal SQL permissions set to allow the MES middleware service user
account to perform the required operations on the MES databases.
If set to False, then you will have to manually set up the SQL permissions and assign them to the MES
middleware service user account using the SQL Server Management Studio. For more information about the
minimal SQL permissions that are needed, see Assigning SQL Server Database Roles to the MES Middleware
Service User Account.
The default value True is used if this property is not specified.
MES.FactMiddle.ProductionAdminUseIntegratedSecurity
Applies only if the SetMinimalSqlPermissions property is set to True.
Values are:
o True: Use Windows Integrated Security. The currently logged-in Windows user account will be used to
set the MES middleware service user account SQL permissions for the MES production database. The
user must have administrator privileges to set SQL permissions.
o False: Use SQL Server Authentication. Specify the appropriate SQL Server Authentication user name and
password with the ProductionSecuritySqlUserName and ProductionSecuritySqlPassword properties.
When False, the ProductionAdminUseIntegratedSecurity property must always precede the
ProductionSecuritySqlUserName and ProductionSecuritySqlPassword properties. Otherwise, the False
setting of this property will cause the values of the ProductionSecuritySqlUserName and
ProductionSecuritySqlPassword properties to be cleared.

The default value True is used if this property is not specified.


MES.FactMiddle.ProductionSecuritySqlUserName
If SQL Server Authentication is being used, the user name of the SQL user account that has administrator
privileges to set SQL permissions for the MES production database.
MES.FactMiddle.ProductionSecuritySqlPassword
If SQL Server Authentication is being used, the password of the SQL user account that has administrator
privileges to set SQL permissions for the MES production database.
MES.FactMiddle.UseProductionCredentialsForRestore
Applies only if the EnableRestoreDatabase property is set to True.
Values are:
o True: Use the same user account to set the MES middleware user service account SQL permissions for
the MES restore database as the one being used for the production database.
o False: Use the user account specified by the RestoreAdminUseIntegratedSecurity,
RestoreSecuritySqlUserName, and RestoreSecuritySqlPassword properties.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 135
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

The default value True is used if this property is not specified.


MES.FactMiddle.RestoreAdminUseIntegratedSecurity
Applies only if the SetMinimalSqlPermissions property is set to True and the
UseProductionCredentialsForRestore is set to False.
Values are:
o True: Use Windows Integrated Security. The currently logged-in Windows user account will be used to
set the MES middleware service user account SQL permissions for the MES restore database. The user
must have administrator privileges to set SQL permissions.
o False: Use SQL Server Authentication. Specify the appropriate SQL Server Authentication user name and
password with the RestoreSecuritySqlUserName and RestoreSecuritySqlPassword properties.
When False, the RestoreAdminUseIntegratedSecurity property must always precede the
RestoreSecuritySqlUserName and RestoreSecuritySqlPassword properties. Otherwise, the False setting
of this property will cause the values of the RestoreSecuritySqlUserName and
RestoreSecuritySqlPassword properties to be cleared.

The default value True is used if this property is not specified.


MES.FactMiddle.RestoreSecuritySqlUserName
If SQL Server Authentication is being used, the user name of the SQL user account that has administrator
privileges to set SQL permissions for the MES restore database.
MES.FactMiddle.RestoreSecuritySqlPassword
If SQL Server Authentication is being used, the password of the SQL user account that has administrator
privileges to set SQL permissions for the MES restore database.
MES.FactMiddle.AIMHost
The fully qualified domain name of the node on which the AVEVA Identity Manager is running.
MES.FactMiddle.AIMHttpsPort
The HTTPS port number for the Identity Manager.
The default HTTPS port number 443 is used if this property is not specified.
MES.FactMiddle.ClientRegistrationUserName and MES.FactMiddle.ClientRegistrationUserPassword
The user name and password of an admin account on the node on which the Identity Manager is running.

Middleware Proxy Component Properties


MES.MiddlewareProxy.MiddlewareHost
The fully qualified domain name of the node on which the MES middleware is running.
If this property is not specified, it defaults to localhost, which is changed to the server name of the node
during configuration.
MES.MiddlewareProxy.HttpPort
The HTTP port number for the MES middleware's WCFHostService account.
The default value 80 is used if this property is not specified.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 136
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

The HTTP port is always used to retrieve the configuration settings regardless of the
MES.MiddlewareProxy.Protocol property. You must change this value only when you cannot access port 80
through the firewall.
MES.MiddlewareProxy.Protocol
The communication protocol type used by the MES middleware communications. Values are TCP (the
default if this property is not specified) or HTTP.
MES.MiddlewareProxy.HttpsPort
The HTTPS port number for the MES Web API.
The default HTTPS port number 443 is used if this property is not specified.
If you want to include multiple MES middleware servers with which the proxy will be able to communicate,
include their settings for each property line separated by semi-colons, as shown below.
# Middleware Proxy Configuration
MES.MiddlewareProxy.MiddlewareHost=Srvr1.MES.ourorgdomain.com;Srvr2.MES.ourorgdomain.com
MES.MiddlewareProxy.HttpPort=80;80
MES.MiddlewareProxy.Protocol=TCP;TCP
MES.MiddlewareProxy.HttpsPort=443;443

MES Web Portal Component Properties


Update Feature Delegation Settings Property
MES.WebPortal.UpdateFeatureDelegationSettings
Specifies whether MES Web Portal delegate feature settings are retained in the MES Web Portal configuration
file or updated in the applicationHost.config file.
Values are:
True
The Configurator will update the IIS applicationHost.config file with the proper MES Web Portal
configuration settings, and remove those settings from the MES Web Portal web.config file. (The feature
settings can only be included in one of these files, but not both. Otherwise, the MES Web Portal web site will
not run.)
False
The Configurator does not update the IIS applicationHost.config file and leaves the conflicting feature
settings in the web.config file.
The default value True is used if this property is not specified.
If the setting is False, the configuration finishes but, to allow the MES Web Portal web site to run, a web
administrator must then either:
 Change the setting for the conflicting feature delegations to Read/Write in IIS Manager, or
 Edit the IIS applicationHost.config file manually to set the feature settings to the appropriate MES Web
Portal values and remove those settings from the MES Web Portal web.config file.
For instructions about how to set feature delegations in IIS Manager and how to manually modify the
applicationHost.config file, refer to the IIS Feature Delegation topics on the Microsoft TechNet web site.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 137
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

Identity Manager Client Registration Properties


MES.WebPortal.AIMHost
The fully qualified domain name of the node on which the Identity Manager is running.
MES.WebPortal.AIMHttpsPort
The HTTPS port number for the Identity Manager.
A value for this property is required. The default entry is 443.
MES.WebPortal.ClientRegistrationUserName and MES.WebPortal.ClientRegistrationUserPassword
The user name and password of an admin account on the node on which the Identity Manager is running.
MES.WebPortal.ExistingCertificateName
The SSL certificate for MES Web Portal.
This entry is case-sensitive. The entry must match the capitalization of the actual certificate name.
MES.WebPortal.HttpsPort
The HTTPS port for MES Web Portal.
The default HTTPS port number 443 is used if this property is not specified
MES.WebPortal.OverwriteSslCertificate
A flag that indicates whether the SSL certificate should be overwritten for the HTTPS port number (true, the
default) or not (false).

MES BI Gateway Reports Component Properties


MES.IntelligenceReports.ServerName
The server name on which the BI Gateway database is stored.
MES.IntelligenceReports.DatabaseName
The name of the BI Gateway database.
MES.IntelligenceReports.UseIntegratedSecurity
Values are:
o True: Use Windows Integrated Security. The currently logged-in Windows user account will be used to
access SQL Server. No user name or password has to be specified in the response file.
o False: Use SQL Server Authentication. Specify the appropriate SQL Server Authentication user name and
password with the IntelligenceNodeUserName and IntelligenceNodePassword properties.

The default value True is used if this property is not specified.


MES.IntelligenceReports.IntelligenceNodeUserName
If SQL Server Authentication is being used, the SQL user name.
MES.IntelligenceReports.IntelligenceNodePassword
If SQL Server Authentication is being used, the SQL user password.
MES.IntelligenceReports.TargetReportServer
The server name on which the target report server is running.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 138
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

MES.IntelligenceReports.VirtualFolder
The name of the report server's virtual folder.
MES.IntelligenceReports.TargetReportFolder
The name of the target report folder for the MES reports.
MES.IntelligenceReports.UseCurrentUserWindowsCredentials
Values are:
o True: The currently logged-in Windows user account will be used to access the report server on which to
deploy the MES reports. No user name or password has to be specified in the response file.
o False: The Windows user account specified by the ReportingServicesNodeDomain,
ReportingServicesNodeUserName, and ReportingServicesNodePassword properties will be used to
access the report server on which to deploy the MES reports.

The default value True is used if this property is not specified.


MES.IntelligenceReports.ReportingServicesNodeDomain
If UseCurrentUserWindowsCredentials is False, the domain for the SQL user account.
MES.IntelligenceReports.ReportingServicesNodeUserName
If UseCurrentUserWindowsCredentials is False, the SQL user name.
MES.IntelligenceReports.ReportingServicesNodePassword
If UseCurrentUserWindowsCredentials is False, the SQL user password.

Licensing Component Properties


AVEVA Enterprise Licensing Platform.LicAPI2.NewServerName
The host name of the License Server node. The default value is localhost.
AVEVA Enterprise Licensing Platform.LicAPI2.NewPortNumber
The License Server port number. The default value is 55555.
AVEVA Enterprise Licensing Platform.LicAPI2.NewAgentPortNumber
The License Server Agent port number. The default value is 59200.

System Management Server Properties for AVEVA Single Sign-On Service


Common Platform.ASBRuntime.HttpPort
The common platform HTTP port that is used to communicate with certain AVEVA software. The default is
80.
Common Platform.ASBRuntime.HttpsPort
The common platform HTTPS port that is used to communicate with certain AVEVA software. The default is
443.
Common Platform.ASBRuntime.ManagementServerPort
The port used to communicate with the System Management Server. The default entry is 443.
Common Platform.ASBRuntime.ManagementServerName
The fully qualified domain name of the System Management Server.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 139
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

Common Platform.ASBRuntime.AsbManagedCertificates
A flag that indicates whether the System Management Server will manage certificates. The default is true.
Common Platform.ASBRuntime.BindingCertificateThumbprint
Optional. The thumbprint of the binding certificate. This property is required only if AsbManagedCertificates
= false. Otherwise, remove this property.
Common Platform.ASBRuntime.UserName and Common Platform.ASBRuntime.Password
Optional. The user name and password of a user account that has access to System Management Server.
These properties are not required if the currently logged-in user is authorized to access the System
Management Server. You can remove these two properties if they are not required.
Common Platform.ASBRuntime.IsRedundantSsoServer
A flag that indicates that, if the System Management Server is on a remote machine, configure this machine
as a redundant SSO server. The default is true.
Common Platform.ASBRuntime.SuitelinkMixedModeEnabled
A flag that, if false, indicates that SuiteLink accepts only encrypted connection requests. If true, it indicates
that SuiteLink accepts both encrypted and unencrypted connection requests (recommended only during
upgrade scenarios or for supporting legacy applications). The default is false.
Common Platform.ASBRuntime.NmxAllowAllUsers
A flag that, if false, indicates that only authorized users can use NMX. If true, indicates that all users can use
NMX (not recommended). The default is false.

BI Gateway Components
BI Gateway Server
AVEVA BI Gateway.EMIRuntime.StorageType
Data store storage type. The default and only option supported by MES is SQL Server.
AVEVA BI Gateway.EMIRuntime.DSServerName
The name of the server on which the BI Gateway database is stored. The default is localhost.
AVEVA BI Gateway.EMIRuntime.DatabaseName
The name of the BI Gateway database. The default is the name of the existing BI Gateway database.
Otherwise, the default is BIGateway_DataStore.
AVEVA BI Gateway.EMIRuntime.AuthenticationMode
The default and only option is Windows Integrated Security. The currently logged-in Windows user account
will be used to access SQL Server. No user name or password has to be specified in the response file.
AVEVA BI Gateway.EMIRuntime.DataFilePath
The file path at which to store the datalog file. The default path depends on the version of SQL Server. An
example is C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA.
AVEVA BI Gateway.EMIRuntime.LogFilePath
The file path at which to store the log file. The default path depends on the version of SQL Server. An
example is C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA.
AVEVA BI Gateway.EMIRuntime.UserName
The username of the user account under which the BI Gateway Server service runs.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 140
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 13 – Running MES Install and Configurator from a Command Line

AVEVA BI Gateway.EMIRuntime.Password
The password of the user account under which the BI Gateway Server service runs.
AVEVA BI Gateway.EMIRuntime.Domain
The domain of the user account under which the BI Gateway Server service runs.
Data Adapter
AVEVA BI Gateway.EMIAdapterCommon.RuntimeServicePort
The number of the service port over which the BI Gateway Server and Data Adapter will communicate. The
default is 8732.
AVEVA BI Gateway.EMIAdapterCommon.UserName
The username of the user account under which the BI Gateway Data Adapter service runs.
AVEVA BI Gateway.EMIAdapterCommon.Password
The password of the user account under which the BI Gateway Data Adapter service runs.
AVEVA BI Gateway.EMIAdapterCommon.Domain
The domain of the user account under which the BI Gateway Data Adapter service runs.
BI Gateway Model Builder
AVEVA BI Gateway.EmiModelConfig.ModelApiPortNo
The number of the service port over which the BI Gateway Event API service will communicate. The default
is 61076.
AVEVA BI Gateway.EmiModelConfig.ModelBuilderPortNo
The number of the service port over which the BI Gateway Model Builder service will communicate. The
default is 61075.
AVEVA BI Gateway.EmiModelConfig.AddIntelligenceModelConfigUsertoGroup
Values are:
o True: The default. The currently logged-in user will be added to the aaIntelligenceConfigAdmin Windows
group, which has Read/Write access to BI Gateway Model Builder. If additional users need to run BI
Gateway Model Builder, they can be manually added to this group.
o False: The currently logged-in user will not be added to the aaIntelligenceConfigAdmin Windows group.
If this option is selected, one or more users will have to be manually added to this group so that they
can run BI Gateway Model Builder.

Template Configurator Response File for MES


The MES install folder \InstallFiles\ResponseFiles includes the template Configurator response file
Response_Silent_Configuration.txt. You can use the contents of this file as a basis for the Configurator response
files required by the MES nodes on your system.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 141
Chapter 14

Upgrading MES Development Components

To support using MES in custom applications, the MES development components must be upgraded when
upgrading MES from a previous version.

Upgrading the MES Client API Script Libraries


The MES Client API Wrapper is delivered in the following files.
aaFactMES.aaSLIB
This file contains the Stateful API Wrapper.
aaMES.aaSLIB
This file contains the Stateless API Wrapper.
You can import these files into Application Server so that the Client API Wrappers can be used in Application
Server scripting. Wrapper files from any previous version can be upgraded.
The Application Server does not fully support upgrading the MES Client API (aaFactMES) script library. To
upgrade from a previous version, you must manually upgrade the library on the Application Server. You must
also ensure that all the deployed objects that are using these scripts are properly upgraded.
To upgrade the MES Client API script library on the Application Server
1. In the System Platform IDE, undeploy the AppEngine that contains objects that are using an earlier version
of the aaFactMES or aaMES script libraries.
For detailed information on managing objects in the System Platform IDE, refer to the System Platform IDE
help.
2. To import the script library file, do the following:
a. Click the Galaxy menu, point to Import, and then click Script Function Library.
The Import Script Function Library dialog box appears.
b. In the MES application folder, browse to the Controls folder.
If the MES .NET Controls component was not installed on this node, you can copy the wrapper files from
another node on which it was installed to the local MES\Controls folder.
c. In the File Type list to the right of the File name box, select Script Library Files (*aaSLIB).
d. Click the aaFactMES.aaSLIB file, and then click Open.
The script library is imported and a success message appears.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 142
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 14 – Upgrading MES Development Components

You must import aaMES.aaSLIB file using the same procedure.


e. Click OK.
3. Right-click the corresponding template or object, and then click Validate.
You must validate all the objects that are using the script library. The derived templates that use the script
library must be validated first.
4. Redeploy the AppEngine and associated objects.

Upgrading MES .NET Controls for AVEVA OMI Apps


If your System Platform IDE includes an OMI App that contains MES .NET controls, that OMI App must be
deleted and recreated using the current version of the MES .NET controls.
1. Perform the MES version upgrade, which should include the .NET controls.
2. In the System Platform IDE Graphic Toolbox, locate the OMI App object that contains MES .NET controls and
delete it.
3. In Windows File Explorer, navigate to the MES application folder.
4. Locate the MES .NET controls folder that was the source folder used during the .NET controls import for the
OMI App.
Typically, this folder was created by making a copy of the MES\Controls folder and naming it with the name
of the OMI App for which it was created (e.g., MESControlsForOMI).
5. Delete this .NET controls folder.
6. In the System Platform IDE, perform the Import OMI App operation and select the new OMI App folder with
the updated MES .NET controls—MES\MES OMI Controls— to recreate the OMI App object with those
controls.

Upgrading MES .NET Controls for AVEVA InTouch HMI Applications


If your organization is using MES .NET controls in System Platform for InTouch HMI applications, you have to first
remove the previous version of the MES .NET controls before upgrading to the current version of the controls.
1. Perform the MES version upgrade.
2. Open the System Platform IDE and make a list of the MES controls in the toolbox folder that are being used
in each galaxy.
3. Delete the MES controls from the toolbox folder in each galaxy.
The MES .NET control DLLs are removed from the default System Platform application folders in which they
were stored. These folders are:
o \ArchestrA\Framework\Bin
o \ArchestrA\Framework\FileRepository\<galaxy_name>\Vendors
4. Exit the System Platform IDE.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 143
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 14 – Upgrading MES Development Components

5. In Windows Explorer, perform a recursive search for the names of the MES .NET controls within the
\ArchestrA application folder to make sure that they were deleted.
For example, if you deleted the SampleViewer control, search for the name of the control, SampleViewer.
Each imported control will have a folder with a name in the format
Invensys_Systems__Inc__FactMES.Controls.<control_name>.
6. Delete any of the MES .NET control DLL folders that are found in the \ArchestrA application folder but not
the DLL files in the \MES\Controls installation folder.
7. Restart the System Platform IDE.
8. Import the MES controls package that was installed with the new release into each galaxy.
By default, the MES .NET controls are installed at in the Controls folder of the MES application folder. All the
DLL files present in the MES\Controls directory are enclosed in the MESControls.aaPKG file. You can import
individual DLL files or import all the .NET controls into the System Platform IDE by importing the
MESControls.aaPKG file.
For detailed information about importing .NET controls into System Platform IDE, see the MES .NET Controls
Developer Guide.
9. If using the MES Stateless or Stateful APIs, reimport these script libraries.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 144
Chapter 15

Modifying, Repairing, and Uninstalling MES

You can modify which MES products or components are installed, repair the MES installation, or uninstall MES.

Modifying What MES Products or Components Are Installed


You can add and/or remove products or components by modifying the installation.
To remove MES from the node entirely, see Uninstalling MES on page 154.
If you remove MES Web Portal, the existing Web Portal content will be backed up to save any custom web files.
For more information, see What Happens to MES Web Portal Customization Files During an Uninstall on page
101.
To add or remove MES products or components
1. From the node, do one of the following:
 In the Control Panel Programs and Features applet, select Manufacturing Execution System and click
Change or Uninstall/Change on the toolbar.
 Run the Setup.exe file in the MES installation root folder.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 145
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

The Setup tool options appear.

2. Select Modify, and then click Next.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 146
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

The list of MES products and components appears. The check boxes of products and components that are
currently installed are selected by default. For example, the figure below indicates that only the Operator
Client role components are currently installed.

3. Select the check boxes of only those products and components that you want to have installed at the
conclusion of the Modify operation.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 147
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

Only those products and components that have been selected will be installed. If a product or component
was previously installed but you have cleared its check box here, that product or component will be
uninstalled. Following the example provided in the previous step, the figure below indicates that the
Operator Client role components will be uninstalled while components related to the Configuration Client
role will be installed.

4. When you have finished selecting the products and components to be installed or remain installed, click
Next.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 148
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

The Modify confirmation screen appears.

5. To continue with the installation modification, click Modify.


A list of the prerequisite software that must be installed on the node prior to performing the MES
installation modification appears.
6. If any of the required software is not installed on the local node, click the Install Prerequisites button to
install them.
If you have not installed the prerequisite software for certain MES features that the Setup tool cannot install
automatically for you, a message appears to indicate this condition. You must click Cancel to exit the MES
Setup tool and install the prerequisite software before modifying the MES software. For more information
about prerequisite software, see MES Prerequisite Software on page 18.
7. If all prerequisite software is installed on the local node, click Next.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 149
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

If any applications that might conflict with the installation are running, a list of them appears.

8. Close the applications, then click the Try Again button to see if there are still any conflicts.
 If there are still conflicting applications running, close them and click the Try Again button.
 If there are no conflicting applications, click Next.
The installation modification begins. The following screen appears when it completes successfully.

9. To close the Setup tool, click Finish.


If you installed any of the following components, you must configure them using the Configurator:

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 150
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

 MES Database
 MES Middleware
 MES Middleware Proxy
 MES Web Portal
 Report Server components
For information about how to configure the MES components, refer to the appropriate topics in Configuring
MES Components on page 41.
Post-Uninstall Tasks
For possible post-uninstall tasks you might have to perform, see Tasks to Perform After MES Components Have
Been Removed on page 156.

Repairing the Installation


If files or registry entries of an installed instance of the software are corrupted or missing, you can repair the
installation.
To repair the MES installation
1. From the node, do one of the following:
 In the Control Panel Programs and Features applet, select Manufacturing Execution System and click
Repair or Uninstall/Change on the toolbar.
 Run the Setup.exe file in the MES installation root folder.
Note: If you have installed BI Gateway from the MES Setup tool, you must run the Repair operation from the
Control Panel Programs and Features applet. Running the Repair operation from the Setup.exe file will not
successfully repair the installation.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 151
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

The Setup tool options appear.

2. Select Repair, and then click Next.


The Repair confirmation screen appears.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 152
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

3. Click Repair.
If any applications that might conflict with the installation repair are running, a list of them appears.

4. Close the applications, then click the Try Again button to see if there are still any conflicts.
 If there are still conflicting applications running, close them and click the Try Again button.
 If there are no conflicting applications, click Next.
The installation repair begins. The following screen appears when it completes successfully.

5. To close the Setup tool, click Finish.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 153
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

Uninstalling MES
You can remove all the MES products and components installed on a node.
To remove only certain products or components on the node, see Modifying What MES Products or Components
Are Installed.
Note: Uninstalling MES from the Control Panel or using the Setup tool does not uninstall License Manager or BI
Gateway. If you want to uninstall those products, they have to be uninstalled separately.
To uninstall MES on a node
1. From the node, do one of the following:
 In the Control Panel Programs and Features applet, select Manufacturing Execution System and click
Uninstall or Uninstall/Change on the toolbar.
 Run the Setup.exe file in the MES installation root folder.
The Setup tool options appear.

2. Select Remove, and then click Next.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 154
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

The Uninstall confirmation screen appears.

3. To continue with the uninstall process, click Uninstall.


If any applications that might conflict with the uninstall are running, a list of them appears.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 155
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Modifying, Repairing, and Uninstalling MES

4. Close the applications, then click the Try Again button to see if there are still any conflicts.
 If there are still conflicting applications running, close them and click the Try Again button.
 If there are no conflicting applications, click Next.
The uninstall begins. The following screen appears when it completes successfully.

5. To close the Setup tool, click Finish.

Tasks to Perform After MES Components Have Been Removed


 If MES BI Gateway Reports were deployed but the MES BI Gateway Reports feature has been removed, the
deployed reports are not removed from SSRS during a modification or uninstall. The reports must be
removed manually.
 If the MES Database component was removed, the MES database is not deleted and the MES middleware
service user account SQL permissions are not removed as part of the modification or uninstall. The database
must be removed manually and SQL permissions must be changed or the SQL login deleted manually.
 If you remove the MES Web Portal component, during the remove operation the existing MES Web Portal
content will be backed up to save any custom web files. For more information, see What Happens to MES
Web Portal Customization Files During an Uninstall on page 101.

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 156
Index

.
.NET Controls
upgrading • 143
.NET Development installation role • 15
prerequisite software • 18
.NET Framework required version • 18, 23

A
Admin User • 7
Application Objects
client component • 11
AVEVA Identity Manager
DB/MW Communication • 77
MES client registration • 77
AVEVA Single Sign On • 15, 47, 139

C
cluster environment
environment considerations for server component • 20
command line installation, configuration, uninstall
command list file • 125
Configurator response file MES component properties • 130
Configurator response file syntax • 129
Configurator response file template • 141
install command syntax • 126
install response file component entries • 127
install response file syntax • 126
install response file, samples • 128
installation results, checking • 128
Logger, Operations Control Management Console • 128

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 157
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Index

uninstall command syntax • 129


common platform HTTPS port • 48
Configuration Client installation role • 15
prerequisite software • 18
Configurator, post-install • 41
closing • 45
command line, running from • 129
component configuration status • 41
Configurator command syntax • 129
entries, required or invalid • 41
messages, configuration • 41
product tree • 41
starting • 41

D
database connection strings
production database • 69
restore database • 71
testing and saving • 79
Database Server wth MES installation role • 15
prerequisite software • 18
Database Setup component, configuring • 51
properties in Configurator response file • 130
DB/MW Communication component, configuring • 62
properties in Configurator response file • 132

E
End User License Agreement (EULA) • 23

H
hardware requirements • 7

I
installation
command line, running from • 126
prerequisite software • 18
procedure • 23
requirements, hardware and software • 7
role-based • 15

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 158
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Index

security and permissions when performing • 7

L
Logger, Operations Control Management Console • 7

M
MES .NET Controls, upgrading • 143
MES BI Gateway Reports
BI Gateway Data Adapters component • 12, 103
BI Gateway Model Builder • 104, 113
BI Gateway Model Builder component • 12, 103
BI Gateway Server component • 12, 103
installing and configuring • 102
MES BI Gateway Model, importing and deploying • 104
MES BI Gateway Reports component • 12
MES report model file • 104, 113
MES views, stored procedures, and functions added to BI Gateway database • 108
properties in Configurator response file • 138
Quality Characteristic Details report, configuring security policies for • 113
removing • 156
upgrading model from a previous release • 113
MES configuration • 41
post-configuration tasks • 45
MES database optimization
assistance with • 61
index optimization script • 60
index rebuild and reorganize frequency • 61
indexes, number to use • 61
reindexing during database creation and migration • 51
system usage, monitoring • 60
what to index • 61
MES databases
creating • 51
migrating • 54
overwriting • 54
removing • 156
table fragmentation, fixing • 51
MES Development Library
Development Library component • 13

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 159
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Index

MES API DLLs • 13


MES Middleware Proxy
component, configuring • 86
properties in Configurator response file • 136
MES middleware service
database connection string, production • 69
database connection string, restore • 71
database connection strings, testing and saving • 79
MSDTC firewall exception, adding • 81
performance counters • 79
restarting after changing MES Security Mode • 100
starting, stopping, restarting • 123
System Platform User Account • 7
WCFHostService • 7
MES Middleware/DB Maintenance Server installation role • 15
prerequisite software • 18
MES product license, installing • 32
MES Service Monitor
starting and exiting • 123
MES software
installing • 23
MES Stateful API
upgrading DLLs • 13, 142
MES Stateless API
upgrading DLLs • 13, 142
MES Web Portal
component, configuring • 92
customized files • 101
IIS feature settings • 95
properties in Configurator response file • 137
Root CA Certificate • 96
user session cache refresh rate, setting • 100
MSDTC
firewall exception, adding • 81

O
Operations Capability Object (OC)
description • 11
Operator Client installation role • 15
prerequisite software • 18

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 160
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Index

P
performance counters • 79
permissions when running installation • 7
post-configuration tasks • 45
prerequisite software • 18, 125

R
removing the MES software • 156
Report Server installation role • 15
prerequisite software • 18
reports components • 12
requirements, hardware and software • 7
role-based installation • 15

S
Sample Recording Object (SRO)
description • 11
security when running installation • 7
server components • 8
software requirements • 7
SQL Server
user authentication, specifying in Configurator • 45
System Management Server
Advanced Configuration dialog • 48
configuring • 47
DB/MW Communication • 77
HTTPS port • 48
MES settings affected by • 48, 80
System Platform Development installation role • 15
prerequisite software • 18
System Platform User Account • 7

U
uninstalling MES software
uninstall command syntax • 129
upgrade requirements • 21
Utilization Capability Object (UCO)
description • 11

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 161
AVEVA™ Manufacturing Execution System (MES) Installation Guide
Chapter 15 – Index

W
WCFHostService • 7
Web Portal installation role • 15
prerequisite software • 18
workgroup environment
MES database permissions • 7

Version 7.0
© 2023 AVEVA Group plc and its subsidiaries. All rights reserved. Page 162

You might also like