How to run multiple Instances of the Cognite DB Extractor on the same VM [Cognite Official]

  • 25 February 2024
  • 1 reply
  • 65 views

Userlevel 3
Badge

1.0 Introduction

The purpose of this document is to show how  to install multiple instances of the Cognite DB Extractor as a Windows service, where each instance is using a different config.yml file.

 

2.0 Steps

2.1 Create a System DSN Entry for the MS SQL Server Database Used as the Source for the Extractors.

  1. Run the “ODBC Data Sources (32-bit)” program as an administrator.

 

  1. Click on the “System DSN” tab and click on the “Add” button to create a new SQL Server DSN.

 

  1. Use the wizard to name and configure the new System DSN entry.

 

  1. When finished with the configuration, click on the “Test Data Source” button to confirm the entry is working; the “Test Results” popup window shown to the right should open to confirm the test was completed successfully.

 

2.2 Installing the First Instance of the Windows Service

  1. Create the C:\Cognite\DBExtractor\extractor1 folder.

 

  1. Download the “dbextractor-winservice-v3.2.0.zip” file and extract the contents into the C:\Cognite\DBExtractor\extractor1 folder.

  2. Copy the first config.yml file into the C:\Cognite\DBExtractor1 folder.

  3. Open an elevated command prompt and run the command “dbextractor-winservice-v3.2.0-win32.exe install”.

  4. Close the command prompt window.

  5. Start the Registry Editor application.

  6. Navigate to the “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services” key and expanded the tree to find the “DBExtractor” entry.

  7. Right-clicked on the “DBExtractor” entry and selected the “Rename” menu option.

 

  1. Change the name to “DBExtractor1”.

  2. Reboot the server.

  3. Open an elevated command prompt and ran the command “sc config “DBExtractor1” displayname= “Cognite DB Extractor 1”.

  4. Reboot the server.

  5. Start the “Services” program to confirm the above changes were applied to the Cognite DB Extractor service.

  1. Complete the configuration of the service (e.g. Log On, Recovery, Startup type)

 

2.3 Installing the Second Instance of the Windows Service.

Follow the same 14 steps used to create the first service instance but with these changes:

  1. Used the folder C:\Cognite\DBExtractor\extractor2

  1. Use the same System DSN but in a different config.yml file directing data to a different FTDM project.

  2. Change the name of the service to “DBExtractor2”.

  3. Change the display name of the service to “Cognite DB Extractor 2”.

  4. Use a different domain account in this service’s “Log On” configuration because each service instance of a given extractor must use a different account.

2.4 Start the Services

  1. Start the service for DBExtractor1 to check whether the DBExtractor1 service is working properly.

 

  1. Stop the service for DBExtractor1.

  2. Start the service for DBExtractor2 to check whether the DBExtractor2 service is working properly.

  1. Stop the service for DBExtractor2.

  2. Start the service for DBExtractor1 again.

  3. Start the service for DBExtractor2 again while the service for DBExtractor1 is running.

Please make sure to use the below mentioned folder structure when running multiple Instances of DB extractors.

C:\Cognite\DBEXTRACTOR
├───extractor1
│ ├───config\config.yml
│ └───logs
| └───.exe
├───extractor2
│ ├───config\config.yml
│ └───logs
| └───.exe

 


1 reply

Userlevel 3
Badge

Special thanks to @Doug F for sharing the steps with the Support team.

Reply