StarQuest Technical Documents

Troubleshooting SQDR Usage Issues

Last Update: 24 September 2019
Product: StarQuest Data Replicator
Version: v4.50 and later
Article ID: SQV00DR027


This technical document describes some of the issues that may be encountered when using the StarQuest Data Replicator.

The following topics are covered:

Errors Creating Incremental Subscriptions with Criteria


Creating an incremental subscription with criteria fails with the following error:

Failed to add incremental subscription at Capture Agent for source table 'myschema.mytab'. Snapshot could not be started. Error: Stored procedure SQDR.ADDSUBSCRIPTION 04.20.20131218 returned error 11. RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: Failed to add subscription: DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=ID, DRIVER=3.66.46 SQLSTATE=42703


Place double quotes around the column names used in the critera e.g. WHERE "ZIP">89999 AND "ZIP"<95000.

Note: using criteria when configuring an incremental subscription from a Microsoft SQL Server source or from a DB2 for i source (where the tables are journaled with *AFTER images) is supported by SQDR 4.50 & later and SQDR Plus 4.50 & later.

Unexpected Invalid journaling/logging error

Issue: Running an incremental subscription results in the error below when these conditions are met:

  • Source DBMS is DB2 for i
    The source table is journaled with IMAGES(*AFTER)
    The source table contains either a Primary Key or a Unique Index

Failed to add incremental subscription at Capture Agent for source table '"MYLIB"."MYTAB"'. Snapshot could not be started. Error: Stored procedure SQDR.ADDSUBSCRIPTION 05.07.20190321 returned error 18. Invalid journaling/logging options

Solution: Incremental replication of a table journaled with IMAGES(*AFTER) must use RRN.

Go to the Columns tab of the subscription and select the checkbox Create target unique index using source table RRN, select OK to save the change, and run the subscription again.

Note that this checkbox is automatically selected (and enforced) when the source does not contain a primary key or a unique index.

Creating a Dump File

If you are experiencing problems such a hung subscription, StarQuest Support may request that you create a dump of the SQDRSVC.EXE process using Task Manager.

  1. Start Task Manager by right-clicking on the Taskbar and selecting Start Task Manager, or entering the command taskmgr. Note that if you are running the 32-bit version of SQDR on a 64-bit system, it may be necessary to start the 32-bit version of the Task Manager by running C:\Windows\SYSWOW64\taskmgr.exe.
  2. Select the Processes panel.
  3. Select the checkbox Show processes from all users.
  4. Locate the entry for the SQDRSVC.EXE process, select and right click, and select Create Dump File.
  5. The selection will produce a dialog with the exact location of the sqdrsvc.dmp file - e.g. C:\Users\myuser\AppData\Local\Temp. Locate the file and send a compressed copy to StarQuest.

Subscription Wizard: Unexpected list of tables (SQL Server source; incremental subscription)

Issue: A user created a Staging Agent for a SQL Server source using SQDR Control Center. That definition includes the database name of the SQL Server database, and creates a schema in that database called SQDR, containing some control tables and the stored procedure TableInfo().

Next, the user wished to create incremental subscriptions residing in a different database residing on the same SQL Server. He chose the second database when configuring the source in Data Replication Manager, but the table list in the Subscription Wizard continued to return a list of tables from the first database.

Solution: It is necessary to create an SQDR Plus Staging Agent for each SQL Server database. After creating and starting the second Staging Agent with SQDR Control Center, return to Data Replication Manager and either create a new Source or modify the existing Source; go to the Advanced Panel and select the appropriate value from the Capture Agent Schema dropdown. Now the Subscription Wizard will invoke TableInfo() from the correct database.

Destination Timeout

Issue: A subscription failed with the error:

Replication failed. The insert thread timed out waiting for a filled fetch buffer.

Solution: The problem was a resource wait on the destination SQL Server; the default timeout of 30 seconds was too short. Using Data Replicator Manager, right-click on the Service name and select Properties. Increase the MutliThread Timeout from the default of 30 seconds to 300 seconds.

Problems caused by SQL Server Auto_Close

Issue: If a SQL Server database being used by SQDR is configured for Auto_Close, problems may arise. This may occur when the SQL Server database is being used for any purpose: control database, source, or destination. In addition to slow performance, a typical error that has been seen is

[Microsoft][SQL Server Native Client 11.0][SQL Server] Database 'ControlDB' is being recovered. Waiting until recovery is finished.

Solution: Confirm that Auto_Close is enabled and disable it.

