0% found this document useful (0 votes)
35 views

Installation

Uploaded by

Gokul Nath
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Installation

Uploaded by

Gokul Nath
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 176

Manufacturing Execution System (MES)

Installation Guide

Version 6.0
June, 2018
© 2018 AVEVA Group plc or its subsidiaries. All rights reserved.
The Schneider Electric industrial soft ware business and AVEVA have merged to trade as AVEVA Group
plc, a UK listed company. The Schneider Electric and Life is On trademarks are owned by Schneider
Electric and are being licensed to AVEVA by Schneider Electric.
No part of this documentation shall be reproduced, stored in a ret rieval system, or transmitted by any
means, electronic, mechanical, photocopying, rec ording, or otherwise, without the prior written
permission of AVEVA. 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, AV EVA 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 soft ware described in this
documentation is furnished under a license agreement. This soft ware may be used or copied only in
accordance with the terms of such license agreement.
ArchestrA, Aquis, Avantis, DYNS IM, eDNA, EYESIM, InBatch, InduSoft, InStep, IntelaTrac, InTouch,
PIPEPHASE, PRiSM, PRO/II, PROV IS ION, ROMeo, SIM4ME, SimCentral, SimSci, Skelta,
SmartGlance, Spiral Software, Termis, WindowMaker, WindowViewer, and Wonderware are trademarks
of AVEVA and/or its subsidiaries. An extensive listing of AVEVA trademarks can be found at:
https://sw.aveva.com/legal. All other brands may be trademarks of their respective owners.
Publication date: 6/29/2018
Contact Information
AVEVA Group plc
High Cross
Madingley Road
Cambridge
CB3 OHB. UK
https://sw.aveva.com/
For information on how to cont act sales, customer training, and technical support, see
https://sw.aveva.com/contact.
MES Installation Guide

Contents
Chapter 1 Preparing to Install MES .................................................................................... 7
Introduction .............................................................................................................................. 7
Hardware and Software Requirements ....................................................................................... 7
Notes About Security and Permissions ....................................................................................... 7
MES Components ..................................................................................................................... 8
Server Components ............................................................................................................ 8
Client Components .............................................................................................................. 9
Application Objects ...................................................................................................... 11
Reports Components......................................................................................................... 12
Development Library (AP I DLLs) ........................................................................................ 12
PDF Doc ument ation .......................................................................................................... 13
MES Web Access ............................................................................................................. 14
Intelligence and Licensing Components .................................................................................... 14
MES Role-B ased Installation ................................................................................................... 15
MES Prerequisite Software ...................................................................................................... 17
Running MES in a 2-Node Failover Cluster Environment ........................................................... 18
Installation and Setup Requirements for the Cluster Nodes .................................................. 18
Cluster Environment Considerations During MES Server Component Installation .................. 18

Chapter 2 Preparing to Upgrade MES ............................................................................. 19


Upgrade Requirements ........................................................................................................... 19
Migrating an MES Database to the Current Release .................................................................. 19
Migrating an MES Database from Oracle to SQL Server ............................................................ 20
Pre-Migration Tasks .......................................................................................................... 20
Creating the SQL Server MES Dat abase ....................................................................... 20
Preparing the Oracle MES Dat abas e ............................................................................ 21
Migrating the Oracle MES Dat abas e to the SQL Server MES Dat abase ................................ 22
Selecting the Data Source and Destination.................................................................... 22
Preparing the Table and Data Mappings ....................................................................... 28
Configuring Each Table's Column Mapping Settings ...................................................... 31
Reviewing the Mappings and Initiating the Migration ...................................................... 33
Migrating the Labor_Usage Table ................................................................................. 36
Migrating Custom Tables ............................................................................................. 39
Chapter 3 Installing MES ..................................................................................................... 41
Chapter 4 Activating the MES Product Licenses ..............................................................49
Introduction to MES Product Licens es ...................................................................................... 49
Configuring the License Server Component .............................................................................. 50
Activating the Product Licenses ............................................................................................... 51

Version 6.0 3
MES Installation Guide Contents

How MES Product Licenses Are Managed ................................................................................ 53


Viewing MES Product License Information ................................................................................ 55
Reserving Licenses When Multiple MES Systems Are Deployed ................................................ 57
Deactivating MES Product Licenses ......................................................................................... 58
Chapter 5 Configuring MES Components.......................................................................... 59
Introduction ............................................................................................................................ 59
About Configurat or .................................................................................................................. 59
Specifying SQL Server User Authentication .............................................................................. 63
Closing Configurator ............................................................................................................... 63
Post-Configuration Tasks ........................................................................................................ 64
Chapter 6 Creating or Migrating MES Databases ............................................................ 65
Introduction ............................................................................................................................ 65
Fixing Database Table Fragmentation ...................................................................................... 65
Creating an MES Database ..................................................................................................... 65
Migrating or Overwriting an Existing MES Database .................................................................. 68
Creating a Customized MES Database Using Modified Database Scripts ................................... 71
Importing Windows Active Directory Group S IDs into the MES Database .................................... 72
Recommendations for Optimizing the MES Database ................................................................ 73
MES Database Index Optimization Script ............................................................................ 73
Monitoring Actual System Usage ........................................................................................ 73
How Many Indexes to Use ................................................................................................. 74
Frequency of Index Rebuilding and Reorganizing ................................................................ 74
Choosing What to Index..................................................................................................... 74
Additional Assistance ........................................................................................................ 74
Chapter 7 Configuring MES Middleware Communication with MES Databases......... 75
Introduction ............................................................................................................................ 75
Specifying the MES Production Database Connection String ..................................................... 77
Specifying the MES Restore Database Connection String .......................................................... 78
Configuring the MES Middleware's User Account Access to MES Databases ............................. 80
Guidelines for MES Service Windows User Accounts .......................................................... 82
Testing and Saving the Database Connection Settings .............................................................. 83
Responding to MES Middleware Configuration Issues ............................................................... 84
Assigning SQL Server Database Roles to the MES Middleware Service User Account ................ 84
Adding MSDTC Firewall Exception for Remote MES Middleware to Dat abase Communication .... 89
Configuring the MS DTC Component Services ........................................................................... 92

Chapter 8 Configuring the MES Middleware Proxy .......................................................... 95


Chapter 9 Configuring MES Web Portal ............................................................................ 97
Introduction ............................................................................................................................ 97
Configuring the MES Web Portal Component............................................................................ 98

4 Version 6.0
Contents MES Installation Guide

Responding to IIS Feature Delegation Conflicts................................................................... 98


IIS Feature Settings for MES Web Port al .......................................................................... 100
Authentication – Anonymous ...................................................................................... 100
Authentication – Windows .......................................................................................... 100
MIME Types .............................................................................................................. 100
Handler Mappings ..................................................................................................... 100
Modules .................................................................................................................... 100
Default Document ...................................................................................................... 100
Error Pages............................................................................................................... 101
Setting the Web Port al User Session Cache Refresh Rate ....................................................... 101
Implementing SSL for MES Web Port al .................................................................................. 101
SSL Overview ................................................................................................................. 101
Public HTTPS SSL Certificates ................................................................................... 102
Self-Signed HTTPS SSL Certificates .......................................................................... 102
Configuring a Public SSL Certificate for the MES Web Portal Web Site ............................... 102
Configuring a Self-Signed SSL Certificate for the MES Web Port al Web Site....................... 103
Enabling HTTPS Binding on the MES Web Portal Web Site ............................................... 105
Disabling HTTPS on the MES Web Portal Web Site ................................................................ 106
What Happens to MES Web Portal Customization Files During an Uninstall ............................. 107
Chapter 10 Configuring and Deploying MES Intelligence Reports ............................. 109
Introduction to Configuring and Deploying MES Intelligence Reports ........................................ 109
Configuring Intelligence and MES Database Setup Components .............................................. 110
Applying Intelligence 2014 R3 Hot Fix L00148071 ................................................................... 111
Updating the Int elligence Database with MES Tables .............................................................. 111
Deploying the SSRS MES Reports Against the Intelligence Database ...................................... 115
Configuring Security Policies for the Quality Characteristic Detail Report .................................. 119
Chapter 11 Deploying MES Reports in Information Server........................................... 121
Introduction to Deploying MES Reports in Information Server .................................................. 121
Adding the MES Database as a Data Source for Information Server ......................................... 121
Deploying the MES Reports ................................................................................................... 123
Configuring Security Policies for the Quality Characteristic Detail Report .................................. 125
Chapter 12 MES Service Monitor ...................................................................................... 127
Starting and Exiting the Service Monitor ................................................................................. 127
Starting, Stopping, and Restarting the MES Middleware Host and MES Service ........................ 127
Chapter 13 Running MES Install and Configurator from a Command Line................ 129
Introduction .......................................................................................................................... 129
Prerequisite Software ............................................................................................................ 129
Command List File ................................................................................................................ 130
MES Install Command........................................................................................................... 130
Install Response File XML Syntax .................................................................................... 130
Install Response File Component Entries .......................................................................... 131
Sample Install Respons e Files Provided ........................................................................... 132
Checking Installation Results in the ArchestrA Logger File ................................................. 132

Version 6.0 5
MES Installation Guide Contents

MES Uninstall Command....................................................................................................... 132


Configurator Command ......................................................................................................... 133
Configurator Response File XML Syntax and Component Properties .................................. 133
MES Component Properties ............................................................................................. 133
MES Database Setup Component Properties .............................................................. 134
MES DB/MW Communication Component Properties .................................................. 135
Middleware Proxy Component Properties.................................................................... 139
MES Web Portal Component Properties ..................................................................... 139
MES Intelligence Reports Component Properties ........................................................ 140
Licensing Component Properties ................................................................................ 141
Templat e Configurator Res ponse File for MES .................................................................. 141
Chapter 14 Customizing the MES Middleware............................................................... 143
Introduction to MES Middleware Customization ....................................................................... 143
Opening the Middleware Configuration Editor ......................................................................... 143
Middleware Settings Tab ....................................................................................................... 145
Middleware Client Settings ............................................................................................... 145
Middleware Database Settings ......................................................................................... 146
Middleware Service Settings ............................................................................................ 146
Middleware Tracing Settings ............................................................................................ 147
Command (SP) Timeouts Tab................................................................................................ 148
Custom DB SP Mappings Tab ............................................................................................... 149
Custom Batch SP Mappings Tab ........................................................................................... 149
Mapping the Identifiers and Stored Procedures in Batches ................................................. 150
Extensibility Hooks Tab ......................................................................................................... 150
Clearing the Middleware Stored Procedure Parameter Cache .................................................. 152
Log Flags for Troubleshooting the MES Middleware ................................................................ 153
Log Flags for Server-Side Diagnostics .............................................................................. 153
Log Flags for Client-Side Diagnostics ............................................................................... 154
MES Middleware Performance Count ers ................................................................................ 154
Chapter 15 Upgrading MES Development Components .............................................. 157
Upgrading the MES Client API Script Libraries ........................................................................ 157
Upgrading MES .NET Cont rols in ArchestrA ........................................................................... 158

Chapter 16 Modifying, Repairing, and Uninstalling MES.............................................. 159


Modifying What MES Products or Components Are Installed ................................................... 159
Repairing the Installation ....................................................................................................... 166
Uninstalling MES .................................................................................................................. 169
Tasks to Perform After MES Components Have Been Removed .............................................. 172

Index ....................................................................................................................................... 173

6 Version 6.0
MES Installation Guide

C HAPTER 1
Preparing to Install MES
In This Chapter
Introduction .................................................................................................................................... 7
Hardware and Software Requirements ............................................................................................. 7
Notes About Security and Permissions ............................................................................................. 7
MES Components........................................................................................................................... 8
Intelligence and Licensing Components ......................................................................................... 14
MES Role-B ased Installation ......................................................................................................... 15
MES Prerequisite Software............................................................................................................ 17
Running MES in a 2-Node Failover Cluster Environment ................................................................. 18

Introduction
Before you begin the installation, you should:
 Make sure that the nodes on which MES will be installed meet the hardware and soft ware
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 soft ware for the planned products and components is installed on
each node. See MES Prerequisite Soft ware on page 17.

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 Global Customer Support https://sw.aveva.com/contact website.

Notes About Security and Permissions


Note the following about security and permissions when running a 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.

Version 6.0 7
MES Installation Guide Preparing to Install MES

 Beginning with the MES 2014 R3 (version 5.3) release, MES no longer uses the ArchestrA Us er
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
Configuring the MES Middleware's User Account Acces s to MES Databases on page 80.
 When installing in a workgroup environment, permissions to access the MES database must be
granted manually to the MES middleware service's user account.

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 S ID utility, which is used to import Windows
Active Directory group S IDs into the MES dat abas e.
Middleware
The MES middleware enables communication between the client components and the MES database. It
also allows the node to support executing archive, purge, and restore (APR) jobs for MES dat abas e
maintenance.
The Middleware component also includes:
 The Service Monitor utility, which is used to start, stop, and restart the MES middleware host servic e
and the MES Service from the Service Monitor icon in the Windows system tray
 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
It is recommended to have a dedicated MES middleware service running on the same node as the MES
Service.
MES Service
The MES Service runs middleware activities that occur on a schedule, such as:
 Changing shifts
 Generating and changing the status of quality samples
 Cleaning up stale sessions
 Running schedules of Supply Chain Connector
The MES Service component also includes the Service Monit or utility, which is used to start, stop, and
restart the MES middleware service and the MES Service from the Service Monitor ic on in the Windows
system tray.
There should be only one MES Service service running in a system. Also, it is recommended to have a
dedicated MES middleware service running on the same node as the MES Service.
MES Web Portal
MES Web Portal is a web application that provides web-based access to MES.

8 Version 6.0
Preparing to Install MES MES Installation Guide

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, and entity access
 Configure languages
 Configure physical entities
 Configure shifts and assign shifts to entities
 Configure General Paramet ers
 Configure items, BOMs, operations, and processes
 Configure archive, purge, and restore (AP R) jobs for database maintenance
 Configure quality specifications, sample plans, and characteristics
 Create and manage work orders and jobs
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 ArchestrA IDE equipment mo del to
trigger production events and log associated production data in the MES database.
 The Utilization Capability Object (UCO), which extends the ArchestrA IDE equipment model to
monitor machine performance.
 The Sample Recording Object (SRO), which extends the ArchestrA 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 an ArchestrA IDE extension. Therefore, the ArchestrA 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 Arc hestrA eq uipment 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 ArchestrA users and roles to MES to create corresponding ME S 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 an ArchestrA 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.

Version 6.0 9
MES Installation Guide Preparing to Install MES

Configurator
You can use MES Configurator to customize and maintain your MES system, such as:
 Setting up system-wide values such as job states, tools, document types, defaults for file extensions,
labor departments, and labor categories
 Managing user certifications
 Managing plant information such as physical entities
For more information, see the MES Configurator User Guide or the MES Help online help.
Supervisor
You can use MES Supervisor to c oordinate and oversee t he daily activities of your MES system, such as:
 Defining and maintaining folders of related dat a
 Tracking inventory levels and storage location data
 Setting-up data collection
 Storing customer information and proc essing sales orders
 Setting-up Supply Chain Connector imports and exports and define shift exceptions
For more information, see the MES Supervisor User Guide or the MES Help online help.
Data Editor
You can use MES Data Editor to filter, insert, and modify historical dat a 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 Edit or 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
 Capt uring machine utilization and labor data
For more information, see the MES Operator User Guide or the MES Help online help.
.NET Controls
The .NE T controls are part of the client components’ user interface. You can us e these controls as
building blocks for ArchestrA graphical interfaces.
When the .NET Controls component is installed, the .NET control files and the MES Control s.aaPKG file
are installed in the <MES program files path>\Wonderware\MES\Control s folder. The
MES Control s.aaPKG file, which contains all of the DLLs, can be imported into the Arc hestrA IDE.

10 Version 6.0
Preparing to Install MES MES Installation Guide

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 applicatio n object (that is, a
OCO, UCO, or SRO) deployed on them.

Application Objects
Operations Capability Object (OCO)
The OCO extends the ArchestrA IDE equipment model to trigger production events and log associated
production data in the MES dat abas e.
Once you have deployed the OCO, you can:
 Create jobs running on the entity
 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 E vents Module (PEM) events of the
associated equipment in the equipment model:
 Material events relat ed to consumption, production, and movement
 Status events related to equipment, production dat a 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 ArchestrA 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 ArchestrA IDE equipment model to monit or quality samples for the entity. Once
you have deploy ed 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 S RO 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.

Version 6.0 11
MES Installation Guide Preparing to Install MES

Reports Components
MES Intelligence Reports Components
If the system includes Intelligence, you can install the MES Intelligence Reports component.
If the system does not include Intelligence but you want to use MES Intelligence Reports, you can also
install the Intelligenc e Server and Intelligence Dat a Adapt ers components to support those reports.

Note: During the installation, selecting the Report Server role option will install only the MES Intelligence
Reports component. To install the Intelligence Server and Int elligence 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 Intelligence Reports, see the MES Intelligence Reports User
Guide.
Information Server Components
If the system includes an Information Server, the following Reports components can be selected and
installed on the node where the Information Server is installed by choosing the Customize Installation
option in the Setup tool and then manually selecting them:
Table Weaver Reports
This option adds the search and list functions to the Information Server Table Weaver.
Reporting Service s Reports
This option adds sample MES reports based on Reporting Services to the Information Server
Reporting Services feature.
Before you install an Information Server MES Reports component, make sure that:
 SQL Server Reporting Services (MSS QLSERVE R) is running
 The http://localhost/reports (on the Installation Server node) page displays/refreshes without any
