Skip to content

The Replicator Service

The Replicator Service does the replication: it runs snapshots and baselines, applies incremental changes, runs schedules and answers the Data Replicator Manager. Nothing replicates while it's stopped; closing the Data Replicator Manager doesn't stop it. This page covers Windows; for the Docker container, see SQDR on Docker.

The Windows service

Service name SQDRSVC
Display name StarQuest Data Replicator
Program C:\Program Files\StarQuest\SQDR\sqdrsvc.exe
Configuration file C:\ProgramData\StarQuest\SQDR\sqdr.properties (the control database connection and the listener addresses)
Service log C:\Users\Public\Documents\StarQuest\SQDR\Logs\sqdrsvc_service.log; see Logs
Crash reports C:\Users\Public\Documents\StarQuest\SQDR\CrashDumps

Ports

Port Used by Listens on, by default
7737 The Data Replicator Manager All network interfaces
7738 The SQDR PowerShell cmdlets This computer only (127.0.0.1)

To manage the service from another computer, allow port 7737 through the firewall from the computer that runs the Data Replicator Manager. To run PowerShell cmdlets from another computer, the service must also listen on 7738 on a network interface. The addresses are the grpcADDRPORT and grpcTransADDRPORT service properties; a change takes effect when the service restarts.

Start and stop the service

The service normally starts with Windows and after an installation or upgrade. Start and stop it like any Windows service:

  • in Services (services.msc): StarQuest Data Replicator;
  • in PowerShell, as an administrator: Start-Service SQDRSVC, Stop-Service SQDRSVC, Restart-Service SQDRSVC;
  • at a command prompt, as an administrator: sc start SQDRSVC, sc stop SQDRSVC;
  • from another computer, as a user in the server's local Administrators group: sc \\<server> start SQDRSVC (or stop), or in Windows PowerShell Get-Service -ComputerName <server> -Name SQDRSVC | Start-Service. The server's Windows Firewall must allow the three predefined Remote Service Management rules (NP-In, RPC and RPC-EPMAP).

When it stops:

  • Snapshots and baselines in progress are cancelled. With Checkpoint/Restart, they continue from their last checkpoint when run again.
  • Incremental groups stop applying changes until the service runs again.
  • Scheduled runs don't happen.

The control database must be available when the service starts: if it's on this computer, its SQL Server or Db2 service must be running first. If the service doesn't start, see Replicator service does not start (permissions), Service Control Manager error 7000: SQDRSVC could not log on and SQDRSVC error 1010 or 2012: cannot access the control database.

Back up the configuration

Everything you configure is in the control database. To be able to rebuild the service, keep:

  1. Backups of the control database, made with the database's tools; see Back up the control database.
  2. A copy of sqdr.properties (C:\ProgramData\StarQuest\SQDR), which tells the service where its control database is.
  3. A copy of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\StarQuest\SQDRSVC.
  4. Your license keys, and a note of the ODBC data sources and drivers your sources and destinations use: they're set up on the computer, not in the control database.

To restore, reinstall the Replicator Service if needed, restore the control database, put back sqdr.properties (or run the SQDR Configuration Tool and choose the existing control database), and start the service.

To copy individual subscriptions between services, export and import them with the PowerShell cmdlets.

Move the service to another computer

  1. Back up the configuration and stop the service on the old computer. Set its startup type to Disabled, so that only one service works with the control database.
  2. Install the Replicator Service on the new computer, with the ODBC drivers and data sources your sources and destinations need.
  3. License it. Licenses are tied to the computer, so you may need to transfer them; see Move or transfer a license.
  4. Connect it to the control database: if the control database stays where it is, run the SQDR Configuration Tool and choose the existing control database and tables; to move the control database too, see Move the control database.
  5. Start the service and add it to the Data Replicator Manager with Connect To Service.
  6. If sources send change data notifications to the old computer's address, change the notification address in their source properties.
  7. Check that the incremental groups are running, then remove the old service from the server list.

Manage several services

One Data Replicator Manager can manage any number of Replicator Services, on Windows or in containers. Each has its own control database and settings; the Data Replicator Manager only shows them side by side.