Installing QPR ProcessAnalyzer Server on Windows: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="border:1px solid #dfdfdf;padding:0.5em 1em 0.5em 1em;background-color:#E7EAEC;margin:10px 0px 0px 10px;">
<div style="border:1px solid #dfdfdf;padding:0.5em 1em 0.5em 1em;background-color:#E7EAEC;margin:10px 0px 0px 10px;">
This page contains instructions for a new QPR ProcessAnalyzer installation. If you are updating an existing installation, instead follow the [[Updating_QPR_ProcessAnalyzer_Server|update instructions]].
This page contains instructions for a new QPR ProcessAnalyzer installation on the Windows operating system. If you are updating an existing installation, instead follow the [[Updating_QPR_ProcessAnalyzer_Server|update instructions]].
</div>
</div>


Line 7: Line 7:
This page describes QPR ProcessAnalyzer Server installation. Go through the following installation steps:
This page describes QPR ProcessAnalyzer Server installation. Go through the following installation steps:
# Check that [[QPR_ProcessAnalyzer_System_Requirements#System_Requirements_for_QPR_ProcessAnalyzer_Server|System Requirements]] are fulfilled.
# Check that [[QPR_ProcessAnalyzer_System_Requirements#System_Requirements_for_QPR_ProcessAnalyzer_Server|System Requirements]] are fulfilled.
# [[#Create and Initialize Database|Setup SQL Server databases]].
# [[#Create Databases|Create SQL Server databases]].
# [[#Initialize Configuration Database|Initialize configuration database]].
# [[#Install IIS Server Roles and Features|Install Roles and Features for IIS]].
# [[#Install IIS Server Roles and Features|Install Roles and Features for IIS]].
# [[#Install .Net 6 Runtime|Install .Net Runtime]].
# [[#Install .Net Runtime|Install .Net Runtime]].
# [[#IIS_Configuration|Configure IIS]] for QPR ProcessAnalyzer.
# [[#IIS_Configuration|Configure IIS]] for QPR ProcessAnalyzer.
# [[Server_settings_in_appsettings.json|Configure appsettings.json]].
# [[Server_settings_in_appsettings.json|Configure appsettings.json]].
Line 18: Line 19:
# If using Snowflake processing, install the Snowflake ODBC driver and set the ''SnowflakeConnectionString'' setting. For more information, see [[Snowflake Connection Configuration|Snowflake Connection Configuration]].
# If using Snowflake processing, install the Snowflake ODBC driver and set the ''SnowflakeConnectionString'' setting. For more information, see [[Snowflake Connection Configuration|Snowflake Connection Configuration]].


