Getting Started with DPM > Deploying DPM > Deploying DPM on a Customer-Owned System or Cloud > Deploying DPM Using the PTC Software Downloads Page
Deploying DPM Using the PTC Software Downloads Page
In this scenario, your database and ThingWorx are installed on your system and you deploy DPM to your ThingWorx instance by downloading the solution from the PTC Software Downloads page and importing the extension package into ThingWorx.
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 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.
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.
Apply your DPM license. For more information, see Licensing for ThingWorx Platform in the ThingWorx 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.
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 1200.
If the option is not already present, add it to the BasicSettings section, as follows: "ScriptTimeout": 1200
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 : 1200 seconds. Timeout configured for 1200 seconds.]
For more information, see platform-settings.json Configuration Details in the ThingWorx Help Center.
Update the Session Timeout Settings
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, using the Transact-SQL command in the Query Editor of the Microsoft SQL Server Management Studio:
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:
1. Open the command prompt in the Linux client.
2. 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, using the Transact-SQL commands in the Query Editor of the Microsoft SQL Server Management Studio:
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:
1. Open the command prompt in the Linux client.
2. 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 command, 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, using the Transact-SQL command in the Query Editor of the SQL Server Management Studio opened for the database that was created in step 2:
CREATE USER <dpmadmin> FOR LOGIN <dpmadmin>;
ALTER ROLE [db_owner] ADD MEMBER <dpmadmin>;
In the above command, replace <dpmadmin> with the name for the login that was created in step 1.
For Linux:
1. Open the command prompt in the Linux client.
2. 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.
Download the DPM Solution Using the Software Downloads Page
Complete the following steps:
1. Navigate to the PTC Software Download page at the following URL: https://support.ptc.com/appserver/auth/it/esd/index.jsp.
2. Select ThingWorx Foundation.
3. Expand the following folders: ThingWorx Foundation > Release 9.3 > ThingWorx Digital Performance Management (DPM) 1.1 > Most Recent Datecode.
4. Download the DPM-1-1 extension package ZIP file.
Import the DPM Solution
To import the DPM solution, a ThingWorx administrator must complete the following steps:
1. Ensure that your DPM license is installed in ThingWorx Composer. For more information, see this Technical Support Article in the PTC Knowledge Base.
2. In ThingWorx Composer, navigate to Import/Export > Import.
3. On the Import window, select Extension from the Import Option list.
4. Under File name, click Browse. Navigate to and select the extension package ZIP file that you downloaded in the previous section.
5. Click Import. When the import finishes, click Close.
6. View the DPM solution extensions after import by navigating to Manage > Installed Extensions.
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
},
"twxAdminUserName": {
"types": [
"STRING"
],
"description": "Thingworx Admin Username",
"optional": false
},
"overrideComponentDeploymentState": {
"types": [
"BOOLEAN"
],
"description": "If true, the current component deployment state is ignored and the DeployComponent service will be rerun.",
"optional": true
},
"twxAdminPassword": {
"types": [
"STRING"
],
"description": "Thingworx Admin Password",
"optional": false
},
"databasePassword": {
"types": [
"STRING"
],
"description": "Password of the database user used for DPM database Thing",
"optional": false
},
"twxURL": {
"types": [
"STRING"
],
"description": "Thingworx URL",
"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.MSSQLDatabase)",
"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.
twxAdminUserName—The name of the ThingWorx administrator user.
twxAdminPassword—The password for the ThingWorx administrator user.
databasePassword—The login password for the database user with system administration rights.
databaseJDBCString—The JDBC connection string for the DPM database.
twxURL—The URL for your ThingWorx instance.
databaseThing—The default database Thing (PTC.DBConnection.MSSQLDatabase).
The following is an example of the edited JSON:
{
"databaseUser": "<dpmadmin>",
"twxAdminUserName": "Administrator",
"twxAdminPassword": "<twxadminpassword>",
"databasePassword": "<password>",
"databaseJDBCString": "jdbc:sqlserver://<databaseHost>:<databasePort>;databaseName=<DPMdatabaseName>",
"twxURL": "http://<host>:<port>/Thingworx",
"databaseThing": "PTC.DBConnection.MSSQLDatabase"
}
The following is an example of the edited JSON with actual values:
{
"databaseUser": "DPMadmin",
"twxAdminUserName": "Administrator",
"twxAdminPassword": "ThingWorx!DPM9876",
"databasePassword": "945DaTaBase!39525",
"databaseJDBCString": "jdbc:sqlserver://localhost:1433;databaseName=dpmdb",
"twxURL": "http://MyCompany.com:8080/Thingworx",
"databaseThing": "PTC.DBConnection.MSSQLDatabase"
}
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
Was this helpful?