To identify SQL Server databases that are configured for Auto_Close, use one of the following methods:

  • The Application Event Log contains many informational messages that state Starting up database 'dbname'.

  • The following SQL statement will show whether Auto_Close is enabled for a particular database:
    SELECT DATABASEPROPERTY('dbname','IsAutoClose')

  • The following SQL statement will list all databases configured for Auto_Close:
    SELECT name, is_auto_close_on FROM master.sys.databases WHERE is_auto_close_on = 1

  • Using SQL Server Studio, right-click on a database, select Properties, and select the Options page. Note that you may need to use the scroll bar to view the beginning of the Options list.

To disable Auto_Close, use one of the following methods:

  • Using SQL Server Studio, change the value of Auto Close to False.
  • Issue the following SQL statement:

"value of a host variable too large" error

Issue: When replicating from a non-Unicode database to a UTF-8 target, you may encounter the following error for certain data:

ODBC message: SQLSTATE 22001, native error -302,
[StarSQL][StarSQL ODBC Driver][DB2 Universal DataBase]The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use.

Solution: This error may occur when some characters are converted into multi-byte characters and the size of the target table's character columns is inadequate. Modify the subscription and increase the size of the affected columns on the target table. You can use the Character data destination precision heuristic to specify an inflation percentage; see the SQDR Help for the Service Properties Subscription (Wizard) Tab.

Incremental Group failing with Bad IP address error

Issue: An incremental group is failing with the following error:

Failed to enable Change Data Notification for incremental group 'MYGROUP'. Error: Bad IP address: N.N.N.N:2728 (Winsock bind returned error. System error 10049: The requested address is not valid in its context. )

Solution: This error can occur if the IP address of the system has changed since the incremental group was created; for instance, you are using DHCP rather than a static IP address.

  1. Select the Source associated with your subscriptions, right click and select Pause. This will pause all the IR Groups for the source.
  2. Select the same source, right click and select Properties... and select the Advanced panel.
  3. Select a valid IP address from the dropdown field for IP addresses associated with the notification address and click OK. If both SQDR Plus and SQDR (tiers 2 and 3) are installed on the same machine, we recommend using
  4. Right click on the Source and select Resume. All your IR groups should resume normally.

DB2 Connect and LOB Data

If you choose to use the IBM DB2 ODBC driver (DB2 Connect) to connect to a DB2 source or destination and plan to replicate LOB data, create a DB2 Connect ODBC data source, add the LONGDATACOMPAT parameter from the Advanced Settings tab of the CLI/ODBC Settings and set this value to “As LONGVAR data”. Set the Maximum LOB column size value if desired, or accept the default value

Accessing Informix using IBM DB2 ODBC Driver through StarPipes or through DB2 LUW

SQDR can connect to Informix databases using either the IBM Informix ODBC driver, the IBM DB2 ODBC driver, or the SQDR-bundled ODBC driver. Each of these drivers have advantages and disadvantages. In most cases, the IBM Informix ODBC driver is recommended.

However, an advantage of the IBM DB2 ODBC driver is that it uses the DRDA protocol to communicate with Informix, and thus can communicate through a StarPipes Gateway or through an intermediate DB2 LUW system acting as gateway.

To use StarPipes as a gateway, create a route to the Informix system in the StarPipes configuration e.g. RDB name=ifxdb, Host name=ifxserv, Port 9089, and configure SQDR to connect to the Informix database through StarPipes using the IBM DB2 ODBC driver, using the connection string HOSTNAME=mystarpipes;PORT=2000;DATABASE=ifxdb.

To use DB2 LUW as a gateway, catalog the node and database on the DB2 LUW system:

db2 catalog tcpip node ifxserv remote ifxserv server 9089
db2 catalog database ifxdb as ifxdb at node ifxserv authentication SERVER

and configure SQDR to connect to the Informix database through DB2, using the connection string HOSTNAME=mydb2server;PORT=50000;DATABASE=ifxdb.

To avoid a recv_socket timeout.error when connecting through StarPipes, right-click on the server name, select Properties, select Connection Pools panel, and set the Login timeout to 0. It is not necessary to restart the SQDR service.

When connecting through DB2 LUW, creating subscriptions and verifying criteria in the Subscription Wizard may fail with a syntax error. Right-click on the server name, select Properties, and uncheck Quote SQL identifiers on the Subscription Wizard panel. . It is not necessary to restart the SQDR service. After creating the subscriptions, you can revert Quote SQL identifiers to its default setting (checked).

These SQDR configuration changes are not required when connecting directly to the Informix server.

"UPDATE or DELETE statement does not include a WHERE clause" error (DB2 for i target)

Issue: When replicating to a DB2 for i destination, the snapshot or baseline replication failed with the following error:

Delete of existing rows in destination table failed.
[StarSQL][StarSQL ODBC Driver][DB2/400]The UPDATE or DELETE statement does not include a WHERE clause.

Solution: This (misleading) error message was the result of an isolation level mismatch in the StarSQL ODBC data source and the journaling characteristics of the destination library. In this case, the DSN was configured for IsolationLevel=2 (Read Committed), but the destination library was unjournaled. The issue was resolved by either changing the IsolationLevel in the DSN to Default, or by replicating to a journaled collection.

SQDR service terminates unexpectedly (MySQL source or destination)

Symptom: Intermittent crash of the SQDR service when using the MySQL ODBC driver, and an examination of the crash shows:

Unhandled exception at 0x776EA899 (ntdll.dll) in xxxxxxx.7356.dmp: 0xC0000374: A heap has been corrupted (parameters: 0x77725910).

Solution: This error can occur due to a bug related to SetLocale() in the Microsoft Visual C++ 2013 Redistributable package (used by the MySQL ODBC driver). Use the Programs and Features control panel to examine the version of Visual C++ 2013 Redistributable installed and, if necessary, update it from 12.0.21005.1 to 12.0.40649.5.

See Update for Visual C++ 2013 and Visual C++ Redistributable Package for details.

Note: SQDR v5.01 and later is built using Visual C++ 2017, so this hint is applicable only to earlier versions of SQDR.

Error loading recently-installed ODBC driver

Problem: SQDR may be unable to use a recently-installed ODBC driver. For example:

ODBC message: SQLSTATE IM003, native error 160.
Specified driver could not be loaded due to system error 126:
The specified module could not be found.
(SQDR Salesforce, C:\Program Files\StarQuest\SQDR_ODBC_XE\rpsfr27.dll)

Solution: Restart the SQDR service.

The installer for some ODBC drivers, such as SQDR Salesforce, modify system environment variables such as PATH, and it is necessary to restart the SQDR service so it is using the modified environment.

SQDR SQL Server driver as destination: Error loading library rpsqls28.dll

Problem: The following error occurs when using the SQDR SQL Server driver as destination:

Error loading library rpsqls28.dll (or rpsqls27.dll)

Solution: During creation of a subscription using this driver as a destination, select Insert using ODBC rather than the default of Use native-loader function in the Replication Options of the Destination panel.


Data Replicator Manager is Unresponsive

Symptom: On starting Data Replicator Manager immediately after starting the service (or if the service is started by starting Data Replicator Manager), the application waits at the splash screen for an extended period of time.

Solution: Examine the Application Event Log for issues that may be delaying the startup of the service. Typical issues are

  • Delays in contacting a StarLicense license server.
  • Inability to reach legacy source or destination databases. A change to SQDR was made in May 2017 that requires at least one connection to each source and destination to gather database information, even if there are no active subscriptions, and SQDR will continue to try to contact these database servers at startup until a connection is made. We recommend removing obsolete sources and destinations.

Symptom: Response in the Data Replication Manager is sluggish, for instance when expanding and collapsing.

Solution: This condition can happen if you have a large number of subscriptions and history logging grows beyond a certain limit.

Right click on the server name, select Properties, and select the Logging panel. Confirm that Limit replication history logging is enabled, and that the values for Maximum total number of history records and Maximum records per subscription are at a suitable level; the recommend values will depend on the number of subscriptions you have, and how much history you want to save. For instance, you may choose to use something like Total records=5000 and Max records per subscription=10.

Group Polling Error due to Trigger Error on Destination

Symptom: A customer encountered a Group Polling Error, even though the replication was successful. It was determined that the customer had created a trigger on the destination table, and a logic error in the trigger was causing an error to be returned to SQDR.

Solution: Triggers should not interfere with the return code or row count associated with the SQDR operation being attempted.

Example: For a SQL Server destination, see the following Microsoft reference documentation regarding trigger error handling (@@ERROR and the TRY...CATCH construct):

@@ERROR (Transact-SQL)

ALTER DROP Processing
(DB2 for i destination; SQDR 5.10 & later)


Automatic processing of ALTER DROP COLUMN fails with:

Processing of the SQL statement ended. Reason code 10.


When an ALTER DROP COLUMN is issued, the IBM i system issues a message that needs to be answered:

Message ID . . . . . . : CPA32B2
Change of file TAB1 may cause data to be lost. (C I)

In an interactive environment, such as running STRSQL in a 5250 terminal session, a user can reply I (Ignore).

Because there is no interactive communication when SQDR issues a SQL statement, the above error may occur. Set the default reply for message CPA32B2 to Ignore with the following command:

Use the WRKRPYLE (Work with System Reply List Entries) command to verify that this command has been issued.


The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.