== Create and Initialize Database ==
== Create Databases ==
QPR ProcessAnalyzer needs the following three SQL Server databases:
QPR ProcessAnalyzer uses the following three SQL Server databases (only the ''configuration database'' is mandatory):
* '''Metadata database''' for storing system objects, such as projects, scripts, users and usage logs. Usually this database doesn't require much storage space, and queries to the database are lightweight, but still low latency in query performance is beneficial (i.e., prefer low latency over high data throughput in the storage hardware). Connection string to this database is set in the [[#Server_settings_file_.28appsettings.json.29|appsettings.json file]].
* '''Configuration database''' for storing system objects, such as projects, scripts, users and usage logs. This database needs to be initialized before it can be used (see more below). Usually this database doesn't require much storage space, and queries to the database are lightweight, but still low latency in query performance is beneficial (i.e., prefer low latency over high data throughput in the storage hardware). Connection string to this database is set in the [[Server_settings_in_appsettings.json|appsettings.json file]].
* '''Datatables database''' for storing data for the datatables, containing events and cases in the models and also data processed by ETL. Required storage space for this database depends on how much data is stored to the datatables. Queries to this database are heavy and data intensive, but usually low latency doesn't provide benefits (i.e., prefer high data throughput over low latency in the storage hardware). Connection string to this database will be set in the [[PA_Configuration_database_table#General_Settings|configuration table]] (key ''SqlServerConnectionString'').
* '''Datatables database''' for storing data for the datatables, containing events and cases in the process mining models and also data processed by ETL. This database can be initially empty, so it doesn't require any initialization. Required storage space for this database depends on how much data is stored to the datatables. Queries to this database are heavy and data intensive, but usually low latency doesn't provide benefits (i.e., prefer high data throughput over low latency in the storage hardware). Connection string to this database will be set in the [[PA_Configuration_database_table#General_Settings|configuration table]] (key ''SqlServerConnectionString'').
* '''Sandbox database''' for running scripts written using SQL. This database is primarily needed for the SQL query processing where only temporary objects are stored, and thus the ''tempdb'' performance has a critical role. It's also possible to configure the sandbox database to permanently store database objects, and in that case also this database requires space for storage.
* '''Sandbox database''' for running scripts written with SQL. This database is primarily needed for the SQL query processing where only temporary objects are stored, and thus the ''tempdb'' performance has a critical role. It's also possible to configure the sandbox database to permanently store database objects, and in that case also this database requires space for storage. Setup of the ''sandbox database'' is instructed in the section [[Setting_up_Scripting_Sandbox|Scripting Sandbox]].


It's possible to connect to the SQL Server either using Windows authentication (Windows account) or SQL Server authentication.
It's possible to connect to the SQL Server either using Windows authentication (Windows account) or SQL Server authentication.


Follow these steps to create and initialize the ''metadata database'':
== Initialize Configuration Database ==
 
Follow these steps to create and initialize the ''configuration database'':
# Open '''SQL Server Management Studio''' and create a new database. You can use name '''QPR_ProcessAnalyzer'''. You must select '''<default>''' for the collation, so that the database collation will be same as the server collation. This is because QPR ProcessAnalyzer also uses the tempdb (which is using server collation), the collations between the QPR ProcessAnalyzer database and tempdb need to match.
# Open '''SQL Server Management Studio''' and create a new database. You can use name '''QPR_ProcessAnalyzer'''. You must select '''<default>''' for the collation, so that the database collation will be same as the server collation. This is because QPR ProcessAnalyzer also uses the tempdb (which is using server collation), the collations between the QPR ProcessAnalyzer database and tempdb need to match.
# Create a login in '''Security''' > '''Logins''' > '''New Login...'''.
# Create a login in '''Security''' > '''Logins''' > '''New Login...'''.
Line 32: Line 35:
# Run database setup script '''initializedb.sql''' available in the QPR ProcessAnalyzer Server release package. This script creates the database tables, primary and foreign keys, indexes and default configuration data. In addition, it takes into use ''snapshot isolation'' (https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/snapshot-isolation-in-sql-server) and ''simple recovery model'' (https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server).
# Run database setup script '''initializedb.sql''' available in the QPR ProcessAnalyzer Server release package. This script creates the database tables, primary and foreign keys, indexes and default configuration data. In addition, it takes into use ''snapshot isolation'' (https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/snapshot-isolation-in-sql-server) and ''simple recovery model'' (https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server).
# Implement scheduled maintenance tasks for the database according to SQL Server best practices, e.g. backups and regular defragmenting of indexes.
# Implement scheduled maintenance tasks for the database according to SQL Server best practices, e.g. backups and regular defragmenting of indexes.
# Follow above steps for the ''datatables database'', except the step 4 is not applied because the datatables database is initially empty. As an example, you can use database name '''QPR_ProcessAnalyzer_datatables'''.
# Follow above steps for the ''datatables database'', except the step 4 is not applied because the datatables database is initially empty. As an example, you can use database name '''QPR_ProcessAnalyzer_datatables'''.
 
Setup of the ''sandbox database'' is instructed in section [[Setting_up_Scripting_Sandbox|Scripting Sandbox]].


== Install IIS Server Roles and Features ==
== Install IIS Server Roles and Features ==
Line 71: Line 72:
# Go to '''Sites''' and find the web site for QPR ProcessAnalyzer. Select the previously created QPRPA directory and select '''Convert to Application'''. In the dialog, select the previously created application pool and also select '''Enable Preload'''.
# Go to '''Sites''' and find the web site for QPR ProcessAnalyzer. Select the previously created QPRPA directory and select '''Convert to Application'''. In the dialog, select the previously created application pool and also select '''Enable Preload'''.
# Set an '''https''' binding to the IIS web site (click in '''Edit Bindings...'''), unless using QPR ProcessAnalyzer through a load-balancer terminating the https connection.
# Set an '''https''' binding to the IIS web site (click in '''Edit Bindings...'''), unless using QPR ProcessAnalyzer through a load-balancer terminating the https connection.
# Create a directory '''C:\ProgramData\QPR Software\QPR ProcessAnalyzer\Logs\''' for log files. Note that this directory will be later set to the [[#Server_settings_file_.28appsettings.json.29|appsettings.json]] file.
# Create a directory '''C:\ProgramData\QPR Software\QPR ProcessAnalyzer\Logs\''' for log files. Note that this directory will be later set to the [[Server_settings_in_appsettings.json|appsettings.json]] file.


=== Set Application Pool Always Running ===
=== Set Application Pool Always Running ===
Line 118: Line 119:


More information about IIS Application Pool Pinging: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc725836(v=ws.10)
More information about IIS Application Pool Pinging: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc725836(v=ws.10)
== Logging Settings ==
QPR ProcessAnalyzer uses log4net component (https://logging.apache.org/log4net/) for writing logs, which allows flexibly define how logging behaves. For example, the following settings can be set in the '''log4net.config''' file (located in the '''bin''' folder in the server application files):
* log4net > appender > '''maximumFileSize''': Maximum size of the log file. When the maximum size is reached, the log writing continues in a new file, and the old file is archived. The default setting is 100MB. (https://logging.apache.org/log4net/log4net-1.2.13/release/sdk/log4net.Appender.RollingFileAppender.MaximumFileSize.html)
* log4net > appender > '''maxSizeRollBackups''': Maximum number of archived log files that are stored. When the maximum file size is reached and new file is created, the oldest archived log file is removed if the maximum number of archived files is reached. The default setting is 1. (http://logging.apache.org/log4net/log4net-1.2.15/release/sdk/html/P_log4net_Appender_RollingFileAppender_MaxSizeRollBackups.htm)
* log4net > appender > '''lockingModel''': By default, the server log works in the ''ExclusiveLock'' mode, i.e. the log file is reserved by the QPR ProcessAnalyzer process for the entire time QPR ProcessAnalyzer is running. Thus it's not possible to edit or delete log files during that time.


== Installing SAP NetWeaver RFC Library ==
== Installing SAP NetWeaver RFC Library ==

Latest revision as of 00:29, 23 November 2025

This page contains instructions for a new QPR ProcessAnalyzer installation on the Windows operating system. If you are updating an existing installation, instead follow the update instructions.


Introduction

This page describes QPR ProcessAnalyzer Server installation. Go through the following installation steps:

  1. Check that System Requirements are fulfilled.
  2. Create SQL Server databases.
  3. Initialize configuration database.
  4. Install Roles and Features for IIS.
  5. Install .Net Runtime.
  6. Configure IIS for QPR ProcessAnalyzer.
  7. Configure appsettings.json.
  8. Go through the environment settings stored to the PA_Configuration table and set them if needed.
  9. If using SAP data import, install SAP NetWeaver RFC Library.
  10. Setup the Scripting Sandbox.
  11. Activate QPR ProcessAnalyzer server license. The activation occurs online automatically during the server startup if internet is available. If not, the activation needs to be done manually using the Activation Utility).
  12. If using Snowflake processing, install the Snowflake ODBC driver and set the SnowflakeConnectionString setting. For more information, see Snowflake Connection Configuration.

Create Databases

QPR ProcessAnalyzer uses the following three SQL Server databases (only the configuration database is mandatory):

  • Configuration database for storing system objects, such as projects, scripts, users and usage logs. This database needs to be initialized before it can be used (see more below). Usually this database doesn't require much storage space, and queries to the database are lightweight, but still low latency in query performance is beneficial (i.e., prefer low latency over high data throughput in the storage hardware). Connection string to this database is set in the appsettings.json file.
  • Datatables database for storing data for the datatables, containing events and cases in the process mining models and also data processed by ETL. This database can be initially empty, so it doesn't require any initialization. Required storage space for this database depends on how much data is stored to the datatables. Queries to this database are heavy and data intensive, but usually low latency doesn't provide benefits (i.e., prefer high data throughput over low latency in the storage hardware). Connection string to this database will be set in the configuration table (key SqlServerConnectionString).
  • Sandbox database for running scripts written with SQL. This database is primarily needed for the SQL query processing where only temporary objects are stored, and thus the tempdb performance has a critical role. It's also possible to configure the sandbox database to permanently store database objects, and in that case also this database requires space for storage. Setup of the sandbox database is instructed in the section Scripting Sandbox.

It's possible to connect to the SQL Server either using Windows authentication (Windows account) or SQL Server authentication.

Initialize Configuration Database

Follow these steps to create and initialize the configuration database:

  1. Open SQL Server Management Studio and create a new database. You can use name QPR_ProcessAnalyzer. You must select <default> for the collation, so that the database collation will be same as the server collation. This is because QPR ProcessAnalyzer also uses the tempdb (which is using server collation), the collations between the QPR ProcessAnalyzer database and tempdb need to match.
  2. Create a login in Security > Logins > New Login....
  3. In the User Mapping tab, assign the login to the QPR ProcessAnalyzer database. For an easy setup to get started with, check the db_owner role. For production use, the hardened configuration need to be set.
  4. Run database setup script initializedb.sql available in the QPR ProcessAnalyzer Server release package. This script creates the database tables, primary and foreign keys, indexes and default configuration data. In addition, it takes into use snapshot isolation (https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/snapshot-isolation-in-sql-server) and simple recovery model (https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server).
  5. Implement scheduled maintenance tasks for the database according to SQL Server best practices, e.g. backups and regular defragmenting of indexes.
  6. Follow above steps for the datatables database, except the step 4 is not applied because the datatables database is initially empty. As an example, you can use database name QPR_ProcessAnalyzer_datatables.

Install IIS Server Roles and Features

The following Windows Server Roles and Features should be enabled:

  1. On the taskbar, click Server Manager and click the Manage menu, and then click Add Roles and Features.
  2. In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.
  3. In the Server Roles section, select the following components:
    • Internet Information Services / Web Management Tools: IIS Management Console
    • Internet Information Services / World Wide Web Services / Application Development Features: .Net Extensibility 4.8, Application Initialization, ASP.NET 4.8, ISAPI Extensions, ISAPI Filters
    • Internet Information Services / World Wide Web Services / Common HTTP Features: Default Document, Static Content (note: please do not install WebDAV Publishing because its handler mappings are not directly compatible with QPR ProcessAnalyzer)
    • Internet Information Services / World Wide Web Services / Health and Diagnostics: HTTP Logging
    • Internet Information Services / World Wide Web Services / Performance Features: Static Content Compression
    • Internet Information Services / World Wide Web Services / Security: Request Filtering
  4. In the Features section, select the following components:
    • .Net Framework 4.8 Advanced Services: ASP.NET 4.8
  5. On the Confirm installation selections page, click Install.
  6. On the Results page, click Close.

Install .Net Runtime

QPR ProcessAnalyzer Server requires the .Net 8 runtime. Install .Net as follows:

  1. Go to https://dotnet.microsoft.com/en-us/download/dotnet/8.0, and download the latest release of the package Hosting Bundle for Windows (in the ASP.NET Core Runtime section).
  2. Install the downloaded components to the QPR ProcessAnalyzer Server computer.

IIS Configuration

Here are the required IIS configurations for QPR ProcessAnalyzer Server.

Configure HTTPS connection

QPR ProcessAnalyzer requires HTTPS/TLS connection. The required certificate can be set to IIS or load balancer (if using it). QPR ProcessAnalyzer can temporarily be used with HTTP but it requires to remove the Strict-Transport-Security header.

Create IIS Application and Application Pool

The steps assume that the QPR ProcessAnalyzer is set up to the IIS Default Web Site.

  1. Download QPR ProcessAnalyzer Server package available in the downloads page.
  2. Create a directory C:\inetpub\wwwroot\QPRPA\.
  3. Copy the contents of the QPRProcessAnalyzerServer folder (previously named as Service) (but not the folder itself) from the package into the previously created directory.
  4. In the IIS Management Console, create an application pool named QPRPA (in Application Pools -> Add Application Pool...). Set .NET CLR Version to No Managed Code and select the Start application pool immediately.
  5. Go to Sites and find the web site for QPR ProcessAnalyzer. Select the previously created QPRPA directory and select Convert to Application. In the dialog, select the previously created application pool and also select Enable Preload.
  6. Set an https binding to the IIS web site (click in Edit Bindings...), unless using QPR ProcessAnalyzer through a load-balancer terminating the https connection.
  7. Create a directory C:\ProgramData\QPR Software\QPR ProcessAnalyzer\Logs\ for log files. Note that this directory will be later set to the appsettings.json file.

Set Application Pool Always Running

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Select QPR ProcessAnalyzer application pool and click Advanced Settings....
  3. Set (General) > Start Mode to AlwaysRunning. Click OK.

Enable Application Preloading

  1. Open Internet Information Services (IIS) Manager and in the left side hierarchy under Sites select the QPR ProcessAnalyzer application.
  2. Click Advanced Settings... on the right pane.
  3. Set Preload Enabled to True. Click OK.

Disable Application Pool Idle Timeout

When the IIS application pool that runs QPR ProcessAnalyzer Server shuts down, all loaded models are dropped and script running is stopped. By default, idle application pools (i.e. QPR ProcessAnalyzer hasn't been used for some time) are shut down automatically after a certain time. To disable application pool idle timeout:

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Locate QPR ProcessAnalyzer application pool, select it and click Advanced Settings....
  3. Set Process Model -> Idle Time-out (minutes) to 0. Click OK.

Disable Application Pool Regular Recycling

When the IIS application pool that runs QPR ProcessAnalyzer Server shuts down, all loaded models are dropped and script running is stopped. By default, application pools are restarted (recycled) regularly. To disable application pool regular recycling:

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Locate QPR ProcessAnalyzer application pool, select it and click Advanced Settings....
  3. Set Recycling -> Regular Time Intervals (minutes) to 0. Click OK.

Disable Application Pool Overlapping Recycle

If using regular application pool recycling, e.g. at specific times, it's recommended to disable the overlapping recycles. When using overlapping recycles, a new instance is started before shutting down the previous, which will take much more memory. Disable the overlapping recycling as follows:

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Locate QPR ProcessAnalyzer application pool, select it and click Advanced Settings....
  3. Set Recycling -> Disable Overlapping Recycle to True. Click OK.

IIS Application Pool User Profile Loading

To enable user profile loading:

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Click QPR ProcessAnalyzer application pool and click Advanced Settings....
  3. Set Process Model > Load User Profile to True. Click OK.

The user profile loading allow access to their cryptographic store and environment variables (such as %TEMP%). Additional information can be found from Compatibility Issues with Application Pool Identities.

Disable Application Pool Pinging

Application pool pinging is a mechanism in IIS to monitor that applications are responding normally. In QPR ProcessAnalyzer, application pool pinging may cause issues when there are long running analysis calculations, because during them the application pool might not respond to a ping. As a result, IIS shuts down QPR ProcessAnalyzer application pool (that IIS considers unhealthy), and models are dropped from the memory which degrades performance.

To disable application pool pinging:

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Locate QPR ProcessAnalyzer application pool, select it and click Advanced Settings....
  3. Set Ping Enabled to False. Click OK.

More information about IIS Application Pool Pinging: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc725836(v=ws.10)

Installing SAP NetWeaver RFC Library

Extracting data from SAP using the SAP RFC interface requires SAP NetWeaver RFC Library 7.50 which can be installed with the following steps:

  1. Microsoft Visual C++ Redistributable Package 2013 is required and can be downloaded from https://support.microsoft.com/en-us/topic/update-for-visual-c-2013-redistributable-package-d8ccd6a5-4e26-c290-517b-8da6cfdf4f10. Restart the computer after the Microsoft Visual C++ Redistributable Package installation.
  2. For storing the SAP NetWeaver RFC Library dll files, create folder C:\SapNwRfcLib (you may also use another location, but do not store the files in the same place as the QPR ProcessAnalyzer Server application files).
  3. Download and extract SAP NetWeaver RFC Library 7.50 package by following the instructions in https://launchpad.support.sap.com/#/notes/2573790 (SAP login credentials and permissions needed).
  4. In the extracted files, go to folder nwrfcsdk\lib, and copy all .dll files to the folder C:\SapNwRfcLib.
  5. Make sure that the dll files are not in the blocked state as follows: Open the each dll files Properties and in the General tab in the Security section, check the Unblocked checkbox (if that checkbox exists). (Downloaded files may be blocked by default by Windows, preventing their code from executing.)
  6. Make sure that the user account running the IIS application pool for QPR ProcessAnalyzer Server has read access to the folder C:\SapNwRfcLib.
  7. Include the folder C:\SapNwRfcLib to the Windows PATH environment variable (more information: https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them).