errors.
MES reports for Installation Server must be deployed after installation of the Reports component. See
the MES Reports in Information Server Us er Guide or MES Help online help.

Development Library (API DLLs)


The Development Library component installs the MES API DLLs to support third-party application
development. These DLLs compris e the MES Stateless and Stateful APIs.
If you are upgrading a MES system that have scripts that use t he MES Stateless or Stateful AP I DLLs,
you must also upgrade the DLLs to the current version. After the installation and configuration, see the
procedure in Upgrading MES .NET Controls in ArchestrA on page 158.
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

12 Version 6.0
Preparing to Install MES MES Installation Guide

 FactMES.API.Prod.dll
 FactMES.API.Quality.dll
 FactMES.API.SPC.dll
 FactMES.API.Util.dll
 FactMES.Client.COM. dll
 FactMES.Client.Common. dll
 FactMES.Client.Int erfaces.dll
 FactMES.Client.MiddlewareAccess.dll
For more information about using these DLLs in scripts, see the MES Stateless and Stateful API
Referenc e 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.
MES Virtual Environment Implementation Guide
Provides information to assist with implementing MES in a virt ualized environment.
ReadMe
Provides information about soft ware and hardware requirements, known issues, licensing, and
documentation.
MES Installation Guide and online help
Provides information about installing MES applications.
MES Client Guide and online help
Provides information about customizing and maint aining the plant floor information.
MES Configurator Guide
Provides information about customizing and maint aining the MES system.
MES Dynamic Routing Guide
Provides information required to set up dynamic routing of operations through a process defined in
MES.
MES Middleware Extensibility Hooks Reference
Provides information about how to use middleware extensibility hooks to perform custom actions
before or after a specific middleware event is executed.
MES .NET Control s Developer Guide
Provides information about the properties and methods of the MES .NET controls for use in custom
applications and Arc hestrA 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
ArchestrA IDE.
Operation Capability Object (OCO) Guide
Provides information about installing, configuring, and using the Operations Capability Object to
track production transactions against equipment.
Sample Recording Object (SRO) Guide
Provides information about installing, configuring, and using the Sample Recording Object to collect
and store values for samples.

Version 6.0 13
MES Installation Guide Preparing to Install MES

Utilization Capability Object (UCO) Guide


Provides information about installing, configuring, and using the Utilization Capability Object to
collect equipment performance data.
MES Entity Model Builder Guide
Provides information about creating entities from the A rchestrA equipment model.
MES Stateless API Reference online help
Provides information about using the Stateless API within the Arc hestrA IDE to develop and
customize ArchestrA scripts.
MES Stateful API Reference online help
Provides information about using the Stateful AP I within the ArchestrA IDE to develop and customize
ArchestrA scripts.
MES Web API Reference online help
Provides information about using the Web API to develop custom applications.
MES Operator Guide
Provides information about executing production proc esses at the plant floor using the Operator
application.
MES Web Portal 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 Service Guide
Provides information about how to use the MES Service utility to perform regularly scheduled tasks
in the MES system.
MES Supervi sor Guide
Provides information about coordinating and overseeing the daily activity of the plant floor.
MES Intelligence Reports Guide
Provides information about viewing MES Int elligence Reports.
MES Reports in Information Server Guide
Provides information about viewing MES Reports for Information Server with either the Reporting
Services feat ure or the Table Weaver feature of Information Server.
MES Help
Provides online information about MES Configurator, Supervisor, Operat or, and Dat a Editor, and
MES Reports in Information Server.
MES Data Editor Guide
Provides information about inserting and modifying data in the MES database.
MES Web Acce ss Guide
Provides information about using web access methods that allow MES middleware calls to the MES
database.

MES Web Access


The MES Web Access service allows you to make MES middleware calls to the MES database via a web
service.
Because MES Web Access requires user access to SQL Server and the MES database, which could
present a security risk, it cannot be installed using the MES Setup tool. It must be installed manually. For
installation instructions and security considerations, refer to the MES Web Access User Guide.

Intelligence and Licensing Components


The MES installation software also includes the following components:

14 Version 6.0
Preparing to Install MES MES Installation Guide

 Intelligence, which must be installed if MES Intelligence Reports are going to be used.

Note: Int elligence and t he MES Intelligence Reports component must be installed on the same node
as SQL Server Reporting Services (SSRS ). Otherwise, the Quality Characteristic Detail report SPC
Chart will not work.

 The License Server and Manager. The licensing components must be installed so that MES product
licenses can be added to the system.
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 aut omatically 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 Set up tool also allows you to c ustomize the installation by selecting s pecific 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.
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 Intelligence, none of the MES roles will install Intelligence. During the installation, you have to
select the customize option to manually select the Int elligence components.
It is recommended that you identify the appropriat e 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 Service
 MES Middleware
 MES Middleware Proxy
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

Version 6.0 15
MES Installation Guide Preparing to Install MES

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 Intelligence Reports.
This role includes the following component:
 MES Intelligence Reports
If you want to deploy MES Intelligence Reports but Intelligence has not been installed on the network,
you can customize the installation to include the Intelligence Server and Intelligence Data Adapters.
If you want to install the MES Reports for Information Server, you can customize the installation to
include it.
MES Middleware/DB Maintenance Server
Select this role to install the MES middleware service on the node, or to support executing
Archive/P urge/Restore jobs to maintain the MES database.
This role includes the following components:
 MES Middleware
 License Client API for accessing the License Server
To distribute the client load, a system can have multiple MES Middleware components installed. All
five-equipment licenses include t wo 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 the MES Service, enterprise
integration, MES Application object/scripting servers, Skelta BPM .NET workflow integration, and nodes
making heavy us e 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 Supervisor
 MES Configurat or
 MES Data Editor
 MES Middleware Proxy
ArchestrA Development
Select this role if MES developers will be using ArchestrA 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

16 Version 6.0
Preparing to Install MES MES Installation Guide

 MES Entity Model Builder


 MES Development Library (API DLLs)
 MES Middleware Proxy
.NET Development
Select this role if MES developers will be using .NE T Controls to develop or run custom MES applications
on the node.
This role includes the following components:
 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 -bas ed 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.
Database Server with MES role requires:
 Microsoft Message Queue (MSMQ) Server
 Safenet Sentinel Licens e Driver version 7.6.8 or higher
Operator Client role requires:
 Microsoft MSMQ Server
Web Portal role requires:
 Microsoft MSMQ Server
 Microsoft Internet Information S ervices (IIS) version 7.5 or higher
Report Server role requires:
 Windows Installer 4.5 (required by Int elligence Reports)
 Microsoft .NE T Framework 4.5.2 (required by Intelligence Reports; otherwise, MES requires 4.5.1 or
later)
 The version of the Mic rosoft Visual Studio C++ 4 x64 Runtime Redistributable that is compatible with
the Windows server software that running on the n ode
MES Middleware/DB Maintenance Server role requires:
 Microsoft MSMQ Server
 Safenet Sentinel Licens e Driver version 7.6.8 or higher
Configuration Client role requires:
 Microsoft MSMQ Server
ArchestrA Development role requires:
 Microsoft MSMQ Server
 Application Server version 2014 R2 or higher

Version 6.0 17
MES Installation Guide Preparing to Install MES

.NET Development role requires:


 Microsoft MSMQ Server

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 soft ware running (MES Mid dleware and MES
Service components) on the two cluster nodes with the MES dat abase 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 Di sk Majority.
 For both nodes, set the domain firewall to Off.
 Install any MES licenses on both cluster nodes. See Activating the MES Product Licenses on page
49.
 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 Dat abase S etup component in the post -install Configurator for the cluster
nodes:
 Use the same database configuration settings for bot h 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.

18 Version 6.0
MES Installation Guide

C HAPTER 2
Preparing to Upgrade MES
In This Chapter
Upgrade Requirements ................................................................................................................. 19
Migrating an MES Database to the Current Release ....................................................................... 19
Migrating an MES Database from Oracle to SQL Server .................................................................. 20

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 unins tall 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 .NE T controls in ArchestrA, you have to first remove the previous
version of the MES .NE T controls before upgrading to the current version of the controls. For the
procedure, see Upgrading MES .NET Controls in ArchestrA on page 158.
 Any deployed ArchestrA platforms 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 complet e.
 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.
 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 dat abas e to version 4.0.
Another option is to record the contents of the FactIntelligence.cfg file prior to the upgrade and t hen
use that information to configure the new database in the post -install Configurator applic ation (the
database connection information will not be aut omatically populated in Configurator). You can see
the settings to record by running the MES Database Connection String Editor on the old MES
version.

Version 6.0 19
MES Installation Guide Preparing to Upgrade MES

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 68.
 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 Dat abase Index Optimization Script on page 73.
 If you are migrating an MES database from version 5.3 or earlier, the migration of the utilization t able
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.

Migrating an MES Database from Oracle to SQL Server


Beginning with MES version 5.2, Oracle databases are not supported.
If you are currently using Oracle to host the MES database and are upgrading MES to version 5.2 or
later, you will need to migrate the MES database to SQL Server prior to upgrading MES. Once you have
migrated the MES database to SQL Server, you can proceed with the MES upgrade.

Pre-Migration Tasks
Prior to migrating the Oracle MES database to SQL Server, you have to:
 Create the SQL Server MES database
 Prepare the Oracle database for the migration

Creating the SQL Server MES Database


Use the post-install Configurator application to create a SQL Server MES database. See Creating an
MES Database on page 65.
After you have created the SQL Server MES database, run the following SQL statements against the
SQL Server MES database to delete all default data that was loaded when the database was created.
During the migration, all the data from the Oracle database will be c opied, so you want to start with a
clean SQL Server database.

Note: In t he following statements, the SQL schema is assumed t o be the default dbo schema. If the MES
database is contained in a different schema, then substitute that schema's name for dbo in these
statements.

DELETE FROM item


DELETE FROM item_class
DELETE FROM item_reas
DELETE FROM item_state
DELETE FROM item_grade
DELETE FROM item_reas_grp
DELETE FROM priv
DELETE FROM job_state
DELETE FROM ui_button
DELETE FROM ui_button_set
DELETE FROM ui_config_default
DELETE FROM ui_config
DELETE FROM system_attr
DELETE FROM system_attr_grp
DELETE FROM user_name
DELETE FROM grp_name

20 Version 6.0
Preparing to Upgrade MES MES Installation Guide

DELETE FROM ui_config_default


DELETE FROM shift
DELETE FROM labor_cat
DELETE FROM labor_dept
DELETE FROM uom
DELETE FROM cust_contact
DELETE FROM cust
DELETE FROM util_reas
DELETE FROM util_reas_grp
DELETE FROM util_state

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[


mgr_data_config]') AND type in (N'U')) DELETE FROM mgr_data_config
DELETE FROM dx_query_param
DELETE FROM dx_query
IF EXISTS (SELECT * FROM sys.objects WHERE object_id =
OBJECT_ID(N'[dbo].[factor]') AND type in (N'U')) DELETE FROM factor
IF EXISTS (SELECT * FROM sys.objects WHERE object_id =
OBJECT_ID(N'[dbo].[normal_area]') AND type in (N'U')) DELETE FROM normal_area
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[
rule_group]') AND type in (N'U')) DELETE FROM rule_group
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[
rule_group_link]') AND type in (N'U')) DELETE FROM rule_group_link
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[
spc_rule]') AND type in (N'U')) DELETE FROM spc_rule
DELETE FROM language
DELETE FROM language_grp
DELETE FROM db_status
DELETE FROM db_deleted_log
If you have standard MES tables in Oracle that you have customized or you have created custom tables,
it is recommended that you customize or create the corresponding tables in the SQL Server MES
database prior to performing the migration. The SQL Server Import and Export Data wizard can create
the tables. However, its ability to map Oracle dat a types to SQL Server data types is limited and a
significant amount of manual mapping is required to create the SQL table corr ectly.
If you have any attribut es that are marked as being "In Queue Grid" or "In Inventory Grid", you must add
columns to one or more of the following tables: Inv_It em_Attr, Inv_Lot_Attr, Queue_Item_Attr,
Queue_Job_Attr, and Queue_Wo_Attr. Query each of these tables in Oracle and determine the number
and names of the columns and then add the columns using the two SQL statements bel ow. All the
columns that you add will have the same pattern of "attr#" and "attr#d_h" where # will be replaced by the
attr_id of the exposed attribute. These columns will always come in pairs and there will be as many
columns as there are attributes exposed in the grid.
ALTER TABLE inv_item_attr ADD attr0 nvarchar(1700)
ALTER TABLE inv_item_attr ADD attr0d_h nvarchar(80)

Preparing the Oracle MES Database


Before starting the migration, run the following updates against your Oracle MES database.
update system_attr set attr_desc = 'Warning level number of records for Filter
dialog in Job Step Data Editor<5364>' where attr_id = 360;
update system_attr set attr_desc = 'Duration in minutes to avoid generating
dynamic jobs<6266>' where attr_id = 410;
commit;

Version 6.0 21
MES Installation Guide Preparing to Upgrade MES

Migrating the Oracle MES Database to the SQL Server MES Database
You use the SQL Server Import and Export wizard to migrat e the Oracle MES database to the SQL
Server MES dat abase. The following topics describe how to go through the wizard to perform the
migration.

Selecting the Data Source and Destination


1. On the Start menu or in Windows Explorer, navigat e to the SQL Server application group and open
the SQL Server Import and Export wizard.
There are 32-bit and 64-bit versions of the SQL Server Import and Export tool. The version that you
open depends on whether you have 32-bit or 64-bit listeners installed for Oracle.
The Welcome page appears.

2. Click Next.
The Choose a Data Source page appears.
3. On the Data source list, select .NET Framework Data Provider for Oracle.

22 Version 6.0
Preparing to Upgrade MES MES Installation Guide

The Oracle settings appear.

4. Complete the following settings.


Security: Integrated Security
Select how user access to the Oracle database has been implemented:
o If using Windows integrated security, select True. Your current Windows login will be used to
access the database.
o If using native Oracle security, select False. You will also have to enter the user ID and
password.

Security: Pa ssword
If using native Oracle security, enter the user password.
Security: Persi st Security Info
Set this setting to True; otherwise, the migration will fail.
Security: User I D
If using native Oracle security, enter the user ID.
Source: Data Source
Enter the name of the Oracle MES dat abase.

Version 6.0 23
MES Installation Guide Preparing to Upgrade MES

As you complete the settings on this page, the ConnectorString field populates with the connection
string.

5. Click Next.
The Choose a Destination page appears.
6. On the De stination list, choose .NET Framework Data Provider for SqlServer.

24 Version 6.0
Preparing to Upgrade MES MES Installation Guide

The SQL Server settings appear.

7. Complete the following settings (scroll to the bottom of the settings list to see them).
Security: Integrated Security
Select how user access to the SQL database has been implemented:
o If using Windows integrated security, select True. Your current Windows login will be used to
access the database.
o If using native SQL security, select False. You will also have to enter the user ID and password.

Security: Pa ssword
If using native SQL security, enter the user password.
Security: User I D
If using native SQL security, enter the user ID.
Source: Data Source
Enter the name of the SQL Server.
Source: User Instance
Enter the name of the SQL MES database.

Version 6.0 25
MES Installation Guide Preparing to Upgrade MES

If Integrated Security is set to True, as you complete the settings on this page, the Data:
ConnectorString field populates with the connection string.

8. Click Next.

26 Version 6.0
Preparing to Upgrade MES MES Installation Guide

The Specify Table Copy or Query screen appears.

9. Select the Copy data option and click Next.


The Select Source Tables and Views page displays. After several seconds, the list of MES tables
and views in the Oracle database appears.

Version 6.0 27
MES Installation Guide Preparing to Upgrade MES

Preparing the Table and Data Mappings


On the Select Source Tables and Views page, the Oracle tables are listed in the Source column. The
table naming is in the format "<user_ID>"."<table_name>".

1. Select all of the tables in the Source column that begin with the Oracle user ID (in the example
above, MES DB), except the tables listed below. None of these tables except the Labor_Usage table
exist in the SQL Server database, so they should not be migrated. The Labor_Usage table requires
special handling to migrate its data to SQL Server; see Migrating the Labor_Usage Table on page
36.
o Admin_Work_Area
o Arch_Tab_List
o Audit_Groups
o Audit_Tables
o Audit_Trigger_Lib
o Audit_Trigger_Template
o Defcon
o DNC_Exec
o DNC_Log
o DNC_P rotocol
o Emailatt
o FC_B ridge
o FC_Ext_Driver_Status

28 Version 6.0
Preparing to Upgrade MES MES Installation Guide

o FC_Log
o FC_Namesp_Node
o FC_Namesp_Tag
o Fileque
o Hub
o Hub_Dev
o Labor_Usage
o Message
o Mail_Grp
o Mail_Grp_Member
o Plan_Table
o Pred_Msg
o Process_Itemclass_Link
o Quest_Sl_Temp_Explain1
o Str_Long
o Tpm_Dlgol
o Any table beginning TT_
If there are any tables in your Oracle database that you know do not have data in them, you can skip
those tables as well. However, be very careful if you decide to do this so that you do not accidentally
skip a table that does have data in it.

Version 6.0 29
MES Installation Guide Preparing to Upgrade MES

As you select each table, the source table name will appear in the De stination column.

