Move Stelo Capture to a new server¶
Use this page when you replace the Windows server that runs Stelo Capture (and Stelo Apply, when they share the server, as on the Stelo VM). The move keeps everything: the Capture Agents, their log positions and the changes they've staged, and the Replicator Service's sources, destinations and groups. No subscription needs a new baseline.
- What to plan first, and the mistakes to avoid, are in Migrations: move to another computer.
- To move only the Replicator Service, see Move the service to another computer.
- The procedure moves every agent at once. To move agents one at a time, move all the agents that share a staging database together, and ask Stelo Support how to move part of the list of agents.
Docker
In the Stelo Replicator container, the configuration and the databases are on the container's volumes (see Volumes). To move the container to another host, ask Stelo Support: the container's keys keep working there, but the license transfer needs Stelo's approval (see Move or transfer a license).
Before you start¶
- Same versions. Install the same versions of SQDR and Db2 for LUW (same major version) on the new server, and upgrade as a separate step before or after the move (see Change one thing at a time). To move to a newer Db2, see Look after the Db2 databases on the Stelo VM.
- Take an inventory of the old server (see Take an inventory first),
including:
- each agent's staging database and folder: the Home Directory column of the server's Agents tab, and the agent's controlDbUrl on its Configuration tab;
- agent properties set by hand, such as clientODBCString;
- the Db2 version and license (
db2levelanddb2licm -lin a Db2 command window), the Db2 instance name, and the drives that hold the databases and the logs; - the SQDR Control Center ports, if they aren't 8080 and 8443;
- the Db2 user of Stelo Capture (for example
sqdr) and its password, and the Windows accounts the services run as.
- Credentials: for Db2 for i sources, an IBM i user with the authority to run Update Host (see Update Host).
- Connectivity: check that the new server reaches every source and destination (firewalls, DNS, exit programs that restrict access), and have a way to copy large files (the backups) between the servers.
- Licenses: request the keys for the new server (see Move or transfer a license).
Prepare the new server¶
The old server keeps running while you do this.
- Create the Db2 user of Stelo Capture as a Windows user with the same name and the same password as on the old server (for a domain user, nothing to do). Give it a password that doesn't expire.
- Install Db2 for LUW (see Install Db2 for LUW) with the same instance
name, and apply your Db2 license:
db2licm -a <license file>. Plan the same drive letters for the databases and the logs (for exampleS:andL:). - Install Stelo Capture with the same settings as on the old server: the Db2 user, the SQDR Control Center ports,
the ProgramData folder and the drives (see Install SQDR). On the Stelo VM, let
it install SQDR too; to move Stelo Capture alone, you can skip SQDR. A fresh install also creates an empty
SQDRC, which you replace below. - Stelo VM: install the ODBC drivers your sources and destinations use, and create the same ODBC data sources, with the same names (see Install the ODBC drivers).
- Enter the licenses (see Licenses).
- Stop the SQDR Plus Launch Agent and SQDR Plus Jetty services and, on the Stelo VM, the Replicator Service
(
SQDRSVC). Leave them stopped until the restore is done.
Stop and back up the old server¶
- Stop replication: quiesce the Capture Agents, let the groups apply what's staged, pause the sources and stop the agents, as in The standard stop.
- Stop the services: the Replicator Service (
SQDRSVC), if it runs here or reads these staging databases, and the SQDR Plus Launch Agent (sqdr+capagent) and SQDR Plus Jetty (sqdr+jetty) services. Set them to Disabled, so they don't start again. - Check that nothing is connected: in a Db2 command window,
db2 list applicationsmust list no connection toSQDRCor the staging databases. -
Back up
SQDRCand every staging database, offline (repeat for eachSQDRPn):db2 deactivate db SQDRP0 db2 backup database SQDRP0 to C:\temp compress db2 deactivate db SQDRC db2 backup database SQDRC to C:\temp compressA staging database that has grown large takes a while to back up. For backups and restores in general, see Look after the Db2 databases on the Stelo VM.
-
Copy to the new server: the backup images; each agent folder
C:\ProgramData\StarQuest\sqdrplus\conf\agtN(zipped); and, for reference, the oldconf\node.propertiesandconf\sqagent.properties. On the Stelo VM, keep a copy ofC:\ProgramData\StarQuest\SQDR\sqdr.propertiesand of your changes to the shipped.jsonfiles (see Configuration files). Keep a copy of the wholeC:\ProgramData\StarQuest\sqdrplusfolder too.
Restore on the new server¶
-
Replace the empty SQDRC the installer created, then restore the databases (repeat the last line for each staging database):
db2 deactivate db SQDRC db2 drop db SQDRC db2 restore db SQDRC from C:\temp on S: dbpath on L: db2 restore db SQDRP0 from C:\temp on S: dbpath on L:If Db2 reports an authorization error, run the Db2 command window as a Db2 administrator (for example the account the Db2 installer created). If the new server runs a later Db2 fix pack or version, update the databases as described in Look after the Db2 databases on the Stelo VM.
-
Check that the Db2 user can connect to each database, for example
db2 connect to SQDRP0 user sqdr, thendb2 connect reset. - Put the agent folders back: copy each
agtNfolder intoC:\ProgramData\StarQuest\sqdrplus\conf. - Put the old key back: rename the new server's
conf\node.properties(keep it) and copy the old server'snode.propertiesin its place. - Put the old control database password back: in the new
conf\sqagent.properties(the Launch Agent's), replace the value ofpasswordwith the value ofpasswordin the old server's file. The installer encrypted the password with the new server's key, which you've just replaced. This works because the Db2 user has the same password on both servers. - Stelo VM: connect the Replicator Service to the restored control database: run the SQDR Configuration
Tool, choose
SQDRCand Use existing control tables (see Move the control database). Leave the Replicator Service stopped for now. If SQDR runs on another server but its control database isSQDRCon this server, run the SQDR Configuration Tool on that server instead, to point it at the new server.
Start and check¶
- Start the Stelo Capture services: SQDR Plus Jetty and SQDR Plus Launch Agent. Sign in to the SQDR Control Center and check that every agent is listed.
- When it starts, the Launch Agent checks the Java stored procedures in
SQDRCand each staging database, and replaces them if needed (see What the Stelo Capture upgrade changes). If an agent's log showsSQL4306N, see SQL4306N on SQDR.GETJARVERSION. - If the agents publish a fixed connection string: an agent whose clientODBCString names the old server must get the new server's name. Without that property, the agent publishes this computer's name by itself.
- Start each agent. As it starts, it writes the connection string of its staging database to
SQ_PROPERTIESon the source. Check the Diagnostics tab for errors. - Db2 for i: if the new server runs a newer Stelo Capture than the old one, stop each Db2 for i agent, run Update Host, and start it again.
- Start the Replicator Service (
SQDRSVC) and set it back to Automatic. In the Data Replicator Manager, connect to the new server (see Connect To Service) and check that the sources, destinations and groups are there; the incremental groups are paused. - Refresh each incremental source: on its Advanced tab, click Refresh in Incremental Replication, so the Replicator Service reads the new connection string. Agent then shows the new server.
- Resume one small group, check that it applies changes, then resume the others (see Verify after the cutover).
Keep the old server, with its services disabled, until the new one has run for a while.
If the ProgramData folder is on another drive on the new server (for example a cluster's shared drive), the agents' folders in the list must change too: ask Stelo Support.
What the move carries over¶
| What | Where it is | How it moves |
|---|---|---|
| Each Capture Agent's staged changes, subscriptions and log position | Its staging database (SQDRP0, SQDRP1, ...) |
Db2 backup and restore. |
| The list of Capture Agents and the Launch Agent's configuration and, on the Stelo VM, the Replicator Service's control tables | The control database SQDRC |
Db2 backup and restore. |
| Each agent's configuration file | The agent's folder C:\ProgramData\StarQuest\sqdrplus\conf\agtN |
Copy the folder. |
| The key that encrypts the stored passwords | node.properties in C:\ProgramData\StarQuest\sqdrplus\conf (and a copy in each agent folder) |
Copy the old server's file. The passwords stored in the agents' files and in SQDRC can only be read with it. |
| Where the Replicator Service's control database is | sqdr.properties in C:\ProgramData\StarQuest\SQDR |
Run the SQDR Configuration Tool on the new server. |
What doesn't move: Windows accounts, Db2 itself, ODBC drivers and data sources, licenses and firewall rules. You set those up on the new server first (see Prepare the new server).
If something goes wrong¶
The agents don't start, and the agent's wrapper.log has javax.crypto.BadPaddingException: Given final block not
properly padded. The stored passwords were encrypted with another key: the old server's node.properties, or the
old password value in the Launch Agent's sqagent.properties, wasn't put back (steps 4 and 5 of
Restore on the new server).
The Replicator Service keeps connecting to the old server. Refresh the source (step 7 of Start and check). See also Pitfalls seen in support.