Linux: Control Database

See the Quick Start Guide to using SQDR on Linux for the latest version of this topic, superseding the information below.

SQDR can use either a Db2 or SQL Server control database, which can be either remote or local.

For remote database, the appropriate ODBC driver (StarSQL or ODBC 17 or 28 driver for SQL Server) and network connectivity to the database is all that is needed on the Linux system.

For local database, install and configure local Db2 LUW 11.5.x or SQL Server and make sure the service is running. You will also need the appropriate ODBC drivers. Note that StarSQL is always required for Tier 3 to Tier 2 communication.

Create the database

Db2

* pre-existing SQDRC:

In a colocation scenario (where SQDR and SQDR Plus are running on the same system), SQDRC has already been created from a template during installation of SQDR Plus.

If the templates were created with an older version of Db2 (e.g. you are running Db2 11.5.7 but the templates were created with 11.5.5fp1), run

$ db2updv115 -d SQDRC

If necessary,

db2 grant dbadm on database to <user> (e.g. sqdr)

* if you need to create SQDRC:

on the system where Db2 is running:

db2 create database SQDRC on <location> dbpath on <location>

Use StarAdmin (local or remote) to bind packages

SQL Server

Use SSMS or SQL statement CREATE DATABASE to create the database (e.g. ControlDB)

Create the control tables

On a Windows system, install either the SQDR Data Replicator Manager package (plus StarSQL or ODBC 17/18 for SQL Server) or the full SQDR package.

If you are using a system with the full SQDR package and you are running SQDR, make a backup copy of C:\ProgramData\StarQuest\sqdr\sqdr.properties as it will be overwritten.

Run SQDR Config and connect to the Db2 or SQL Server that SQDR/Linux will be using.  If that database is local on the Windows machine, be sure to use a hostname or IP address rather than localhost, since the connectivity needs to work from Linux as well.

Select: Create new control tables.

Towards the end of the wizard, you will see either a dialog that (local) SQDR service will be stopped, or (remote) this error that can be ignored:

Cannot access Windows service properties

System error 1016: the specified service does not exist as an installed service

On completion, the control tables are created in the desired control database, and sqdr.properties (with connection info and encrypted password) is created.

If you performed this operation on a Windows system where you are running SQDRSVC, unclick the checkboxes to start drmgr & service and exit. After the next step, restore your original sqdr.properties and start the service.

Copy the newly-created sqdr.properties to /var/sqdr on the Linux system and start the SQDR service on Linux. If you are using a Db2 control database, you may need to add ICONV4UTF8=Y to the StarSQL connection string.