2. For each of the selected tables, in the De stination column change the Oracle user ID to the name of
the SQL Server schema that contains the table. The default SQL schema is dbo.
a. Click the destination table name.
b. Change the Oracle user ID to the schema name.

c. Click outside the destination cell.


d. Click the destination cell again to caus e the tool to look for the SQL table.
If the tool finds the table, it makes the destination entry all lower case. If the table name remains
upper case after clicking it again, then the table is either a customized MES table or a table that only
exists in Oracle. Clear the selection of this table for this migration, as you will have to migrate it
separately aft er completing the standard MES table migration. See Migrating Custom Tables on
page 39.

30 Version 6.0
Preparing to Upgrade MES MES Installation Guide

Configuring Each Table's Column Mapping Settings


For each table to be migrated, you must select the Enable identity insert check box on the table's
Column Mappings dialog box. This ensures that any automatically incremented columns (for example,
the SAMPLE_ID column in the Sample table) are inserted in t he SQL database as they appear in the
Oracle database.
In addition, some tables include a MOD_ID column, whic h should not be migrated to the SQL database.
So, for each of these tables, the MOD_ID c olumn's De stination setting should set to <ignore>. For a list
of the tables that have a MOD_ID column, see Tables with the MOD_I D Column on page 31.
To configure each table's column mappings
1. Select the table.
2. Click the Edit Mappings button.
The Column Mappings dialog box appears.
3. Select the Enable identity insert check box.
4. For tables with a MOD_ID column, on the De stination column list for the MOD_ID ent ry, select
<ignore>.

5. Click OK.
6. After setting the edit mappings for all of the tables, on the Select Source Tables and Views page
click Next.
The Review Data Type Mapping page appears.

Tables with the MOD_ID Column


The following tables include a MOD_ID column, whose Destination setting should be set to be
<ignored> on the table's Column Mappings dialog box so that it is not migrated to the SQL Server
database.
 Bom_Item
 Bom_Item_Oper_Link

Version 6.0 31
MES Installation Guide Preparing to Upgrade MES

 Bom_Item_Oper_S pec
 Bom_Item_Oper_Step_Link
 Bom_Ver
 Cust
 Cust_Contact
 Data_Log_Grp
 Data_Log_V alue
 Folder
 Folder_Distr
 Folder_File
 Item_Attr
 Item_File
 Item_P rocess_Link
 Item_Transfer
 Job_Attr
 Job_Bom
 Job_Bom_Step
 Job_Rout e
 Job_Spec
 Labor_Usage
 Lot_Attr
 Oper
 Oper_Attr
 Oper_Ent _Link
 Oper_Ent _Route
 Oper_Ent _Spec
 Oper_Spec_Ver
Oper_Step
 Oper_Step_Ent_Exc
 Oper_Type
 Process
 Process_Attr
 Res
 Res_Exc
 Res_Job_Link
 Res_Oper_Link

32 Version 6.0
Preparing to Upgrade MES MES Installation Guide

 Shift_Exc
 Shipment
 Shipment_Lot
 SO
 SO_Line
 SO_WO_Link
 Temp_Shift_Exc
 User_Name
 WO
 WO_Attr
 WO_File

Reviewing the Mappings and Initiating the Migration


The Review Data Type Mapping page allows you to review the table and data mappings for errors.

1. Scroll through the entire Table list at the top of the page to see if there are any table errors.
o Green check mark icons indicat e no problems.
o Yellow icons indicate a problem that can be ignored. Nearly all of these are indicating truncation
conditions, which are actually not an issue during the migration.

Version 6.0 33
MES Installation Guide Preparing to Upgrade MES

o Red icons indicate an error that must be addressed.

These will us ually be because a table’s MOD_ID column has not been set to be ignored. Click
the Back button, fix the error, and then click Next to return to this page.
If that is not the problem, then you have a data mapping problem bet ween Oracle and SQL
Server that will need to be handled with a custom query. Click the Back button, clear the
selection of this table, and then click Next to return to this page. To migrate this table after the
standard MES table migration has finished, see Migrating Custom Tables on page 39.
2. When there are no errors indicated by red icons on the Review Data Type Mapping page, click
Next.

34 Version 6.0
Preparing to Upgrade MES MES Installation Guide

The Save and Run Package page appears.

3. Select the Run immediately check box and click Next.


The Complete the Wizard page appears. Summary information about the migration is listed.

4. Click Finish to begin the migration process.

Version 6.0 35
MES Installation Guide Preparing to Upgrade MES

While the migration process is running, the Performing Operation page appears, indicating that
status of the migration.

If an error occurs:
a. Use the commands on the Report button menu to view the log and determine which table has
the error.
b. Go back in the wizard and fix the table.
c. After you have fixed the error, go back to the Select Source Tables and Views page and clear
the selection of all tables prior to the table on which the error was reported (as these tables have
already been migrated).
d. Proceed forward through the wizard to the Complete the Wizard page and click Finish to
resume the migration.
5. When the migration has finished successfully, click Close to close the wizard.

Migrating the Labor_Usage Table


The Labor_Usage table requires special processing to migrate its data to a SQL Server dat abase.
If you do not have any data in your Labor_Usage table in Oracle, there is no need to migrate it to SQL.
To migrate the Labor_Usage table
1. Run the SQL Server Import and Export wizard and set up the data sources as described in Selecting
the Data Source and Destination on page 22.
2. On the Specify Table Copy or Query page, select the Write a query option.
The Provide a Source Query page appears.
3. Enter the following query as the SQL statement:

36 Version 6.0
Preparing to Upgrade MES MES Installation Guide

SELECT CAST(LABOR_START_UTC AS TIMESTAMP(3)) AS LABOR_START_UTC,


CAST(LABOR_START_LOCAL AS TIMESTAMP(3)) AS LABOR_START_LOCAL, USER_ID,
ENT_ID, WO_ID, OPER_ID, SEQ_NO, STEP_NO, ITEM_ID, LOT_NO, SUBLOT_NO, LAB_CD,
DEPT_ID, SHIFT_ID, SHIFT_START_UTC, SHIFT_START_LOCAL, PCT_TO_APPLY,
ACTIVE, DURATION, COMMENTS, RAW_REAS_CD, LAST_EDIT_COMMENT, LAST_EDIT_BY,
LAST_EDIT_AT, LOG_ID FROM LABOR_USAGE

4. Click Next.
5. On the Select Source Tables and Views page, select the Labor_Usage table's check box to select
it for migration.

Version 6.0 37
MES Installation Guide Preparing to Upgrade MES

6. On the De stination column list, select the Labor_Us age table.

7. Make sure that the correct SQL schema is entered for the Labor_Us age table entry.
8. Click the Edit Mappings button.

38 Version 6.0
Preparing to Upgrade MES MES Installation Guide

The Column Mappings dialog box appears.

9. Select the Enable identity insert check box and click OK.
10. Proceed forward through the wizard to the Complete the Wizard page and click Finish to start the
migration.

Migrating Custom Tables


If you have any other tables that you had to skip during the standard MES table migration becaus e they
are custom tables and had data mapping problems, you will need to perform the procedure described in
Migrating the Labor_Usage Table on page 36 for each of thes e tables.
During the procedure:
 On the SQL Statement page, enter a custom SQL statement for each table that maps the Oracle
data to the SQL Server data.
 On the Select Source Tables and Views page, select the table that you are migrating.

Version 6.0 39
MES Installation Guide

C HAPTER 3
Installing MES
Note the following before starting the installation:
 To install MES, you must have administrat or 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 .NE T Framework release:
o Version 4.5. 1 if you are not installing MES Int elligence Reports
o Version 4.5. 2 if you are installing MES Intelligence Reports; this version is required by
Intelligence
 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 17.
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.
If a previous release of MES is already installed on the node, a message appears that identifies the
version and that the product will be updated.

3. Click OK.
If the required release of .NE T Framework is not installed, the following message appears.

Click Yes to install the required release of .NE T Framework. At the conclusion of the .NE T
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.

Version 6.0 41
MES Installation Guide Installing MES

5. Use the options to read the general E ULA 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 accept the License Agreement check box and click
Next.
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 wit h 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.

42 Version 6.0
Installing MES MES Installation Guide

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 us e 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 6.0 43
MES Installation Guide 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 Schneider Electric License Server and Manager components, the Intelligence
Server and Intelligence Data Adapters components, or t he Information Server components as part of
the MES installation, you have to choose the Customize Installation option and then manually
select these components.
Note: Int elligence and t he MES Intelligence Reports component must be installed on the same node
as SQL Server Reporting Services (SSRS ). Otherwise, the Quality Characteristic Detail report SPC
Chart will not work.

9. To change the install destination folder, click the Brow se button and then navigate to and select the
desired folder.
10. To change t he 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: If any prerequisite soft ware cannot be installed by the MES installation, it will be identified in a
message. Install this software before proc eeding.

44 Version 6.0
Installing MES MES Installation Guide

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 Prerequisite s:.

11. Click Install.

Version 6.0 45
MES Installation Guide Installing MES

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.

46 Version 6.0
Installing MES MES Installation Guide

Once the installation begins, the progress status appears.

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-installation Configurator application opens. However, the MES product licenses must be
installed before running the post-install Configurator application so that the MES servic es can be
started.
13. Close the Configurator.

Version 6.0 47
MES Installation Guide Installing MES

14. Install the MES product licenses. See Activating the MES Product Licenses on page 49.
If the MES Service or MES Middleware component was installed on the node, the MES Service Monitor
is installed. For more information, see MES Service Monitor on page 127.
MES Shortcuts in the Startup Menu
In the Start menu, MES application shortcuts will appear in the Manufacturing Execution System group.
MES user documentation shortcuts will ap pear in the Wonderware Documentation group. If you do not
see these groups in the Start menu, they should appear after restarting the node.

48 Version 6.0
MES Installation Guide

C HAPTER 4
Activating the MES Product Licenses
In This Chapter
Introduction to MES Product Licens es ............................................................................................ 49
Configuring the License Server Component .................................................................................... 50
Activating the Product Licenses ..................................................................................................... 51
How MES Product Licenses Are Man aged ..................................................................................... 53
Viewing MES Product License Information ..................................................................................... 55
Reserving Licenses When Multiple MES Systems Are Deployed ..................................................... 57
Deactivating MES Product Licenses ............................................................................................... 58

Introduction to MES Product Licenses


The MES product licenses must be activat ed 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 -installation Configurator tool to
configure it. See Configuring the License Server Component on page 50.
2. Use the License Manager to activat e your MES product licenses. See Activating the Product
Licenses on page 51.
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.
Intelligence Product Licensing
The Intelligence product uses the Schneider Electric Licensing component and activation.
 If using Intelligence for the MES Reporting content and for additional functionality, follow the
licensing guidelines provided by the Int elligence document ation.
 If Intelligence is only being used as the reporting database for MES Intelligence Reports, then the
Intelligence S ervice does not require a license to be activated. The reporting solution only allows a
connection to the MES reporting source. In this scenario, Intelligence can work with one deployed
data source only (the MES reporting database).

Version 6.0 49
MES Installation Guide Acti vating the MES Product Licenses

Next Step: Configuring the MES Components


The next step after activating the MES product licenses is to use Configurator to configure the MES
components. See the topics in Configuring MES Components on page 59.

Configuring the License Server Component


1. On the Start menu of the node on which MES was installed, click the Configurator tile (shown
below).

2. In 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.

50 Version 6.0
Acti vating the MES Product Licenses MES Installation Guide

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

Activating the Product Licenses


1. Do one of the following:
 On the Start menu, click the License Manager tile (shown below).

 In a web browser, enter the URL localhost/S ELicenseManager.


License Manager opens and the License Server tile should be shown.

2. Click the License Server tile.

Version 6.0 51
MES Installation Guide Acti vating the MES Product Licenses

The server's license page appears with the License Summary tab selected.

3. Click Add License.


The License Activation dialog appears.

4. Click the Brow se license file browse button and then navigate to and select an MES product
license.
The license file would have been emailed once an order was placed for the MES product.
The license appears in the license grid.

52 Version 6.0
Acti vating the MES Product Licenses MES Installation Guide

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 licences are listed on the License Summary tab.

You can now continue configuring the MES components.

How MES Product Licenses Are Managed


During MES Middleware Startup
During startup, the MES middleware performs the following steps to acquire licens es:
1. When the middleware starts, it attempts to contact the License Server.

Version 6.0 53
MES Installation Guide Acti vating the MES Product Licenses

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, the middleware stops.
3. The middleware requests the License Server for an MES middleware cou nt by node name.
4. The middleware requests all entity counts by a name built from the MES database server name and
MES databas e name.
For example, it might request 20 Operations entities, 10 Performanc e 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 anot her MES middleware already has these licenses but by a different name, there will be an
error and the middleware will not start.
o If anot her 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 wit hin one day of ex piration 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 feat ure. 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, Performanc e, Quality, Production, and Inventory features. This
behavior is relevant only if the middleware is sharing licenses with other MES m iddlewares. Note that
sharing means that the various middleware instances are configured to use the same database
server node and database.

54 Version 6.0
Acti vating the MES Product Licenses MES Installation Guide

Viewing MES Product License Information


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

The Features Summary tab shows the combined count of a specific feature. In this example the license
server has a 5-equipment count license for Operations, Performance, and Quality. Each of thes e provide
6 middleware counts for a total of 18. Each of these provide a count of 5 production entities that can run
jobs for a total of 15. The Operations license provides for 500 inventory entities an d the Quality license
provides for 5 for a total of 505. In this example, there are no licenses reserved and no licenses currently
in use.
Detail Information on the License Details Panel
You can view details about a product license, such as the quantities available for each feat ure 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 6.0 55
MES Installation Guide Acti vating the MES Product Licenses

The License Details panel appears.

You can also view det ails about MES product license feature usage on the Licens e Manager Usage 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.

56 Version 6.0
Acti vating the MES Product Licenses MES Installation Guide

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 us e separate license servers for
each when possible.
For example, if you have separate Test and Production deployments, you can reserve licenses for the
Test server so that the Production server never acquires all of the available features. So, if you have a
Quality license with an entity count of 100, you can reserve a count of 5 entities for testing and reserve
the other 95 entities for production.
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 middlewares, 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 middlewares share licenses and only the last middleware to shut down will release
its feature counts, there will be feat ures 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 ac quires
its features counts. The License Manager shows the t wo different devices and the licenses acquired. The
middleware for MES DB 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 MES DB 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 middlewares 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.

Version 6.0 57
MES Installation Guide Acti vating the MES Product Licenses

To reserve MES features for a MES server:


1. On the Re servation tab, select the MES feature to be reserved.

2. In the Type column list, select Device.


3. In the Device/User column list, enter the devic e name as the MES server name and the MES
database name with no space between them.
4. Click Apply.

Deactivating MES Product Licenses


You can deactivate an MES product license for us e 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.

58 Version 6.0
MES Installation Guide

C HAPTER 5
Configuring MES Components

In This Chapter
Introduction .................................................................................................................................. 59
About Configurat or........................................................................................................................ 59
Specifying SQL Server User Authentication .................................................................................... 63
Closing Configurator ..................................................................................................................... 63
Post-Configuration Tasks .............................................................................................................. 64

Introduction
MES configuration is performed by configuring the MES components in the post -install Configurator
application.
The topics in this section:
 Describe the Configurat or
 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.
 Creating or Migrating MES Databases on page 65
 Configuring MES Middleware Communication wit h MES Databases on page 75
 Configuring the MES Middleware Proxy on page 95
 Configuring MES Web Portal on page 97
 Configuring and Deploying MES Intelligence Reports on page 109

About Configurator
MES configuration is performed using the same Configurator application that is used by other AVEVA
software components that are installed with the common installation mechanism.
The post-install Configurator application should not be confused with the MES Configurator application.
The MES Configurator application allows you to define certain aspects of the MES solution such as
labor, documentation types, and certific ations. For more information, see the MES Configurator User
Guide or the MES Help online help.
To run the Configurator, you must have Windows administrator privileges on the node.

Version 6.0 59
MES Installation Guide Configuring MES Components

To start the Configurator


 Do one of the following:
 On the last screen of the MES Setup tool, click the Configure button.
 On the Start menu, click the Configurator tile (shown below).

 Launch the Configurator application file from Windows Explorer. The default path is:
C:\Program Files (x86)\Common Files\ Arche strA\ Configurator.exe
Product Tree
The 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, W eb Portal, and
Intelligence 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.

The component is not installed.

60 Version 6.0
Configuring MES Components MES Installation Guide

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 Me ssage s box. Messages
indicating errors are highlighted in red.

To view additional information about a message


 Double-click the message.

Version 6.0 61
MES Installation Guide 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.

62 Version 6.0
Configuring MES Components MES Installation Guide

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

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 ent ry 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 databas e, make sure that it is assigned the
appropriate database roles. See Assigning SQL Server Database Roles to the MES Middleware
Service User Account on page 84.

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 prompt ed to restart the computer.

2. Click one of the buttons to restart the node now or later.

Version 6.0 63
MES Installation Guide Configuring MES Components

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:
 If the Application Objects component was installed, you will have to import the updated objects into
the ArchestrA IDE. For more information, refer to the object guides.
 If the Development Library was installed and a previous version of the MES Client AP I script libraries
was on the Application S erver, you will have to upgrade them. See Upgrading the MES Client API
Script Libraries on page 157.
 If t he MES .NE T Controls component was installed and a previous version of them was being used in
the ArchestrA IDE, you will have to upgrade them in the ArchestrA IDE. See Upgrading MES .NET
Cont rols in ArchestrA on page 158.
 If MES Intelligence Reports were installed, they must be deployed. See Configuring and Deploying
