Deploying DPM Using Solution Central
In this scenario, your database and ThingWorx are installed on your system and you deploy DPM to your ThingWorx instance using Solution Central.
Complete the steps in the following sections:
Prerequisites
Before deploying DPM, complete the following prerequisites:
Review the DPM system requirements, including which versions of ThingWorx are compatible with DPM. For more information, see DPM System Requirements.
Review the ThingWorx system requirements for a compatible version of ThingWorx. For more information, see System Requirements in the ThingWorx Help Center.
Install a compatible version of ThingWorx. For more information, see Installing ThingWorx.
Ensure that your license includes the appropriate entitlements for DPM. For more information, see Licensing for ThingWorx Platform in the ThingWorx Help Center and License Management on the PTC website.
Configure ThingWorx to enable extension import. For more information, see Importing Extensions in the ThingWorx Help Center.
Ensure that the ThingWorx server time zone is set to UTC. For more information, see Install Java, Apache Tomcat, and ThingWorx in the ThingWorx Help Center.
If you will use the Time Loss Analytics functionality within DPM, install ThingWorx Analytics Server and the Analytics Builder extension. For more information, see ThingWorx Analytics Installation and ThingWorx Analytics Extension in the ThingWorx Analytics Help Center.
Obtain access to Solution Central. In addition to being used to deploy DPM, Solution Central is the recommended tool for moving your deployment and customizations between ThingWorx environments, for example from a test environment to a production environment. For more information, see the ThingWorx Solution Central Help Center.
If you are installing your database on Linux, install the sqlcmd tool.
Install the Microsoft SQL Server Management Studio. For more information, see https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15.
The operating system time zone on the server where the SQL server is installed must be in UTC. This means that all databases on this SQL Server will be operating in UTC.
Update the Script Timeout Setting
To update the script timeout setting, a ThingWorx administrator must complete the following steps:
1. On the ThingWorx server, navigate to the ThingWorxPlatform folder.
2. Open the platform-settings.json file in a text editor.
3. In the BasicSettings section, find and update the ScriptTimeout setting to 12000.
If the option is not already present, add it to the BasicSettings section, as follows: "ScriptTimeout": 12000
4. Save and close the platform-settings.json file.
5. Restart the ThingWorx server.
* 
If a message similar to the following appears in your script log, repeat the steps above to further increase the ScriptTimeout setting:
[message: Execution of Script terminated after : 12000 seconds. Timeout configured for 12000 seconds.]
For more information, see platform-settings.json Configuration Details in the ThingWorx Help Center.
Update the Session Timeout Setting
By default, idle user sessions timeout after 30 minutes. You can change this setting to meet the needs of your system.
To change the session timeout setting, a ThingWorx administrator must complete the following steps:
1. In ThingWorx, navigate to Systems > Subsystems.
2. Open the UserManagementSubsystem in edit mode.
3. Under Configuration, change the Idle Session Timeout (min) setting.
4. Click Save.
5. Restart the ThingWorx server.
For more information, see User Management Subsystem in the ThingWorx Help Center.
Install the MS SQL JDBC Driver
If your ThingWorx instance is configured with PostgreSQL as the persistence provider, complete the following steps to install the MS SQL JDBC driver. If your ThingWorx instance is configured with MS SQL as the persistence provider, skip to the next section.
1. Download the JRE11 compatible version of the Microsoft JDBC Driver 7.4.1 for SQL Server from the following link: https://docs.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix?view=sql-server-ver15#sql-version-compatibility.
2. Copy the JDBC JAR file to the lib directory of the Tomcat installation: (<TOMCAT_HOME>/lib).
3. Restart the Tomcat server to load the JDBC driver to make it available for ThingWorx.
Create Your DPM Database and Database User
Complete the following steps:
1. Create the login and password for your DPM database user in the master database. Follow the password complexity recommendations for your database.
For Windows:
a. Open the Query Editor of the Microsoft SQL Server Management Studio.
b. Use the following Transact-SQL commands:
CREATE LOGIN <dpmadmin> WITH PASSWORD = '<password>';
In the above command, replace <dpmadmin> and <password> with the login and password for your DPM database user.
For Linux:
a. Open the command prompt in the Linux client.
b. Use the following commands to create the login on the SQL Server:
sqlcmd –S <database-server-name> -U <sql-administrator-username> -P <sql-administrator-password> \
-Q "create login <dpmadmin> with password = '<dpmadmin-password>'" \
GO; \
exit
In the above commands, replace the <database-server-name> with your database server name, <sql-administrator-username> and <sql-administrator-password> with the SQL administrator user name and password, and <dpmadmin> and <dpmadmin-password> with the login and password for your DPM database user.
2. Create the Microsoft SQL Server (MSSQL) database that DPM will use.
For Windows:
a. Open the Query Editor of the Microsoft SQL Server Management Studio.
b. Use the following Transact-SQL commands:
CREATE DATABASE <dpmdb> COLLATE SQL_Latin1_General_CP1_CI_AS;
ALTER DATABASE <dpmdb> SET READ_COMMITTED_SNAPSHOT ON;
ALTER DATABASE <dpmdb> SET ALLOW_SNAPSHOT_ISOLATION ON;
ALTER DATABASE <dpmdb> SET ARITHABORT ON;
In the above commands, replace <dpmdb> with the name of your database.
For Linux:
a. Open the command prompt in the Linux client.
b. Use the following commands to create the SQL Server database, replacing the variables with the database server name and the SQL administrator user name and password:
sqlcmd –S <database-server-name> \
-U <sql-administrator-username> -P <sql-administrator-password> \
-Q "create database <dpmdb> COLLATE SQL_Latin1_General_CP1_CI_AS; ALTER DATABASE <dpmdb> SET READ_COMMITTED_SNAPSHOT ON; ALTER DATABASE <dpmdb> SET ALLOW_SNAPSHOT_ISOLATION ON;ALTER DATABASE <dpmdb> SET ARITHABORT ON"
In the above commands, replace the <database-server-name> with your database server name, <sql-administrator-username> and <sql-administrator-password> with the SQL administrator user name and password, and <dpmdb> with the name of your database.
3. Create a database user for the login created in step 1. Use the same name for the database user as was used for the login.
For Windows:
a. Open the Query Editor of the SQL Server Management Studio for the database that was created in step 2.
b. Use the following Transact-SQL commands:
CREATE USER <dpmadmin> FOR LOGIN <dpmadmin>;
ALTER ROLE [db_owner] ADD MEMBER <dpmadmin>;
In the above commands, replace <dpmadmin> with the name for the login that was created in step 1.
For Linux:
a. Open the command prompt in the Linux client.
b. Use the following commands to create a database user for your DPM database, replacing the variables with the database server name and the SQL administrator user name and password:
sqlcmd –S <database-server-name> \
-U <sql-administrator-username> -P <sql-administrator-password> \
-Q "use <dpmdb>; create user <dpmadmin> for login <dpmadmin>;ALTER ROLE [db_owner] ADD MEMBER <dpmadmin>"
In the above commands, replace <database-server-name> with your database server name, <sql-administrator-username> and <sql-administrator-password> with the SQL administrator user name and password, <dpmdb> with the name of your database, and <dpmadmin> with the name for the login that was created in step 1.
Deploy the DPM Solution Using Solution Central
* 
If you are deploying DPM on a ThingWorx HA system, it is recommended to take the cluster down to a single instance, install the extensions, and then scale the cluster back up. This will be more performant and will prevent eventual consistency issues since the new extensions will be loaded by each server as they start. For more information, see Managing ThingWorx Extensions in ThingWorx HA in the ThingWorx Help Center.
To deploy the DPM solution to your ThingWorx instance using Solution Central, a ThingWorx administrator must complete the following steps:
1. Ensure that your license is installed in ThingWorx Composer. For more information, see this Technical Support Article in the PTC Knowledge Base.
2. Set up Solution Central. For more information, see Getting Started with Using Solution Central in the Solution Central Help Center.
3. Register your ThingWorx instance in Solution Central. For more information, see Registering Your ThingWorx Instance in the Solution Central Help Center.
4. In ThingWorx Composer, navigate to Manage > Solution Central > PTC Solutions.
5. Select the checkbox next to Digital Performance Management and click One-Click Deploy. A window opens listing all of the extensions to be deployed as part of the DPM solution.
6. Click Deploy All.
The extensions are downloaded and installed. This may take several minutes. You will be notified when the process completes.
For more information, see the ThingWorx Solution Central Help Center.
Run the InitializeSolution Service
Run the InitializeSolution service to configure the database Thing to connect to your DPM database, create database tables, and register the manager Things for the building blocks that make up DPM.
To run the service, a ThingWorx administrator must complete the following steps:
1. In ThingWorx Composer, navigate to the PTC.Base.Manager Thing.
2. Get the configuration parameters:
a. Under Services, find and execute the GetSolutionDeploymentConfigurationParameters service. The service output is a JSON containing the configuration parameters needed for the InitializeSolution service, dynamically based on the set of building blocks that are present. The service output JSON is similar to the following:
{
"databaseUser": {
"types": [
"STRING"
],
"description": "Name of the database user used for DPM database Thing",
"optional": false
},
"overrideComponentDeploymentState": {
"types": [
"BOOLEAN"
],
"description": "If true, the current component deployment state is ignored and the DeployComponent service will be rerun.",
"optional": true
},
"databasePassword": {
"types": [
"STRING"
],
"description": "Password of the database user used for DPM database Thing",
"optional": false
},
"databaseJDBCString": {
"types": [
"STRING"
],
"description": "JDBC Connection String for the DPM database Thing",
"optional": false
},
"databaseThing": {
"types": [
"STRING"
],
"description": "The default database thing (PTC.DBConnection.SQLThingDatabase)",
"optional": true
}
}
b. Copy the JSON returned in the service output and paste into a text editor.
c. Edit the JSON, replacing the content between the braces for each configuration parameter with the value specific to your site.
databaseUser—The login name of the database user with system administration rights.
databasePassword—The login password for the database user with system administration rights.
databaseJDBCString—The JDBC connection string for the DPM database.
databaseThing—The default database Thing (PTC.DBConnection.SQLThingDatabase).
The following is an example of the edited JSON:
{
"databaseUser": "<dpmadmin>",
"databasePassword": "<password>",
"databaseJDBCString": "jdbc:sqlserver://<databaseHost>:<databasePort>;databaseName=<DPMdatabaseName>",
"databaseThing": "PTC.DBConnection.SQLThingDatabase"
}
The following is an example of the edited JSON with actual values:
{
"databaseUser": "DPMadmin",
"databasePassword": "945DaTaBase!39525",
"databaseJDBCString": "jdbc:sqlserver://localhost:1433;databaseName=dpmdb",
"databaseThing": "PTC.DBConnection.SQLThingDatabase"
}
3. Under Services, find and execute the InitializeSolution service, using the edited JSON from step 2.c as the deploymentConfig input parameter for the service.
When the service completes, the output displays an infotable listing the building blocks that were deployed and their configuration status: Configured, Not Configured, or Error. If any building blocks have an Error or Not Configured status, complete the following troubleshooting steps:
a. Ensure that the database credentials that are specified in the JSON are valid, then execute the InitializeSolution service.
b. If any building blocks still have an Error or Not Configured status in the service output, review the ThingWorx Application and Script error logs and address any errors found there. Then execute the InitializeSolution service.
c. If any building blocks still have an Error or Not Configured status in the service output, update the JSON to include the following and execute the InitializeSolution service:
"overrideComponentDeploymentState": true
Run the SetAnalyticsServerPrefix Service
* 
Perform this action if you will use the Time Loss Analytics functionality within DPM.
Run the SetAnalyticsServerPrefix service to connect the Time Loss Analytics functionality in DPM with the ThingWorx Analytics Server.
1. In ThingWorx Composer, navigate to the PTC.TimeLossImpl.Manager Thing.
2. Under Services, find and execute the SetAnalyticsServerPrefix service.
3. For the analyticsServerPrefix input parameter, enter the name of the Analytics Server Thing that was created during the Analytics Server installation. This is the Thing which implements the AnalyticsGateway Thing Template.
4. Click Execute.
Set Environment Variable to Enable Localization for Analytics Server
* 
Perform this action if you will use the Time Loss Analytics functionality within DPM.
Set the locale.token.prefix environment variable for the localization of the Time Loss Analytics functionality in DPM.
1. In the installation directory where your ThingWorx Analytics Server is installed, navigate to the config folder and open the system-environment-variables.properties file with any text editor.
2. Add the following line to the file:
locale.token.prefix=PTC.TimeLossAnalysis.
* 
system-environment-variables.properties
The period at the end of TimeLossAnalysis. must be included.
3. Save and close the system-environment-variables.properties file.
4. Restart your ThingWorx Analytics Server.
Was this helpful?