MES Intelligence Reports on page 109.
 If MES reports for Information Server were installed, they must be deployed. See Deploying MES
Reports in Information Server on page 121.

64 Version 6.0
MES Installation Guide

C HAPTER 6
Creating or Migrating MES Databases
In This Chapter
Introduction .................................................................................................................................. 65
Fixing Database Table Fragmentation ............................................................................................ 65
Creating an MES Database ........................................................................................................... 65
Migrating or Overwriting an Existing MES Database ........................................................................ 68
Creating a Customized MES Database Using Modified Database Scripts ......................................... 71
Importing Windows Active Directory Group S IDs into the MES Database ......................................... 72
Recommendations for Optimizing the MES Database ..................................................................... 73

Introduction
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 Set up component settings in the Configurator allow you to:
 Create the MES production dat abas e, 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 databas e

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 fragment ation is greater than 5% but less than or equal to 30%, the index will be
reorganized.
 If an index's fragment ation 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 6.0 65
MES Installation Guide Creating or Migrating MES Databases

The initial MES Dat abas e 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. Support ed server names include IP names (IP v4 and IP v6), SQL server named instance
conventions, cluster names, and SQL Server A vailability Groups.
When using a Failover or A vailability 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 63.
3. To access SQL Server and check for the existence of the specified database, click Validate.

66 Version 6.0
Creating or Migrating MES Databases MES Installation Guide

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 percent age 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 complet ed validating the SQL Server connection and optionally ent ering any
advanced dat abase settings, you are ready to create the MES database.
5. Click Configure.

Version 6.0 67
MES Installation Guide Creating or Migrating MES Databases

The SQL scripts that creat e 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 Message s box.
If the database creation completes successfully, a success message appears in the Configuration
Message s box. Also, the MES Database Setup status indicator changes to a green check mark.
If errors are enc ount ered, check the ArchestrA 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 Set up configuration. Not e 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 (IP v4 and IP v6), SQL server named
instance conventions, cluster names, and SQL Server A vailability Groups.
When using a Failover or A vailability 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 63.
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.

68 Version 6.0
Creating or Migrating MES Databases MES Installation Guide

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 t he Validate button again.
4. Do one of the following:
 To migrate the existing dat abas e to the new release, select the Overwrite and Migrate data
options. Then go to step 6.
 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.

Version 6.0 69
MES Installation Guide Creating or Migrating MES Databases

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 Data base Setup configuration, select the Keep
option.

Note: If you choose to overwrite or migrat e 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 dat abas e'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 rec ords for other reasons,
in which case do not select this option.
7. To migrate or overwrite the existing MES databas e, 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.

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

70 Version 6.0
Creating or Migrating MES Databases MES Installation Guide

Progress information and any error messages appear in the Configuration Me ssage s box.
If the database migration or creation completes successfully, a success message appears in the
Configuration Message s box. Also, the MES Database Setup status indicator changes to a green
check mark.
During migration, if the database is configured to use OS Gr oup security and does not already have the
OS Group S IDs 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 S IDs 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 origi nal 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 aft er
migration.

Creating a Customized MES Database Using Modified


Database Scripts
You can dump all of the embedded res ourc es in the database configuration, including the database
scripts, to the FactDbRe sources 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
FactDbRe sources folder by default.

To dump the database scripts


 In the MES Database Setup configuration settings, click the Dump Scripts to Di sk button.

The databas e scripts are dumped to the folder FactDBRe source s\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 Di sk. Clicking this button causes the scripts
in the FactDbRe source s 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.

Version 6.0 71
MES Installation Guide Creating or Migrating MES Databases

3. If the validation is successful, complete the necessary database settings.


For details, see either Creating an MES Database on page 65 or Migrating or Overwriting an Existing
MES Database on page 68.
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 FactDBResource s\v.v. v folder to create the database. If
needed, you can overwrite the modified scripts with the de fault unmodified scripts to create a standard
MES database. Or you can delet e the FactDBRe source s\v.v.v folder and configure the Database Setup
component to creat e or migrate the database.
To restore the default unmodified database scripts
 In the MES Database Setup configuration settings, click the Overwrite Scripts on Di sk button.

Importing Windows Active Directory Group SIDs into the MES


Database
If an existing MES database has the MES Sec urity Mode system parameter set to OS Group and there is
connectivity to the Windows Active Directory (AD) domain cont roller, then the group S IDs are updated
automatically during the dat abase 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 cont acted at the time of the upgrade,
a message indicating that the server could not be contacted will appear in the Configur ator
Configuration Message s box. This is because the A D domain cont roller from which to retrieve the SIDs
could not be found. When contact with the A D domain controller is restored, the group S IDs 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. On the Start menu, click either the OS Group SID Importer tile (shown below).

The OS Group SID Import Utility window appears.

2. Click Start.

72 Version 6.0
Creating or Migrating MES Databases MES Installation Guide

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.
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 approac h 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 databas e 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 us age of the system; that is, h ow
frequently data is:
 Added

Version 6.0 73
MES Installation Guide Creating or Migrating MES Databases

 Changed
 Read
 Delet ed 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 dat abas e should drive the choice of index es.
Be careful to collect statistics during a wide enough period of time so that the results are represent ative of
the way the system operates as a whole. Traffic at a shift change, for ex ample, 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 thes e 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 SELE CT statements, indexes have to match at least the beginning of the WHE RE clause. A
simple index on column A would not be us able for the SELECT stat ement "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 aft er those.

Additional Assistance
There are automated tools available to help you find missing indexes that ought to be added, as well as
identifying unused index es 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 maint enance for specific information
about those databases. For more information, see the Microsoft SQL Server web site.

74 Version 6.0
MES Installation Guide

C HAPTER 7
Configuring MES Middleware
Communication with MES Databases
In This Chapter
Introduction .................................................................................................................................. 75
Specifying the MES Production Database Connection String ........................................................... 77
Specifying the MES Restore Database Connection String ............................................................... 78
Configuring the MES Middleware's User Account Access to MES Databases ................................... 80
Testing and Saving the Database Connection Settings .................................................................... 83
Responding to MES Middleware Configuration Issues ..................................................................... 84
Assigning SQL Server Database Roles to the MES Middleware Service User Account ...................... 84
Adding MSDTC Firewall Exception for Remote MES Middleware to Dat abase Communication .......... 89
Configuring the MS DTC Component Services ................................................................................ 92

Introduction
The DB/MW Communication component is used to create the database connection strings that the MES
middleware service uses to access MES databases. 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, t he Microsoft Distributed
Trans action Coordinator service (MS DTC) must be added to the Windows Firewall exception list on both
nodes to allow them to communicat e.

Version 6.0 75
MES Installation Guide Configuring MES Middleware Communication with MES Databases

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

The Security and Production tab, and optionally the Re store 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 Re store tabs first, and then the Security tab.
 Database connection string information is entered on the Production and Re store tabs.
 The options to set the SQL database permissions for the MES middleware service's Windows user
account are on the Security tab.
The following topics describe the DB/MW Communication component configuration, the manual
configuration of SQL Server roles/permissions, and the manual configuration of MS DTC.

76 Version 6.0
Configuring MES Middleware Communication with MES Databases MES Installation Guide

Specifying the MES Production Database Connection String


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

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


Server Name
The name of the server that is hosting the MES production database. 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. Supported server names include IP names (IP v4 and IP v6), SQL
server named instance conventions, cluster names, and SQL Server A vailability Groups.
When using a Failover or A vailability Group naming convention, the configuration must be performed
when the primary node is active.
Database Name
The name of the MES production database.
If this is a new installation and the conn ection string has not been created yet, the name defaults to
MES DB. 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.

Version 6.0 77
MES Installation Guide Configuring MES Middleware Communication with MES Databases

If the Use Windows integrated security option is selected, then the MES middleware will us e the
MES Middleware Host user account that appears on the Security tab. Otherwise, the MES
middleware will use the SQL Authentication user account entered here.
When using SQL Server credentials, the user specified must have appropriate rights and access to
the MES database. This configuration component will not grant pri vileges to a SQL Server account.
See Assigning SQL Server Dat abase Roles to the MES Middleware Service Us er Account on page
84.
For more information about entering a user account, see Specifying S QL Server User Authentication
on page 63.
3. Optionally, 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 Microsoft MS DN
SqlConnectionStringBuilder Class
https://msdn.microsoft.com/en-us/library/s ystem.data.sqlclient.sqlconnectionstringbuilder(v= vs.110
).aspx topic.
Any advanced settings will be appended to the database connection string.
Next:
 If using an MES restore database, you are ready to specify the MES rest ore database connection
string. See Specifying the MES Restore Database Connection String on page 78.
 If not using an MES restore database, you are ready to configure the MES middleware user
account's access to the database. See Configuring the MES Middleware's User Account Access to
MES Databases on page 80.

Specifying the MES Restore Database Connection String


The restore database connection string information is entered on the Re store tab. The connection string
specifies which MES database to use as the restore dat abas e, the us er account for accessing it, and any
additional advanced connection settings.
The restore database must be a different database than the production database.
1. If MES is going to support a restore dat abase, make sure that the restore database has already been
created. If it has, select the Enable Restore Database option.

78 Version 6.0
Configuring MES Middleware Communication with MES Databases MES Installation Guide

The Re store 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 name of the server that is hosting the MES restore database. 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. Supported server names include IP names (IP v4 and IP v6), SQL
server named instance conventions, cluster names, and SQL Server A vailability Groups.
When using a Failover or A vailability Group naming convention, the configuration must be performed
when the primary node is active.
Database Name
The name of the MES restore databas e.
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 us e the
MES Middleware Host user account that appears on the Security tab. Otherwise, the MES
middleware will use the SQL Server Authentication user account entered here.

Version 6.0 79
MES Installation Guide Configuring MES Middleware Communication with MES Databases

When using SQL Server credentials, the user specified must have appropriate rights and access to
the MES database. This configuration component will not grant privileges to a SQL Server account.
See Assigning SQL Server Dat abase Roles to the MES Middleware Service Us er Account on page
84.
For more information about entering a user account, see Specifying S QL Server User Authentication
on page 63.
4. Optionally, 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 Microsoft MS DN
SqlConnectionStringBuilder Class
https://msdn.microsoft.com/en-us/library/s ystem.data.sqlclient.sqlconnectionstringbuilder(v= vs.110
).aspx topic.
Any advanced settings will be appended to the database connection string.
Next, you are ready to configure the MES middleware user account's access to the database. See
Configuring the MES Middleware's User Account Access to MES Databases on page 80.

Configuring the MES Middleware's User Account Access to


MES Databases
In the production and restore database connection strings, either the MES middleware service's
assigned Windows user account or a SQL Aut henticatio n user account can be used to access an MES
database. Either way, the user account must have the appropriate SQL permissions to connect to and
perform operations on the MES database.
By default, the MES Middleware component installation creates and assigns the Windows user account
NT Service\WCFHostService to the MES middleware service (also called the MES Middleware Host
service). If you want the middleware service to use a different Windows user account to access MES
databases, you can change the user account on the service's Properties dialog box in the Services
control panel applet.
The MES middleware service's Windows user account can be automatically assigned the required SQL
permissions by selecting the Set the minimal SQL permissions on the database for the service
account option on the Security tab (see the following procedure). If this option is not chosen, or if the
middleware service is using a SQL Authentication user account, the permissions must be assigned
manually to the user account in SQL Server Management Studio. For more information about manual
assignment, see Assigning SQL Server Database Roles to the MES Middleware Servic e User Account
on page 84.

80 Version 6.0
Configuring MES Middleware Communication with MES Databases MES Installation Guide

The Security tab's initial settings and controls are shown in the following figure, with the Enable Restore
Database option selected.

To have the MES middleware's Windows user account SQL database permissions set
automatically
 Configure the settings as described below.
Account Name
A read-only box in which the Windows user account assigned to the MES middleware service
appears. The default is NT Service\WCFHostService, which is created during the MES Middleware
component installation.
If you want to change the service's Windows user account, the change should be performed prior to
the MES DB/MW Communication component configurati on. (Modific ations to services, such as
changing their user account, can be performed using the Services control panel applet.) If you
change the Windows user account for the MES middleware service 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 MES Service Windows User Accounts on
page 82.
Set the minimal SQL permissions on the database for the service account
Select this option to have the configure operation set the minimal SQL permissions for the MES
middleware service Windows user account. Thes e permissions will allow the MES middleware
service to connect to and perform operations on the MES database.

Version 6.0 81
MES Installation Guide Configuring MES Middleware Communication with MES Databases

If this option is not selected, then you will have to manually set up the SQL permissions for the user
accounts specified in the MES production and restore dat abase connection strings using the SQL
Server Management Studio. Also, if the configuration is run without a domain account and the
production or restore database is on a different node, you will have to manually set up the SQL
permissions. This is because the SQL permissions cannot be set on remote databases. See
Assigning SQL Server Database Roles to the MES Middleware Service User Account on page 84.
Production Database Admin Credentials for setting permissi ons
Appears only if the Set the minimal SQL permissions option is selected.
To use the currently logged-in Windows user account to set the SQL permissions, select this option.
To use a specific SQL S erver A uthentication user account to set the SQL permissions, clear this
option.
For more information about specifying the user account to access SQL Server, see Specifying SQL
Server User Authentication on page 63.
Note that the user account specified here must have the administrator privileges that are needed to
set SQL permissions for a database. If a SQL Server user account is provided for this option, the
account information is not persisted by the Configurat or.
Use Production Database Credentials for Re store Database
Appears only if the Enable Restore Database option is selected.
Select this option to use the same user account to set the MES middleware service us er account
SQL permissions for the MES restore dat abas e as the one being used for the production database.
If not selected, the Re store Database Admin Credentials for setting permissi ons option
appears.
Restore Database Admin Credentials for setting permi ssions
Appears only if the Set the minimal SQL permissions option is selected and the Use Production
Database Credentials for Restore Database option is not selected.
To use the currently logged-in Windows user account to set the SQL permissions, select this option.
To use a specific SQL S erver A uthentication user account to set the SQL permissions, clear this
option.
For more information about specifying the user account to access SQL Server, see Specifying SQL
Server User Authentication on page 63.
Note that the user account specified here must have the administrator privileges that are needed to
set SQL permissions for a database.
You are ready to test the database connection settings and save them. See Testing and Saving the
Database Connection Settings on page 83.

Guidelines for MES Service Windows User Accounts


If the MES middleware and database are on the same server nodes and you want to change the
Middleware service's Windows user account from the default account, follow the instructions in
Configuring the MES Middleware's User Account Access to MES Databases on page 80.
However, if the MES middleware and database are on different server nodes, use the following
guidelines to change the Middleware service's Windows user account from the default account. This will
ensure that the MES middleware user account has proper SQL permis sions 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.

82 Version 6.0
Configuring MES Middleware Communication with MES Databases MES Installation Guide

Using a Domain User Account


If the account used by the MES middleware service is a valid do main 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$).
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.

Testing and Saving the Database Connection Settings


When you have finis hed specifying the MES middleware and database connection settings on the
Security, Production, and optionally the Re store 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 servic e Windows user account are granted.
This is performed regardless of whether the connection string tests are successful.
 The databas e connection strings are tested and saved.
 MES middleware custom performance monitor counters are installed. For more information about
these counters, see MES Middleware Perf ormance Counters on page 154.
 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\Archive s.
 The MES Async Private Message Queue —mesa syncqueue—is created, with the following
permission settings:
o E very one: 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 is started.

Version 6.0 83
MES Installation Guide Configuring MES Middleware Communication with MES Databases

Responding to 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
Message s 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 me sadmin.

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 Me ssage s box, the middleware failed to restart. You will have to start the
middleware manually for the database connection setting changes to t ake effect. See Starting, Stopping,
and Restarting the MES Middleware Host and MES Service on page 127.
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 middlewa re service.

Assigning SQL Server Database Roles to the MES Middleware


Service User Account
To access SQL Server and perform operations on an MES database, the MES middleware service uses
a Windows Active Directory (AD) user account or a SQL Server user account that has the proper
permissions. This user account is specified when configuring the DB/MW Communication component
using the post-install Configurator.

84 Version 6.0
Configuring MES Middleware Communication with MES Databases MES Installation Guide

If access to the production and restore dat abas es is configured for Windows integrated security, then the
Windows user account assigned to the MES middleware service is used. Otherwise, a SQ L Server user
account will be used.
On the DB/MW Communication component's Security tab, if the logged-in user does not have rights to
add users and permissions to the SQL Server database and does not know a SQL S erver user credential
with administrator rights, then a database administrator will need to grant the roles and minimal
permissions described in this topic to the appropriate user account. Otherwise, the DB/MW
Communication component will grant these roles and minimal permissions when the Set the minimal
SQL permissions option on the Security tab is selected.

Note: The user account that the MES middleware servic e uses to access the MES database does not
have to have administrator-level privileges for the MES system to work.

Proper permissions are granted by assigning the following SQL Server databas e roles to the user
account.
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 dat abase.
Select
Required to be able to do selections on the MES database.
Update
Required to be able to update records in the MES dat abas e.
It is important that you do not grant these database roles to the SQL Public server role. Instead, they
should be granted to the user account that will be used by the MES middleware service to access the
MES databas e. This user account should be assigned the Public server role, as described in the
following procedure.
The screen shots in this procedure are based on SQL Server 2012 Management Studio. Depending on
what version you are using, the steps and screens might be different.
To assign the required database roles to the user account being used by the MES
middleware
1. If the MES database has not been creat ed yet, run the MES installation and configure the MES
Database Setup component in the Configurator to create it.

Version 6.0 85
MES Installation Guide Configuring MES Middleware Communication with MES Databases

2. In SQL Server Management Studio, create a SQL Server login for the MES middleware service user
account using the Security Logins function.

If you created a Windows AD user account for the MES middleware service, in the General settings
on the Login Propertie s window you can select the Windows authentication option and then select
the Windows middleware user account. The MES middleware service Windows user ID and
password will be used to access the MES database.
If you are using SQL Server authentication, then you can enter the SQL server username and
password that the MES middleware service will use to access the MES database.

86 Version 6.0
Configuring MES Middleware Communication with MES Databases MES Installation Guide

3. In the Server Roles settings on the Login Propertie s window, assign the MES middleware service
user account only the Public server role, as shown below.

Version 6.0 87
MES Installation Guide Configuring MES Middleware Communication with MES Databases

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

5. Click OK to save the SQL login for the MES middleware service.
6. In the Database s list on the main navigation pane, right-click the MES database and click
Properties.
The Databa se Properties window displays.
7. In the Permi ssions settings, select the MES middleware service user account in the User or role s
list.

88 Version 6.0
Configuring MES Middleware Communication with MES Databases MES Installation Guide

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

9. Click OK to save the assignments.

Adding MSDTC Firewall Exception for Remote MES


Middleware to Database Communication
If the MES middleware service and the MES databas e are on separate nodes, the Microsoft Distribut ed
Trans action Coordinator service (MS DTC) must be included in the Windows Firewall exception list on
both nodes to allow them to communicate.
This procedure is based on Windows Server 2012; depending on what Windows version you are using,
the steps and screens might be different.
1. On the node, open the Windows Firewall settings in the Control Panel.

Version 6.0 89
MES Installation Guide Configuring MES Middleware Communication with MES Databases

2. Click the Allow an app through Windows Firewall link.

The Allow Apps settings and controls appear.

3. Click the Change settings button.


The Allow another app button becomes available.
4. Click the Allow another app button.

90 Version 6.0
Configuring MES Middleware Communication with MES Databases MES Installation Guide

The Add an app dialog box appears.

5. Click the Brow se button, select the msdtc.exe file in the folder C:\WINDOWS\ system32, and click
Open.
The MSDTC service is added to the apps list.
6. Select the MSDTC service and click Add.

Version 6.0 91
MES Installation Guide Configuring MES Middleware Communication with MES Databases

The MSDTC service is added to the apps list.

7. Click OK to close the Allow Apps settings and controls and save the addition of the MS DTC service
to the exceptions list.

Configuring the MSDTC Component Services


If the MES middleware service and the MES databas e are on separate nodes, you must configure the
MSDTC component services on both nodes to allow them to communicate.
The following procedure is based on Windows Server 2012; 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.

92 Version 6.0
Configuring MES Middleware Communication with MES Databases MES Installation Guide

2. In the left pane, expand Component Service s, Computers, My Computer, and Di stributed
Transaction Coordinator.

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


The Local DTC Properties dialog box appears.
4. Click the Security tab.
5. Select the following options:
o Network DTC Acce ss
o In the Client and Administration section, Allow Remote Clients and Allow Remote
Admini stration.
o In the Transaction Manager Communication section, Allow Inbound and Allow Outbound.
o No Authentication Required.
o Enable XA Transactions

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

Version 6.0 93
MES Installation Guide

C HAPTER 8
Configuring the MES Middleware Proxy
You can access the 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 ArchestrA Object Editor or through GR -Access) or deployed to run. For
active 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.
The MES Middleware Proxy component is shown in the following figure.

To configure the MES middleware proxy


1. Enter the proxy settings:

Version 6.0 95
MES Installation Guide Configuring the MES Middleware Proxy

Middleware Host
The host name or IP address of the node on which the middleware service is running. IP v4 and IP v6
addressing are supported.
Http Port
The HTTP port number to reach the configuration endpoint.
The default value is 80. The HTTP port is always used to retrieve the configuration settings
regardless of the Protocol setting. You must change this value only when you cannot access port 80
through the firewall.
Protocol
The communication prot ocol, TCP or HTTP, to use for communications with the MES middleware
service. The default is Tcp.
The default proxy connection information is used by all client applications running on the computer.
An individual application can override the information with its own connection information.
2. Click Configure.
If the middleware proxy can communicate with the remote middleware service successfully using the
entered settings, a success message appears in the Configuration Me ssages box. Also, the MES
Middleware Proxy status indicator changes to a green check mark.
Client applications on the node can now communicate with the middleware service.

96 Version 6.0
MES Installation Guide

C HAPTER 9
Configuring MES Web Portal
In This Chapter
Introduction .................................................................................................................................. 97
Configuring the MES Web Portal Component ................................................................................. 98
Setting the Web Port al User Session Cache Refresh Rate ............................................................ 101
Implementing SSL for MES Web Port al ........................................................................................ 101
Disabling HTTPS on the MES Web Portal Web Site ...................................................................... 106
What Happens to MES Web Portal Customization Files During an Uninstall ................................... 107

Introduction
MES Web Portal configuration includes the following:
 To set up MES Web Portal, you must configure t he MES Web Port al component in Configurator. The
configuration process installs the MES Web Portal web site in Internet Information S ervices (IIS) and
creates the required directories and files on the server no de. See Configuring the MES Web Portal
Component on page 98.
 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 Rat e on page 101.
 By default HTTPS is enabled for MES Web Portal. This prot ocol supports secure transactions
between MES Web Portal and browser clients. To complete the HTTPS configuration, you have to:
o Install an SSL (S ecure Sockets Layer) certificate
o Enable HTTPS binding on the MES Web Portal web site
See Implementing SSL for MES Web Portal on page 101.
 If your organization chooses not to use HTTPS, you have to disable it. See Disabling HTTPS on the
MES Web Portal Web Site on page 106.

Version 6.0 97
MES Installation Guide Configuring MES Web Portal

Configuring the MES Web Portal Component


The MES Web Portal component, shown in the following figure, has no specific settings or controls.

To configure the MES Web Portal


 Click Configure.
The Configurator checks for IIS feature delegation conflicts. If any conflicts are found, you are
prompted to choose whether to update the IIS applicationHost. config file aut omatically now or
manually later. For more information, refer to Responding to IIS Feature Delegation Conflicts on
page 98.
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.

Responding to 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.

98 Version 6.0
Configuring MES Web Portal MES Installation Guide

If some of the web feature delegation settings are locked in IIS (that is, their delegation is set to Read
Only), then MES Web Port al cannot automatically include those configuration settings in the MES Web
Portal web.config file. Instead, an Update option appears on the MES Web Portal Configurator and a
message is logged indicating that fe ature delegations must be added to the IIS configuration to support
MES Web Portal.

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 thes e files, but not both. Otherwise, the MES Web Port al web site will not run.)
 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. The
configuration finishes but, to allow the MES Web Portal web site to run, a web administrat or 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 feat ure settings to the appropriate
MES Web Portal values and remove those settings from the MES W eb 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 Mic rosoft TechNet web
site.

Version 6.0 99
MES Installation Guide Configuring MES Web Portal

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 Port al 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:
<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:

100 Version 6.0


Configuring MES Web Portal MES Installation Guide

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

Setting the Web Portal User Session Cache Refresh Rate


There are t wo configuration settings in the <appSettings> section of the MES Web Port al web.config file
for setting the cache reset rate for an MES Web Portal us er session:
 LongLivedCacheE xpirationMinutes. This setting is used for the licens e setting and for the security
mode. The default is 60 minutes.
 ShortLivedCacheE xpirationSeconds. 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 y ou change a cache refresh setting, you must restart the MES Web Port al web site in IIS for the change
to take effect.

Implementing SSL for MES Web Portal


Your organization’s compliance standards might require that sensitive data not be transmitted as clear
text. To satisfy this requirement, the MES Web Portal web site supports using HTTPS as its default SSL
protocol for communicating wit h MES Web Portal browser clients.
To implement HTTPS communication on the MES Web Portal web site and browser clients, prior to using
MES Web Portal you have to:
 Install an SSL (S ecure Sockets Layer) certificate; see Configuring a Public SSL Certificate for the
MES Web Portal Web Site on page 102
 Enable HTTPS binding on the MES Web Port al web site; see Enabling HTTPS Binding on the MES
Web Portal Web Site on page 105

SSL Overview
SSL protocol uses a key that is passed between the web server and browser client to allow encrypted
data trans fers between the two parties. A browser client requires that the web server present a valid SSL
certificate before beginning an HTTPS session.
When the browser is able to successfully begin an HTTPS session, a padlock icon is typically displayed
in the browser’s address bar. The location of the padlock icon is specific to the browser type.

Version 6.0 101


MES Installation Guide Configuring MES Web Portal

Public HTTPS SSL Certificates


HTTPS requires that an SSL certificate be used by a web server to implement HTTPS -based
communication with brows er clients. Public X.509 SSL certificates can be obtained from public certificate
authorities (CAs), which can be readily identified by performing an Internet search.

Self-Signed HTTPS SSL Certificates


Rather than using a public certificate approved by a CA, HTTPS can be implemented using a private
self-signed certificate. A self-signed certificat e is signed by the person who creates the certificate.
Just as with public certificates, HTTPS communications that use self-signed certificates encry pt the data
being sent over the HTTPS connection to prevent third-parties from reading it. The difference is that, with
a self-signed certificate, client users have to trust that the site is who it says it is. With public certificates,
the site’s identity is certified by the CA.
If you do configure MES Web Portal to use a self-signed certificate, when your users attempt to access
the MES Web Portal web site, they will be prompted with a warning that the SSL certificate is not trusted.
Users will have the option to dismiss this warning and accept the connection. Web browsers do allow
users to suppress these warnings to avoid being prompted every time they attempt to access a
self-signed certificate site that they trust. For instructions on how to suppress the certificate warnings
from your trusted MES Web Portal web site, refer to the web brows er's documentation.
Be aware that the use of a self-signed certificate assumes that access to the MES Web Portal web site
and the self-signed certificat e are properly secured.

Configuring a Public SSL Certificate for the MES Web Portal Web Site
1. Start the IIS Manager tool.
2. Select the MES Web Portal web site in the navigation pane.

102 Version 6.0


Configuring MES Web Portal MES Installation Guide

3. Double-click the Server Certificates icon. The available certificate functions appear in the Actions
pane.

4. Refer to the Microsoft technical information regarding how to request and install an Internet server
certificate in IIS.
For example, instructions for requesting and installing an Int ernet server certificat e using IIS 7 can be
found at Configuring Internet Server Certificates (IIS 7)
https://technet.microsoft.com/en-us/library/cc731977.aspx on the Microsoft TechNet web site.
Once you have configured the SSL certificate for the MES Web Port al web site, you have to enable the
HTTPS binding on the web site.

Note: If HTTPS binding is not enabled on the MES Web Portal web site, unless you disable HTTPS, the
web site will not function properly and web pages for the site will not load in client web browsers.

Configuring a Self-Signed SSL Certificate for the MES Web Portal Web
Site
1. Start the IIS Manager tool.
2. Select the MES Web Portal web site in the navigation pane.

Version 6.0 103


MES Installation Guide Configuring MES Web Portal

3. Double-click the Server Certificates icon. The available certificate functions appear in the Actions
pane.

4. Click Create Self-Signed Certificate.

104 Version 6.0


Configuring MES Web Portal MES Installation Guide

The Create Self-Signed Certificate dialog box appears.

5. Type a name for the certificate and click OK. IIS creates the self-signed certificate and registers it on
the server node.

Once you have configured the SSL certificate for the MES Web Port al web site, you have to enable the
HTTPS binding on the web site.

Note: If HTTPS binding is not enabled on the MES Web Portal web site, unless you disable HTTPS, the
web site will not function properly and web pages for the site will not load in client web browsers.

Enabling HTTPS Binding on the MES Web Portal Web Site


1. Start the IIS Manager tool.
2. Expand the MES Web Portal web site node in the navigation pane.

Version 6.0 105


MES Installation Guide Configuring MES Web Portal

3. In the navigation tree, select Sites > Default web site.

4. In the Actions pane, click Bindings. The Site Bindings dialog box appears. It includes a list of all
binding rules that direct traffic to the selected web site.

5. Click Add. The Add Site Binding dialog box appears.

6. In the Type list, select https.


7. In the SSL certificate list, select the certificate that you installed for the MES Web Portal web stie.
8. Click OK. HTTPS binding for the MES Web Portal web site is now enabled.
Users on remot e nodes that have access to the host on which the MES Web Portal web site is running
can now access the site from a web browser using the URL:
https://< serverhostname>/MES/

Disabling HTTPS on the MES Web Portal Web Site


1. Open the file web.config in a text editor. The default path for this file is:
<MES program files path>\Wonderware\MES\Web Portal\MES

106 Version 6.0


Configuring MES Web Portal MES Installation Guide

2. Go to the ent ry for the ForceHttps key.

3. Change the value of the ForceHttps k ey to false.


4. Save the change and close the web.config file.
Users on remot e nodes that have access to the host on which the MES Web Portal web site is running
can now access the site from a web browser using the URL:
http://<serverhostname>/MES/

What Happens to MES Web Portal Customization Files During


an Uninstall
If you uninstall MES on a node on which the MES Web Portal service 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 ret ained.
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 complet ed. Any custom web files are stored in this directory.

Version 6.0 107


MES Installation Guide

C HAPTER 10
Configuring and Deploying MES
Intelligence Reports
In This Chapter
Introduction to Configuring and Deploying MES Intelligence Reports .............................................. 109
Configuring Intelligence and MES Database Setup Components ................................................... 110
Applying Intelligence 2014 R3 Hot Fix L00148071 ........................................................................ 111
Updating the Int elligence Database with MES Tables .................................................................... 111
Deploying the SSRS MES Reports Against the Intelligence Database ............................................ 115
Configuring Security Policies for the Quality Characteristic Detail Report ........................................ 119

Introduction to Configuring and Deploying MES Intelligence


Reports
The MES reporting content defaults to using the Intelligence database as the source for the report data.
The Intelligence model includes content from Performance, Operations, and Quality data tables.
Optionally, there is content for Information Server reporting.
This section describes how to configure and deploy the MES Intelligence reports. There are multiple
steps involving software components other than MES [that is, Intelligence and SQL Server Reporting
Services (SS RS)].
The MES installation software includes a non-licensed limited version of Intelligenc e that can be used
solely with MES Intelligence reports. The MES Int elligence reports will also work with a full version of
Intelligence.

Note: Intelligence and the MES Intelligence Reports component mus t be installed on the same node as
SSRS. Otherwise, the Quality Characteristic Detail report SPC Chart will not work.

The configuration and deployment of the MES Intelligence reports includes the following procedures:
1. If not already performed, configuring the Int elligence components and MES Dat abas e Setup
component.
2. Applying Intelligence 2014 R3 Hot Fix L00148071 to properly support the MES Intelligence reports.
3. Updating the Int elligence dat abase with the required tables to extract the dat a from the MES
database by deploying the MES Intelligenc e model.
4. Deploying the SSRS MES reports against the Intelligence database.
The procedures in this section assume that SSRS is installed and available for deploying the MES
reports.

Version 6.0 109


MES Installation Guide Configuring and Deploying MES Intelligence Reports

Configuring Intelligence and MES Database Setup


Components
If not previously performed, the Intelligence and MES Dat abase Set up components must be configured
in the post-install Configurator.
If you are upgrading the MES reporting model from a previous version, all data in the Intelli gence
database might be lost. Consider creating a new Intelligence database to use with this release of the
MES reporting model if you need to retain data in the existing model.
1. On the node on which Intelligence is installed, open Configurator and configure the Intelligence
components.
The following screen shot is from the MES installation and shows only the options provided in the
limited version of Intelligence. Intelligence must be configured before configuring the MES
Intelligence Reports component. However, the MES database can be set up prior to or after
configuring the Intelligence components.

For more information about the Intelligence components, see the Intelligence Soft ware Installation
Guide.
2. On the node on which the MES Dat abase 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 65.

110 Version 6.0


Configuring and Deploying MES Intelligence Reports MES Installation Guide

Applying Intelligence 2014 R3 Hot Fix L00148071


To properly support MES Intelligenc e reports, Intelligence 2014 R3 Hot Fix L00148071 must be applied.
1. Install Intelligence 2014 R3 Hot Fix L00148071, which is stored in the Intelligence
Reports\ HFL00148071 folder in the MES application folder.
2. Stop the Intelligence service.
3. Make a backup copy of the existing Intelligence.Server.Runtime.dll file, which is stored in the bin
folder within the Intelligence application folder.
4. Copy the Intelligence.Server.Runtime.dll file that is stored in the hot fix folder to the Intelligence
application bin folder, overwriting the existing file.
5. Start the Intelligence servic e.

Updating the Intelligence Database with MES Tables


Note: For customers who have a full installation of Intelligence 2014 R3 and System Platform 2014 R2
SP1, the MES Intelligence Reports installation includes the ArchestrA IDE package file
MESIntelligenceObjects.aaPKG. That package file can be imported into the ArchestrA IDE and
deployed from the IDE instead of performing the following procedure.
1. In the Windows Services tool on the node on which Intelligence is installed and configured, make
sure the Intelligence service is running.
2. On the node on which Intelligenc e is installed and c onfigured, run the Int elligence Model Deployment
utility by clicking the Intelligence Model Deployment tile on the Start menu.
The utility's web page appears.

3. Click the Select Report Model button.


4. In the dialog box that appears, navigat e to and select the MESIntelligenceModel.xml file.
The default location for this file is the C:\Program Files (x86)\Wonderware\MES\Intelligence
Reports folder on the node on which the MES Intelligence Reports component was installed.

Version 6.0 111


MES Installation Guide Configuring and Deploying MES Intelligence Reports

5. On the General tab, specify on what date to start collecting MES data for the reports.

6. On the Data Adapter Service tab, you can use the default entries for MES reports.

7. On the Data Source tab, enter the following:


Microsoft SQL Server Name
The name of the SQL server on which the MES database is stored.
Microsoft SQL DB Name
The name of the MES database.
Authenti cation
The authentication method to use to access the MES databas e. If you select SQL Server
Authentication, enter the user name and password. The user account specified here requires read
access to the MES database.
Time Zone
The time zone must be set to (UTC) Coordinated Universal Time.
Setting the time zone to UTC is required as the dimensions and measures in the Intelligence model
are configured to use UTC date time fields to extract data from the MES database. Using a different
time zone would cause data sync issues and extraction would be delayed based on the time zone
configured.

112 Version 6.0


Configuring and Deploying MES Intelligence Reports MES Installation Guide

Automatically adjust time for Daylight Savings


Select this option to have the time automatically adjusted for daylight savings.

8. Click the Deploy icon on the toolbar.


A confirmation message to overwrite any existing deployed model appears.
If this is an upgrade from a previous version of the MES reporting model and you are using the
previous Intelligence database, the previous model will be overwritten. All data in the Intelligence
database will be lost and will be extracted again from the current MES database. If the original data is
no longer in the current MES database and you want to retain that data in the existing Intelligence
database, before proceeding with the d eployment create a new Intelligence database to use with this
release of the MES reporting model. You can create a new Intelligence database in the Configurator
by entering the new database's name in the Data Store Database Name of the Intelligence Server
component configuration settings. See Configuring Intelligence and MES Dat abase Setup
Components on page 110.
9. Click Overwrite.
The MES report tables are created in the Intelligence database based on the deployed model.
10. When the deployment successfully completes, do one of the following to verify that the MES tables
were added to the Intelligence databas e:

Version 6.0 113


MES Installation Guide Configuring and Deploying MES Intelligence Reports

 On the successful compl etion message, click the here link.

The list of MES tables that were added to the Intelligence database appears.

114 Version 6.0


Configuring and Deploying MES Intelligence Reports MES Installation Guide

 In SQL Server Management Studio, open the list of the Intelligence database tables, as shown
below.

11. Close the utility web page.

Note: During the deployment of the MES Intelligence Report model, there might be a warning in the SMC
Logger that states "Execution of link update failed for dimension ... ." This is a known issue and will be
corrected in the next version of Intelligence and MES Intelligence Reports. You do not need to take any
corrective action.

Deploying the SSRS MES Reports Against the Intelligence


Database
Note: Intelligence and the MES Intelligence Reports component must be installed on the same node as
SSRS. Otherwise, the Quality Characteristic Detail report SPC Chart will not work.

1. In the Windows Services tool on the node on which SS RS and Intelligence is installed, make sure the
SSRS service is running.

Version 6.0 115


MES Installation Guide Configuring and Deploying MES Intelligence Reports

2. Open Configurator and select the MES Intelligence Reports component.

3. Change the configuration settings from the default entries as needed.


Intelligence Database Node
o Server Name: The server name on which the Intelligence database is stored. This can be
localhost or the loc al node's host name.
o Database Name: The name of the Int elligence dat abase.
o User account information: The user account for accessing the Intelligenc e database. See
Specifying SQL Server User Authentication on page 63. The user account specified here
requires read access to the Intelligence 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 loc al 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 63.

116 Version 6.0


Configuring and Deploying MES Intelligence Reports MES Installation Guide

4. Click Configure.
The data source to connect to the Intelligence dat abas e, the MES reports folder, and the MES
Intelligence reports are created on the SSRS server.
5. 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.

Version 6.0 117


MES Installation Guide Configuring and Deploying MES Intelligence Reports

6. Verify that the following views, stored proc edures, and functions were created in the Intelligence
database:

118 Version 6.0


Configuring and Deploying MES Intelligence Reports MES Installation Guide

Loading of MES Data into the Intelligence Database


Once all the configuration steps have been completed, the Intelligence services extract data from the
MES databas e, transform it, and populate the newly created tables in the Intelligence database.
The initial loading of the Intelligence database might take some time, depending on the Backfill Start
Date entered in the Intelligence Model Deployment utility to start collecting MES data for the reports. Wait
at least an hour after deployment for the MES data to be loaded into the Intelligence database before
attempting to run any MES Intelligence reports.
Some of the reports will not show data until the second run of the Intelligenc e servic e 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 Intelligence database, then verify that the Intelligence services are
running. Also check the System Management Console error log of Intelligence.

Configuring Security Policies for the Quality Characteristic


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

Version 6.0 119


MES Installation Guide

C HAPTER 11
Deploying MES Reports in Information
Server
In This Chapter
Introduction to Deploying MES Reports in Information Server ........................................................ 121
Adding the MES Database as a Data Source for Information Server .............................................. 121
Deploying the MES Reports ........................................................................................................ 123
Configuring Security Policies for the Quality Characteristic Detail Report ........................................ 125

Introduction to Deploying MES Reports in Information Server


If the Information Server Reporting Services Reports or Table Weaver Reports components were
installed during the MES installation, the MES reports need to be deployed in Information Server.
Report deployment requires:
 Creating or upgrading the MES dat abase to the current version; this must be performed prior to the
following two tasks
 Adding the MES database as a dat a source for Information Server
 Deploying the MES reports

Adding the MES Database as a Data Source for Information


Server
1. Open Information Server by doing one of the following:
 In a web browser, enter the URL for WIS.
The default URL is http://<WebServerName>/Wonderware.
 If you are logged onto the node on which Information Server is installed, on the Start menu click
the Home Page tile.
The Information Server web application appears.
2. In the System access panel, expand Admini stration and then click Data Source Manager.

Version 6.0 121


MES Installation Guide Deploying MES Reports in Information Server

The Data Source Manager page appears.

3. Click New Data Source.


The Add New Shared Data Source page appears.
4. In the Data Source Type list, click Production.
The data source settings appear.
5. Complete the settings, described below.
Data Source Name
A unique name to identify the data source.
Description
A description of the data source.
Server
The name of the server on which the MES database is stored.
Database
The name of the MES database.
Integrated Security
Determines whet her to use Windows integrated security or SQL user authentication to access the
MES databas e. If not selected, enter the SQL authentication username and password.
Default for thi s Data Source Type
Select this option to make this data source the default for the Production data source type.
Connection Timeout(in Sec), Query Timeout(in Sec)
The values for the database connection and query timeouts.

122 Version 6.0


Deploying MES Reports in Information Server MES Installation Guide

Provider
The name of the provider, based on the SQL Server version. For example, for SQL Server version
2012 and 2014, the provider is SQLNCLI11.

6. After you configure the data source information, click Test Connection to test the connection to the
MES databas e using your setting entries.
The test results appear at the bottom of the web page.
7. Click Save to save the data source.

Deploying the MES Reports


1. Make sure that the SQL Server Reporting Service (SSRS ) is running.
2. On the node on which Information Server is installed, open the Information Server Deploy Reports
tool by clicking the Deploy Reports tile on the Start menu.
The Arche strA Reports Database Configuration window appears.
3. On the navigation pane, click Deploy Reports.
4. In the Exi sting SDS Type list, select Production.

Version 6.0 123


MES Installation Guide Deploying MES Reports in Information Server

The MES data source settings appear.

5. Click the Configuration File text box's Browse button, and then navigate to and open the
RptService sConfig.xml file.
This file is stored in the Reporting Service folder of the MES application folder.

124 Version 6.0


Deploying MES Reports in Information Server MES Installation Guide

6. When you have selected the MES dat a source and configuration file, click Deploy.
Status messages about the MES reports deployment appear. When all of the reports have been
deployed, a Success message appears.
7. Close the message.
8. On the Information S erver web application, refresh the web page.
9. In the System access panel, expand Reports and then expand MES.
The MES reports are listed in the panel.

For information about running MES reports, refer to the MES Reports in Information Server Guide or in
the MES Help.

Configuring Security Policies for the Quality Characteristic


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

Version 6.0 125


MES Installation Guide

C HAPTER 12
MES Service Monitor
In This Chapter
Starting and Exiting the Service Monitor ....................................................................................... 127
Starting, Stopping, and Restarting the MES Middleware Host and MES Service ............................. 127

Starting and Exiting the Service Monitor


If the MES Service or 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 and the MES
Service. See Starting, Stopping, and Restarting the MES Middleware Host and MES Service on page
127.
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 Monit or does not affect the state of the MES Service or the MES
middleware host.
To start the Service Monitor and add it to the system tray
 On the Start menu, click either the Service Monitor tile (shown below).

Starting, Stopping, and Restarting the MES Middleware Host


and MES Service
You can manually start, stop, and restart the MES middleware host or the MES Service.
Stopping the MES middleware host will also stop the MES Service as the MES Service is dependent on
the MES middleware host. However, starting the MES middleware host will not start the MES Service.
1. Right -click the System Monitor icon on the system tray.

Version 6.0 127


MES Installation Guide MES Service Monitor

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

128 Version 6.0


MES Installation Guide

C HAPTER 13
Running MES Install and Configurator from
a Command Line

In This Chapter
Introduction ................................................................................................................................ 129
Prerequisite Software.................................................................................................................. 129
Command List File ...................................................................................................................... 130
MES Install Command ................................................................................................................ 130
MES Uninstall Command ............................................................................................................ 132
Configurator Command ............................................................................................................... 133

Introduction
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 MES on page 41
and Configuring MES Components on page 59 to see how the MES installation and configuration is
performed from a us er interface.
Note the following about the MES install, Configurator, and uninstall commands:
 The commands must be run by a user with a Windows Administrator us er 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 Cont rol 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 19.
 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 soft ware, but some missing software might have to
be installed manually. Any issues with prereq uisite software will be entered in the ArchestrA Logger file
for the MES product. See Check ing Installation Results in the ArchestrA Logger File on page 132.
To avoid issues with missing prerequisite software during a command line installation, it is recommended
that you install all prerequisite soft ware before running the MES installation. For more information, see
MES Prerequisite Soft ware on page 17.

Version 6.0 129


MES Installation Guide Running MES Install and Configurator from a Command Line

Command List File


The MES install folder \InstallFiles\Re sponseFile s 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.

MES Install Command


The MES install command syntax is:
Setup.exe /silent /mingui install_res ponse_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 Windo ws Administrator user account.

Install Response File XML Syntax


The install response file includes the following XML tags.
<response file> </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 li st: A list of the components to install, separated by commas. See Install
Response File Component Entries on page 131.

130 Version 6.0


Running MES Install and Configurator from a Command Line MES Installation Guide

Install Response File Component Entries


MES.PDFDocs
The MES user documentation P DF and help files.
MES.Development
The MES API DLLs.
Client.Configurator
The MES Configurator application.
Client.Supervisor
The MES Supervisor application.
Client.Operator
The MES Operat or application.
Client.EntityModelBuilder
The MES Entity Model Builder.
Client.AppObjects
The MES application object files.
Client.DataEditor
The MES Data E ditor application.
Client.ClientFramework
The MES Client application.
Client.NETControl s
MES .NET controls.
Client.MiddlewareProxy
The MES middleware proxy.
Server.WebPortal
The MES Web Portal service.
Server.FactService
The MES Service application.
Server.FactDB
The MES database.
Server.FactMiddle
The MES middleware service.
Reports.Wonderware Information Server.TableWeaverReports
The WIS Table Weaver MES reports.
Reports.Wonderware Information Server.ReportingServicesReports
The WIS Reporting Services MES reports.
Reports.IntelligenceReports
MES Intelligence Reports.
Wonderware Intelligence.EMIAdapterCommon
The Intelligence Data Adaptors.
Wonderware Intelligence.EMIRuntime
The Intelligence Server.
Wonderware Intelligence.PDFDocumentation
The Intelligence PDF documentation files.

Version 6.0 131


MES Installation Guide Running MES Install and Configurator from a Command Line

LicAPI32
The Licensing API.
Licensing.S ELicenseServer
The License Server.
Licensing.S ELicenseManager
The License Manager.

Sample Install Response Files Provided


The MES install folder \InstallFiles\Re sponseFile s includes the following sample res pons e XML files.
You can use thes e 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.Configurator, Client.Supervisor, Client.Operator,
Client.EntityModelBuilder, Client.AppObjects, Client.DataEditor,
Client.ClientFramework, Client.NETControls, Client.MiddlewareProxy,
# Server.WebPortal, Server.FactService, Server.FactDB, Server.FactMiddle,
# Reports.Wonderware Information Server.TableWeaverReports, Reports.Wonderware
Information Server.ReportingServicesReports, Reports.IntelligenceReports,
# Wonderware Intelligence.EMIAdapterCommon, Wonderware Intelligence.EMIRuntime,
Wonderware Intelligence.PDFDocumentation
# LicAPI32
# Licensing.SELicenseServer
# Licensing.SELicenseManager
</install>
</responsefile>

Checking Installation Results in the ArchestrA Logger File


The installation results are recorded in the Arc hestrA Logger. The default location of the log file for the
MES product that was installed is:
C:\Program Files (x86)\ Common Files\ArchestrA\ Install\
{B85C7F68-ED6E-4685-B C7B-D2F596F7AB 61}\ ILogtimestamp.log

MES Uninstall Command


The uninstall command syntax is:

132 Version 6.0


Running MES Install and Configurator from a Command Line MES Installation Guide

Setup.exe /silentuninstall {B85C7F68-ED6E-4685-B C7B -D2F596F7AB61}


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 wit hout a user
interface.
 B85C7F68-E D6E -4685-BC7B-D2F596F7AB61 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 Int elligence if the limi ted version of
Intelligence 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>
/respons e=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_res pons e_file is the switch that specifies the file pat h (if needed) and file
name of the response file that specifies the settings for the c omponents 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 Administ rator user account.

Configurator Response File XML Syntax and Component Properties


The Configurator response file includes the following XML tags.
<response file> </responsefile>
The header tag that marks the file as a response file.
<configurator> </configurator>
The Configurator tag includes the list of Configurator c omponent properties. For the list of properties,
see MES Component Properties on page 133.
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.

Version 6.0 133


MES Installation Guide Running MES Install and Configurator from a Command Line

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 (IP v4 and IP v6 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 MES DB.
MES.FactDB. UseIntegratedSecurity
Values are:
o True: Use Windows Int egrated 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 wit h the UserName and DatabasePassword properties.
When False, the Us eIntegratedSecurity 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.
Advanced Properties
These properties are optional and apply only to new MES dat abases.
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 3 0 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 pat h 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.

134 Version 6.0


Running MES Install and Configurator from a Command Line MES Installation Guide

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 databas e 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 databas e.

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


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 rec ords 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.

Version 6.0 135


MES Installation Guide Running MES Install and Configurator from a Command Line

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 us ed to connect to the production database.
Values are:
o True: Use Windows Int egrated Security. The currently logged -in Windows user account will be
used to connect to SQL Server and the MES database. No us er name or password has to be
specified in the respons e file.
o False: Use SQL Server Authentication. Specify the appropriate SQL Server Authentication user
name and password wit h the ProductionUserName and ProductionDatabas ePassword
properties.
When False, the ProductionUseInt egratedS ecurity property must always precede the
ProductionUserName and P roductionDatabasePassword properties. Otherwise, the False
setting of this property will cause the values of the ProductionUs erName 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 Mic rosoft MS DN
SqlConnectionStringBuilder Class
https://msdn.microsoft.com/en-us/library/s ystem.data.sqlclient.sqlconnectionstringbuilder(v= vs.110)
.aspx topic.
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.

136 Version 6.0


Running MES Install and Configurator from a Command Line MES Installation Guide

MES.FactMiddle.RestoreServerName
The name of the server that is hosting the MES restore database.
If this property is not specified, the server name defaults to the node name if a connec tion string was
not previously saved or to the server name entered for the previously saved connection string.
MES.FactMiddle.RestoreDataba seName
The name of the MES restore databas e.
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 us ed to connect to the restore database
Values are:
o True: Use Windows Int egrated Security. The currently logged -in Windows user account will be
used to connect to SQL Server and the MES database. No us er name or password has to be
specified in the respons e file.
o False: Use SQL Server Authentication. Specify the appropriate SQL Server Authentication user
name and password wit h the RestoreUserName and RestoreDat abaseP assword properties.
When False, the RestoreUseInt egratedS ecurity 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.RestoreDataba sePassword
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 MS DN
SqlConnectionStringBuilder Class
https://msdn.microsoft.com/en-us/library/s ystem.data.sqlclient.sqlconnectionstringbuilder(v= vs.110)
.aspx topic.
MES Middleware Service User Account Properties
These properties specify:
 Whether to automatically set the minimum SQL permissions on the MES databases for the MES
middleware service Windows user account

Version 6.0 137


MES Installation Guide Running MES Install and Configurator from a Command Line

 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 on page 84.
The default value True is used if this property is not specified.
MES.FactMiddle.ProductionAdminUseIntegratedSecurity
Applies only if the SetMinimalS qlPermissions property is set to True.
Values are:
o True: Use Windows Int egrated 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 us er must have administrat or privileges to set SQL permissions.
o False: Use SQL Server Authentication. Specify the appropriate SQL Server Authentication user
name and password wit h the ProductionS ecuritySqlUserName and
ProductionSecuritySqlPassword properties.
When False, the ProductionAdminUseIntegratedS ecurity property must always precede the
ProductionSecuritySqlUserName and ProductionS ecuritySqlPassword properties. Otherwise,
the False setting of this property will cause the values of the ProductionS ecuritySqlUserName
and ProductionSecuritySqlPassword properties to be clea red.

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


MES.FactMiddle.ProductionSecuri tySqlUserName
If SQL Server Authentication is being used, the us er name of the SQL user account that has
administrator privileges to set SQL permissions for the MES production dat abase.
MES.FactMiddle.ProductionSecuri tySqlPa ssword
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 dat abase.
MES.FactMiddle.UseProductionCredentialsForRestore
Applies only if the EnableRestoreDatabase property is set to True.
Values are:
o True: Use the same us er 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.

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


MES.FactMiddle.RestoreAdminUseIntegratedSecurity
Applies only if the SetMinimalS qlPermissions property is set to True and the
UseProductionCredentialsForRestore is set to False.
Values are:

138 Version 6.0


Running MES Install and Configurator from a Command Line MES Installation Guide

o True: Use Windows Int egrated 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 us er must have administrat or privileges to set SQL permissions.
o False: Use SQL Server Authentication. Specify the appropriate SQL Server Authentication user
name and password wit h the RestoreS ecuritySqlUserName and RestoreSecuritySqlPassword
properties.
When False, the RestoreAdminUseIntegratedSec urity property must always precede the
RestoreSecuritySqlUserName and RestoreS ecuritySqlPassword properties. Otherwise, the
False setting of this property will cause the values of the RestoreSec uritySqlUserName and
RestoreSecuritySqlPassword properties to be cleared.

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


MES.FactMiddle.RestoreSecuritySql UserName
If SQL Server Authentication is being used, the us er name of the SQL user account that has
administrator privileges to set SQL permissions for the MES restore database.
MES.FactMiddle.RestoreSecuritySqlPa ssword
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.

Middleware Proxy Component Properties


MES.MiddlewareProxy.MiddlewareHost
The name or IP address of the middleware server. IP v4 and IP v6 addressing are supported.
If this property is not specified, it defaults to localhost.
MES.MiddlewareProxy.HttpPort
The HTTP port number to reach the configuration endpoint.
The default value 80 is used if this property is not specified.
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 prot ocol type used by the MES middleware communications. Values are Tcp
(the default if this property is not specified) or Http.

MES Web Portal Component Properties


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. Otherwis e, 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.

Version 6.0 139


MES Installation Guide Running MES Install and Configurator from a Command Line

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 Port al 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.

MES Intelligence Reports Component Properties


MES.IntelligenceReports.ServerName
The server name on which the Intelligence database is stored.
MES.IntelligenceReports. DatabaseName
The name of the Intelligence database.
MES.IntelligenceReports. UseIntegratedSecurity
Values are:
o True: Use Windows Int egrated 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 wit h the IntelligenceNodeUserName and Int elligenceNodePassword
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.
MES.IntelligenceReports.VirtualFolder
The name of the report server's virt ual folder.
MES.IntelligenceReports.TargetReportFolder
The name of the target report folder for the MES reports.
MES.IntelligenceReports. UseCurrentUserWindow sCredentials
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 s pecified in the response
file.
o False: The Windows user account specified by the ReportingServic esNodeDomain,
ReportingServices NodeUserName, and ReportingServices NodePassword 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.

140 Version 6.0


Running MES Install and Configurator from a Command Line MES Installation Guide

MES.IntelligenceReports. ReportingService sNodeDomain


If UseCurrentUserWindowsCredentials is False, the domain for the SQL user account.
MES.IntelligenceReports. ReportingService sNodeUserName
If UseCurrentUserWindowsCredentials is False, the SQL user name.
MES.IntelligenceReports. ReportingService sNodePassword
If UseCurrentUserWindowsCredentials is False, the SQL user password.

Licensing Component Properties


Schneider Electric Licensing.LicAPI2.NewServerName
The host name of the License Server node. The default value is localhost.
Schneider Electric Licensing.LicAPI2.NewPortNumber
The License Server port number. The default value is 55555.

Template Configurator Response File for MES


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

Version 6.0 141


MES Installation Guide

C HAPTER 14
Customizing the MES Middleware

In This Chapter
Introduction to MES Middleware Customization ............................................................................ 143
Opening the Middleware Configuration Editor ............................................................................... 143
Middleware Settings Tab ............................................................................................................. 145
Command (SP) Timeouts Tab ..................................................................................................... 148
Custom DB SP Mappings Tab ..................................................................................................... 149
Custom Batch SP Mappings Tab ................................................................................................. 149
Extensibility Hooks Tab ............................................................................................................... 150
Clearing the Middleware Stored Procedure Parameter Cache ........................................................ 152
Log Flags for Troubleshooting the MES Middleware ...................................................................... 153
MES Middleware Performance Count ers ...................................................................................... 154

Introduction to MES Middleware Customization


You can use the Middleware Configuration Editor to configure the custom mapping file that middleware
uses while processing com mands. The following items can be configured:
 Settings that affect the MES middleware communication with client applications and MES databases
 Command (SP) timeouts
 Custom databas e SP mappings
 Custom batch SP mappings
 Extensibility hooks
After changing and saving settings in the Middleware Configuration Editor, you will have to restart the
MES middleware service to have the changes take effect. See Starting, Stopping, and Restarting the
MES Middleware Host and MES Service on page 127.
In some cases, you will also have to restart any running clients.

Opening the Middleware Configuration Editor


To open the Middleware Configuration Editor
 On the Start menu, click either the Middleware Configuration Editor tile.

Version 6.0 143


MES Installation Guide Customizing the MES Middleware

The Middleware Configuration Editor dialog box appears.

See the following topics for descriptions of what settings can be configured on each tab.

144 Version 6.0


Customizing the MES Middleware MES Installation Guide

Middleware Settings Tab


The settings on this tab affect the communication of the MES middleware service with the client
applications and the MES database.

You can view a description of the selected option at the bottom of the window.
You can configure client, database, service, and tracing settings on the middleware.

Note: When any changes are made to the Client Settings, all running clients must be restarted before
they detect the changes. Also, changes to the HTTP or TCP Ports requires all running clients to be
restarted.

Middleware Client Settings


Deadlock Retry Count
The number of times a deadlock scenario must be ret ried before ret urning an error to the caller.
Deadlock Retry Wait Max
The maximum time (in milliseconds) a deadlock must wait before retrying. The default wait time is
randomly chosen between 0 and the current time.
Listen Backlog
Specifies the number of pending accept requests to be queued. If the listen backlog queue fills up,
new socket requests will be rejected.
Max Concurrent Calls
A Windows Communication Foundation (WCF) throttling setting that limits the number of calls tha t
can be made against the MES middleware host.

Version 6.0 145


MES Installation Guide Customizing the MES Middleware

Max Concurrent Instance s


A WCF throttling setting that limits the number of instances that can be made against the MES
middleware host. It is recommended that this value be set to 100 x the number of process ors on the
server. For example, if the server has eight processors, the value of this setting should be 800.
Max Concurrent Sessions
A WCF throttling setting that limits the number of sessions that can be made against the MES
middleware host.
Max Connections
The maximum number of connections allowed to be pending dispatch on the MES middleware
server.
Max Message Size
The maximum size of the message (in MB) that you c an exchange between the client and the server.
Receive Timeout
The amount of time in seconds that the client must wait before receiving data from the server.
Send Timeout
The amount of time in seconds that the client must wait when sending a command to the server.
Transaction Timeout
The maximum time that a transaction may take to execute (in seconds). All the commands within the
transaction must complete within this time.
Optimizing MES Middleware Client–Host Communication
The defaults for the settings Listen Backlog, Max Concurrent Calls, Max Concurrent Instances, Max
Conc urrent Sessions, and Max Connections have been selected to optimize the reliability of
communication between the MES middleware client proxies and the MES middleware host. The defaults
are the recommended settings for medium and large systems, and also work without causing
communication issues for small systems.
If these settings are changed to lower values, transaction proc essing issues might occur, as indicated by
the following error message: TCP Provider: No connection coul d be made because the target node
actively refused it.
For example, the WCF throttling settings limit the number of calls, sessions, and instances that can be
made against a service. Setting limits on these helps to avoid DOS (denial of service) attacks as they
help to prevent the server from being overwhelmed. However, if the setting values are too low, the server
can be underutilized.
To further ensure optimal communication between MES middleware proxy clients and the middleware
host, it is recommended that there be no devices bet ween the client and host nodes, such as load
balancers or NA Ts (net work address translators).

Middleware Database Settings


Command Timeout
The time (in seconds) for a database command to execute.
DB Connection Retry
The number of times that the middleware will attempt to connect to the MES database. The default
value is 100.

Middleware Service Settings


Data Change Poll Rate
The data change poll rate value to specify the frequency at which the database is checked for
changes which is sent to the subscribed clients.

146 Version 6.0


Customizing the MES Middleware MES Installation Guide

HTTP Port box


The HTTP port value to configure endpoints.
Max Data Set Rows
The maximum data set rows value that is returned to the client that subscribe to data changes.
TCP Port
The TCP port for communication.

Middleware Tracing Settings


File Name
The name of the file to log the trace.
File Path
The location to save the log file.
Include SP Parameter Values While Logging
The frequency of including SP parameter values while logging. Selecting this option logs all the
parameter values and the stored procedure calls in an out put file.
Log Source Type
The file type to log the .NE T middleware calls.
Log XML Input
Specifies whether to log the XML input source based on the configuration settings.
Log XML Result
Specifies whether to log the XML results based on the configuration settings.
Trace MES MWCalls
Specifies whether to trace the middleware calls of the MES application.
This property degrades the performance of the application. You must enable this property whi le
analyzing an issue.
Trace Specific Commands Only
Specifies whether the .NE T middleware must trace all the MES calls.
Wait Time Between Each Log Writes
The wait time in seconds bet ween eac h log write. The middleware waits for the specified x seconds
before each log write. If you specify the value as 0, the middleware logs the result immediately.
XML Request Type To Trace
The XML type to trace. If you specify All, all types of requests are traced. For example, Data
retrievals through GetDS and DataWrites through ExecCommand.

Version 6.0 147


MES Installation Guide Customizing the MES Middleware

Command (SP) Timeouts Tab


On this tab, you can configure a longer command timeout value for specific methods in the MES
database. This is necessary for procedures that runs longer than the default command time. If clients
consistently get timeout errors from the database when calling a specific middleware method, they may
have to increase the timeout for the specific method.

This tab shows the stored procedures or methods and the corresponding timeout values under the
Method Name and Timeout value columns respectively.
A method name is a two-part object.command name that the middleware maps to a stored procedure
name. The method name is derived from the Object/Cmd/MsgType elements in the XML message sent
to the middleware. If t he MsgTy pe is exec or getspec, then the method name is created by combining the
Object and Cmd with a period (for example, ent.add). If the MsgType is getall, getbyk ey, or some other
value, then the method name is created by combining the Object and the MsgTy pe with a period (for
example, ent.getbykey).
This automatic mapping rule also applies to Custom DB and Custom Batch SP Mappings.
To configure the Command (SP) Timeouts
1. Double-click and type the method name you want to configure in the Method Name column.
2. Type the timeout value (in seconds) in the Timeout value column.
3. Click Save.

148 Version 6.0


Customizing the MES Middleware MES Installation Guide

Custom DB SP Mappings Tab


On this tab, you can configure the custom mapping for stored procedures in the MES database. The
MES Middleware Service accepts the XML commands that have the Object/Command/MsgTy pe
identifier.

This tab shows the met hod names and the corres ponding stored procedure names in the Custom
Method Name and Custom Stored Procedure Name columns respectively.
To configure the Custom DB SP Mappings
1. Click and type the method name you want to configure in the Custom Method Name column.
2. Type the stored procedure name in the Custom Stored Procedure Name column.
3. Click Save.
You can redirect only custom method names to a different stored procedure, and not standard
middleware met hods.

Custom Batch SP Mappings Tab


On this tab, you can configure the custom mapping for the custom batch-oriented stored procedures in
the MES database.

Version 6.0 149


MES Installation Guide Customizing the MES Middleware

These custom stored procedures accept XML as their first parameter and process the XML internally.
The stored procedures process the XML commands in batches.

This tab lists the method names and the corresponding stored procedure names in the Custom Method
Name and Custom Stored Procedure Name columns respectively.

Mapping the Identifiers and Stored Procedures in Batches


The difference between this mapping and the mapping defined by the Custom DB SP Mapping tab is
that the stored procedures that are defined here must have an input parameter named xml_source or
in_xml_source. The stored parameter is passed for the entire XML command.
To map the identifiers and stored procedures in batches
1. Click the custom method name you want to configure in the Custom Method Name column.
2. In the Custom Stored Procedure Name column, type the corresponding stored procedure name.
3. Click Save.

Extensibility Hooks Tab


On this tab, you can configure extensibility hooks.
Extensibility indicates that the system functionality is extendable without making any major changes to
the system architecture. Extensibility hooks are used for the follo wing:
 Extend the middleware functionality by executing custom code
 Replace the current middleware stored procedure if you want to perform some different action

150 Version 6.0


Customizing the MES Middleware MES Installation Guide

Custom code can be executed before or after a method with middleware c ode. Extensibility hooks can be
.NET assemblies or stored procedures. You can configure extensibility hooks as a part of a custom
mapping file that the middleware uses while processing c ommands. You can configure the following
extensibility hooks:
 Pre hook - Calls custom code to execute before executing a middleware stored procedure.
 Post hook - Calls custom code to execute after executing a middleware stored proc edure.
You can configure one pre hook and one post hook for a middleware stored procedure. You can also
configure the flow of the middleware aft er execution of configured hooks.
A middleware flow specifies the status of the middleware after executing a hook.

The extensibility hook settings are described below.


Middleware SP Name
The middleware stored procedure for whic h you want to configure a hook.
Pre Hook Name
The name for the pre hook.
Pre Hook Type
SP or ASSEMBLY.
Middleware Flow
The required middleware flow for the pre hook: STOP, STOP ON ERROR, or CONTI NUE EV EN ON
ERROR.
Post Hook Name
The name for the post hook.
Post Hook Type
SP or ASSEMBLY.

Version 6.0 151


MES Installation Guide Customizing the MES Middleware

Middleware Flow
The required middleware flow for the post hook: STOP ON ERROR or CONTI NUE EV EN ON
ERROR.
The following topics provide an overview for configuring a pre hook and post hook. For detailed
examples, see the MES Middleware Extensibility Hook s Reference.
Configuring a Pre Hook
The pre hook is configured for the specified middleware method.
When you c onfigure a pre hook, the pre hook is mapped to the middleware. The pre hook is called before
executing the middleware code. If the pre hook is of type SP, then the same parameter list from the
middleware SP is passed to the custom SP.
The middleware flow after executing the pre hook can be one of the following:
 The flow stops when the pre hook is called. A value is returned to the calling method and any
changes or updates made with the transaction are not committed. The middleware does not call t he
current method or any other post hooks. The pre hook replaces the current middleware method in
this case.
 The flow stops in case of any error and an error message is returned to the calling method. The
middleware does not call the current middleware met hod or any post hooks.
 The flow always continues to the middleware code irrespective of any errors. A warning message is
returned to the calling method in case of any error.
Configuring a Post Hook
The post hook is configured for the specified middleware method.
When you configure a post hook, the post hook is mapped to the middleware. The post hook is called
after executing the middleware code. If the post hook is of type SP, then the same parameter list from the
middleware SP is passed to the custom SP.
The middleware flow after executing the post hook can be one of the following:
 The flow stops in case of any error. No changes are saved and no information is returned to the
calling method except a generat ed error message.
 The flow always continues to the middleware code irrespective of any errors. A transaction is
committed irrespective of any error and a warning message is returned to the calling method.

Clearing the Middleware Stored Procedure Parameter Cache


For performance reasons, the MES middleware caches the parameter list of a stored procedure the first
time the stored procedure is called. If a custom stored procedure's parameter list is subsequently
changed, the middleware might not correctly call the stored proc edure until the cache is cleared.
For example, a developer is modifying a custom stored procedure by adding a new parameter and is
calling this stored procedure with the ExecSP() API method. Or, a supply chain connector has an
import/export schedule already defined and then a developer makes changes to their stored procedure
signature. Continuing to call the custom stored proc edure or using the old signature without clearing the
cache could cause unex pected results or issues.
To use the new parameter in the API call, the developer can either restart the MES middleware, call th e
ClearSpParameterCache() API method to clear the parameter cache, or use the MES Clear Parameter
Cache utility to clear the parameter cache.
When putting changes to stored procedures into production, the MES Clear Parameter Cache utility can
be used to clear the stored procedure parameter cache for the middleware. This must be performed on
each middleware node to ensure that the changed stored proc edures can be called from all clients.

152 Version 6.0


Customizing the MES Middleware MES Installation Guide

The procedure described here clears the parameter cache for all stored procedures (custom and
MES-specific stored procedures). To clear the parameter cache for a specific custom stored procedure,
the ClearSpParameterCache(string) API method must be used.
To clear the middleware stored procedure parameter cache
1. Make sure the MES middleware service is running.
2. On the Start menu, click either the MES Clear Parameter Cache tile (shown below).

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

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

Log Flags for Troubleshooting the MES Middleware


You can set various log flags in the A rchestrA Log Viewer to help troubleshoot potential MES middleware
issues. For information about the Log Viewer, see the Arc hestrA System Management Console help and
the Log Flag Editor help.
Errors will always be reported by the MES middleware service and proxy. These errors will be highlighted
in red in the Log Viewer. If your client application is running on the n ode on which the MES middleware
service is running, you will see errors logged t wice.

Log Flags for Server-Side Diagnostics


The most common place to enable better diagnostic logging is on the node on which the MES
middleware service is running. Use the following log flags on the specified assemblies.
FactMES.Server.Services Assembly
LogTrace
Shows every XML message and its response as they go through the MES middleware service. It also
shows all E ventBrok er subscriptions.
LogDataChangeEvents
Shows each E ventBroker subscription group query and subscription data change events.
LogDeadlocks
Logs eac h deadlock error. Normally these are not logged bec ause they will be retried.

Version 6.0 153


MES Installation Guide Customizing the MES Middleware

LogErrorStackTrace
A commonly used flag. Logs a verbose stack trace for each error.
LogErrorXML
A commonly used flag. Logs the offending messages XML.
FactMES.Server.Communication Assembly
LogTrace
Shows miscellaneous events during message processing.
LogExtraXmlElements
Logs a message when an element exists in the source XML that was not needed by the stored
procedure. Setting this flag helps to detect messages if problems exist because the XML and the
stored procedure do not match as expected.
LogSPandSQLCalls
Logs every stored procedure or SQL call in a format compatible with the current database. You can
often cut and paste this log content into a query window and execute the SQL command outside of
the middleware. This is similar to using SQL P rofiler to capt ure SQ L statements.

Note: To use the LogSPandSQLCalls flag you must also use the Middleware Configuration Editor to
set the Trace MES MW Calls paramet er (in the Middleware Tracing Settings group on the
Middleware Tracing Settings tab) to True. After changing the setting, restart the middleware (see
Starting, Stopping, and Restarting the MES Middleware Host and MES Service on page 127). The
Middleware Tracing settings can provide more powerful tracing capabilities than the Logger. For
more information about thes e settings, see Middleware Tracing Settings on page 147.

Log Flags for Client-Side Diagnostics


The client middleware proxy can also be enabled to log additional diagnostic information. In some cases
this information is redundant with the MES middleware service logging. However, setting client -side log
flags can be useful if you are working at the client or if the node on which the middleware service is
running is logging too many log entries to make sense of them.
FactMES.Server.Proxies Assembly
LogTrace
Shows every XML message and its response as they go through the WCF P roxy. It also shows all
E ventBroker subscriptions and re-subscriptions.
LogDataChangeEvents
Shows each data change event, including error events.
LogDeadlocks
Logs eac h deadlock retry. Errors resulting from exceeding the retry count are always logged.
LogErrorXML
Logs the offending messages XML.

MES Middleware Performance Counters


The custom performance monitor counters that are described below are available for the MES
middleware service via the MES Middleware Performance Object found in Windows Performance
Monitor (PerfMon).
AsyncCmd Active Calls
Number of asynchronous calls that are currently active. This counter is incremented and
decremented when a method is entered and exited (s erver object is processing).

154 Version 6.0


Customizing the MES Middleware MES Installation Guide

AsyncCmd Active Instance s


Number of asynchronous objects currently instantiated. This counter is incremented and
decremented when an object is created and disposed. Includes objects that have been created but
might be waiting to be active.
AsyncCmd Completed Msgs/ sec
Number of asynchronous messages that completed successfully this second.
AsyncCmd Message s/ sec
Number of asynchronous messages which started to process this second.
AsyncCmd Retrie s/ sec
Number of retries due to asynchronous messages this second.
AsyncCmd Total Duration/ sec (m s)
Total number of milliseconds spent executing methods due to asynchronous mes sages this second.
This counter includes only durations of successful calls.
AsyncCmd Total Retries
Total number of retries due to asynchronous messages since the middleware started.
Event Notifcations/ sec
Number of event notifications that were raised this second.
Number of Hi storical Subscriptions
Historical subscriptions are subscriptions that are pulling data from the past (in chunks). They will
eventually catch up to the current time and be switched to regular subscriptions.
Number of Subscription Groups
A subscription group is all the subscriptions for a specific table
Number of Subscriptions
The number of subscriptions that are currently active.
SyncCmd Active Calls
Number of synchronous calls that are currently active. This counter is increment ed and decremented
when a method is entered and exited (server object is processing).
SyncCmd Active Instance s
Number of synchronous objects currently instantiated. This counter is incremented and decremented
when an object is created and disposed. Includes objects that have been created but may be waiting
to be active.
SyncCmd Completed Msgs/ sec
Number of synchronous messages that completed successfully this second.
SyncCmd Deadlocks/ sec
Number of deadlocks due to synchronous messages this second.
SyncCmd Message s/ sec
Number of synchronous messages that started to process this second.
SyncCmd Row s/ sec
Number of DataSet rows returned by synchronous messages this second.
SyncCmd Total Deadlocks
Total number of deadlocks due to synchronous messages since the middleware started.
SyncCmd Total Duration/ sec (m s)
Total number of milliseconds spent executing methods due to synchronous messages this second.
This counter includes only durations of successful calls.

Version 6.0 155


MES Installation Guide

C HAPTER 15
Upgrading MES Development Components

In This Chapter
Upgrading the MES Client API Script Libraries .............................................................................. 157
Upgrading MES .NET Cont rols in ArchestrA ................................................................................. 158

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 ArchestrA 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 o bjects in the ArchestrA IDE, refer to the Application Server
User’s Guide.
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. Browse to the directory C:\Program Files\Wonderware\MES\Control s.
c. In the File Ty pe 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.
You must import aaMES.aaSLIB file using the same proc edure.
e. Click OK.
If you have selected to install the .NET controls during the installation, then the aaFactMES.aaSLIB
and aaMES.aaSLIB files are copied on your local hard drive. You can also browse the MES
installation folder and manually copy the files from the \MES\Control s directory.
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.

Version 6.0 157


MES Installation Guide Upgrading MES Development Components

4. Redeploy the AppEngine and associated objects.

Note: Importing the new Stateless API Wrapper into a Galaxy with the old 3.4/3.5 Stateful API Wrapper
prevents the old Stateful API Wrapper from working.

Upgrading MES .NET Controls in ArchestrA


If your organization is using MES .NE T controls in ArchestrA, you have to first remove the previous
version of the MES .NE T controls before upgrading to the current version of the controls.
1. Perform the MES version upgrade.
2. Open the ArchestrA IDE and make a list of the MES cont rols in t he toolbox folder that are being used
in each galaxy.
3. Delet e the MES controls from the toolbox folder in each galaxy.
The MES .NE T control DLLs are removed from the default ArchestrA application folders in which
they were stored. These folders are:
o \Arche strA\Framework\Bin
o \Arche strA\Framework\FileRepository\<galaxy_name>\Vendors
4. Exit the ArchestrA IDE.
5. In Windows Explorer, perform a recursive search for the MES .NE T control DLLs within the
\Arche strA application folder to make sure that they were deleted.
For example, if you deleted the SampleViewer control, search for SampleViewer.dll (the full file
name for the imported MES .NE T cont rols is
Invensys_Systems__Inc__FactMES.Control s.<control_name>.dll ).
6. Delet e any of the MES .NE T control DLL files that are found in the \Arche strA application folder but
not those in the \MES\Control s installation folder.
7. Restart the ArchestrA IDE.
8. Import the MES controls package that was installed with the new releas e into each galaxy.
By default, the MES .NET controls are installed at C:\Program Files\Wonderware\MES\Control s
during the installation. All the DLL files present in the MES\ Control s directory are enclosed in the
MES Control s.aaPKG file. You can import individual DLL files or import all the .NET controls into the
ArchestrA IDE by importing the MESControl s.aaPKG file.
For detailed information about importing .NE T controls into ArchestrA IDE, see the MES .NET
Cont rols Developer Guide.
9. If using the MES Stateless or Stateful APIs, reimport thes e script libraries.

158 Version 6.0


MES Installation Guide

C HAPTER 16
Modifying, Repairing, and Uninstalling MES

In This Chapter
Modifying What MES Products or Components Are Installed ......................................................... 159
Repairing the Installation ............................................................................................................. 166
Uninstalling MES ........................................................................................................................ 169
Tasks to Perform After MES Components Have Been Removed .................................................... 172

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 169.
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 107.
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 MES and click Change or
Uninstall/Change on the toolbar.
 Run the Setup.exe file in the MES installation root folder.

Version 6.0 159


MES Installation Guide Modifying, Repairing, and Uninstalling MES

The Setup tool options appear.

2. Select Modify, and then click Next.

160 Version 6.0


Modifying, Repairing, and Uninstalling MES MES Installation Guide

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 indicat es that only
the Operator 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 6.0 161


MES Installation Guide 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 role components will be uninstalled while components related to the
Configuration Client role will be installed.

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

162 Version 6.0


Modifying, Repairing, and Uninstalling MES MES Installation Guide

The Modify confirmation screen appears.

5. To continue with the installation modific ation, click Modify.

Version 6.0 163


MES Installation Guide Modifying, Repairing, and Uninstalling MES

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 soft ware for cert ain MES features that the S etup 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 Soft ware on page 17.
7. If all prerequisite soft ware is installed on the local node, click Next.

164 Version 6.0


Modifying, Repairing, and Uninstalling MES MES Installation Guide

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 Configurat or:

Version 6.0 165


MES Installation Guide 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 59.
Post-Uninstall Tasks
For possible post-uninstall tasks you might have to pe rform, see Task s to Perform After MES
Components Have B een Removed on page 172.

Repairing the Installation


If files or registry entries of an installed instanc e 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 MES 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 Intelligence from the MES Setup tool, you must run the Repair operation
from the Control Panel P rograms and Features applet. Running the Repair operation from the
Setup.exe file will not successfully repair the installation.

166 Version 6.0


Modifying, Repairing, and Uninstalling MES MES Installation Guide

The Setup tool options appear.

2. Select Repair, and then click Next.


The Repair confirmation screen appears.

Version 6.0 167


MES Installation Guide 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.

168 Version 6.0


Modifying, Repairing, and Uninstalling MES MES Installation Guide

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 Modif ying What MES Products or
Components Are Installed on page 159.

Note: Uninstalling MES from the Control Panel or using the Setup tool does not uninstall License
Manager or Intelligence. 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 MES 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 6.0 169


MES Installation Guide Modifying, Repairing, and Uninstalling MES

The Uninstall confirmation screen appears.

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

170 Version 6.0


Modifying, Repairing, and Uninstalling MES MES Installation Guide

If any applications that might conflict with the uninstall 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 uninstall begins. The following screen appears when it completes successfully.

5. To close the Setup tool, click Finish.

Version 6.0 171


MES Installation Guide Modifying, Repairing, and Uninstalling MES

Tasks to Perform After MES Components Have Been


Removed
 If MES Intelligence Reports were deployed but the MES Intelligence 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 107.

172 Version 6.0


MES Installation Guide

Index
introduction • 129
. uninstall command syntax • 132
.NET Controls Configuration Client installation role • 15
upgrading • 158 prerequisite soft ware • 17
.NET Development installation role • 15 Configurator, post-install • 59
prerequisite soft ware • 17 closing • 63
.NET Framework required version • 17, 41
command line, running from • 133
component configuration status • 59
A Configurator command syntax • 133
Admin User • 7
entries, required or invalid • 59
Application Objects
messages, configuration • 59
client component • 11
ArchestrA Development installation role • 15 product tree • 59

prerequisite soft ware • 17 starting • 59


ArchestrA Logger • 132
ArchestrA User Account • 7 D
database connection strings
C production database • 77
cluster environment restore database • 78
2-node failover, running MES on • 18 testing and saving • 83
environment considerations for server Database Server wt h MES installation role • 15
component • 18 prerequisite soft ware • 17
command line installation, configuration, Database Setup component, configuring • 65
uninstall
properties in Configurator response file •
ArchestrA Logger • 132 134
command list file • 130 DB/MW Communication component,
Configurator response file MES component configuring • 75
properties • 133 properties in Configurator response file •
Configurator response file syntax • 133 135

Configurator response file templat e • 141


install command syntax • 130 E
install response file component entries • 131 End User License Agreement (EULA ) • 41

install response file syntax • 130


install response file, samples • 132 H
hardware requirements • 7
installation results, checking • 132

Version 6.0 173


MES Installation Guide Index

creating • 65
I migrating • 65, 68
Information Server overwriting • 68
MES data source, adding • 121 removing • 172
MES reports, deploying • 121, 123 table fragmentation, fixing • 65
Quality Characteristic Detail report, MES Development Library
configuring sec urity policies for [5.3 WIS] • Development Library component • 12
125 MES API DLLs • 12
Reporting Servic es Reports component • 12 MES Intelligence Reports
Table Weaver Reports component • 12 configuring and deploying • 109
installation deploying • 115
cluster environment • 18 hot fix for Intelligence, applying • 111
command line, running from • 129, 130 installing and configuring • 109
introduction • 7 Intelligence Data Adapters component • 12,
prerequisite soft ware • 17 110
procedure • 41 Intelligence S erver component • 12, 110
requirements, hardware and soft ware • 7 MES Intelligence Reports component • 12
role-based • 15 MES report model file • 111
security and permissions when performing • MES tables added to Intelligence database
7 • 111
MES views added to Intelligence database •
L 115
licences, installing for MES products • 49 properties in Configurator response file •
log flags, troubleshooting MES middleware • 140
153 Quality Characteristic Details report,
configuring security policies for • 119
M removing • 172
MES .NET Controls, upgrading • 158 updating Intelligence database with MES
MES configuration • 59 tables and data • 111
post-configuration tasks • 64 MES Middleware Proxy
MES databas e optimization component, configuring • 95
assistance with • 74 properties in Configurator response file •
index optimization script • 73 139
MES middleware service
index rebuild and reorganize frequency • 74
ArchestrA User Account • 7
indexes, number to use • 74
batch-oriented stored procedures, custom
reindexing during database creation and
mapping • 149
migration • 65
client settings • 145
system usage, monitoring • 73
communication with database, configuring •
what to index • 74
75
MES databas es

174 Version 6.0


Index MES Installation Guide

custom batch stored procedure mappings • MES software


149 installing • 41
custom database stored procedure MES Stateful API
mappings • 149 upgrading DLLs • 12, 157
customizing • 143 MES Stateless API

database connection string, production • 77 upgrading DLLs • 12, 157


MES Web Portal
database connection string, restore • 78
component, configuring • 98
database connection strings, testing and
saving • 83 configuration overview • 97

database settings • 146 customized files • 107

extensibility hooks • 150 HTTPS binding, enabling • 105

general settings • 145 HTTPS, disabling • 106

identifiers, mapping in batches • 150 IIS feature settings • 100

log flags for troubles hooting • 153 implementing SSL for • 101

mappings, customizing • 143 properties in Configurator response file •


139
MSDTC component services, configuring •
92 public HTTPS SSL certificates • 102

MSDTC firewall exception, adding • 89 public HTTPS SSL certificates, configuring •


102
performance counters • 83, 154
self-signed HTTPS SSL certific ates • 102
service settings • 146
self-signed HTTPS SSL certific ates,
settings • 145
configuring • 103
SQL Server database roles, assigning • 84
SSL overview • 101
starting, stopping, restarting • 127
user session cache refresh rate, setting •
stored procedures, clearing parameter
101
cache • 152 Middleware Configuration Editor • 143
stored procedures, custom mapping • 149 MSDTC
stored procedures, mapping in batches • component services, configuring • 92
150 firewall exception, adding • 89
trace settings • 147
WCFHostService • 7
O
MES Middleware/DB Maintenance Server
Operations Capability Object (OC)
installation role • 15
description • 11
prerequisite soft ware • 17
Operator Client installation role • 15
MES product license, installing • 49
MES Reports for WIS • 121 prerequisite soft ware • 17
Oracle database migration to SQL Server
data source, creating • 121
Import and Export wizard • 22
deploying • 123
MES Service custom tables, migrating • 39

starting, stopping, restarting • 127 data source and destination, selecting •


MES Service Monitor 22

starting and exiting • 127 Labor_Usage table, migrating • 36

Version 6.0 175


MES Installation Guide Index

mappings, reviewing • 33
migration, initiating • 33 W
table and dat a mappings • 28 WCFHostService • 7
table column mapping settings • 31 Web Portal installation role • 15

tables with MOD_ID column • 31 prerequisite soft ware • 17


work group environment
Oracle database, preparing • 21
MES databas e permissions • 7
SQL Server database, creating • 20

P
performance counters • 83, 154
permissions when running installation • 7
post-configuration tasks • 64
prerequisite soft ware • 17, 129

R
removing the MES soft ware • 172
Report Server installation role • 15
prerequisite soft ware • 17
reports components • 12
requirements, hardware and soft ware • 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
database permissions required • 84
user aut hentication, specifying in
Configurator • 63
stored procedures, clearing parameter cache •
152

U
uninstalling MES software
command line, running from • 129
uninstall command syntax • 132
upgrade requirements • 19
Utilization Capability Object (UCO)
description • 11

176 Version 6.0

You might also like