StarQuest Technical Documents

How to Enable SQDR Logging for an Incremental Replication Subscription

Last Update: 17 November 2006
Product: StarQuest Data Replicator
Version: 3.30 or later
Article ID: SQV00DR016

Abstract

If an SQDR Incremental Replication (IR) Group is flagged due to a polling error encountered by a particular IR Subscription, StarQuest Technical Support may request that you enable Logging of this particular IR Subscription in order to capture the activity causing the error. An error that might require this type of logging is:

Subscription is active, but has had unexpected errors or row counts for INSERT, UPDATE, or DELETE on the target table

This document explains how to enable logging at the level recommended by StarQuest Technical Support, and how to collect the log data after the error condition has been captured. StarQuest recommends that you enable logging only when instructed to do so by a StarQuest Technical Support Engineer.

System Requirements

  • This example uses the Windows Script Host which cannot be disabled or blocked on the SQDR system.

Solution

SQDR provides a Windows script, EnableKeyLog.vbs, which is used to enable and disable logging. This script can be found in the \Program Files\StarQuest\SQDR directory. The logging commands should all be executed from a Windows Command prompt. To open a Windows command prompt, click on Start-->Run, enter 'CMD' in the Open text box and click OK. The usage of the EnableKeyLog.vbs script is as follows:

EnableKeyLog.vbs <IRGroupName> <SubscriptionName> [off | low | high]

The low level of logging captures only event notifications from the SQDR Plus Capture Agent that result in flagged subscriptions, such as those which require that a new baseline snapshot be run (e.g. if the source table has been reorganized/dropped/altered or if row count or data errors have occurred). The high logging level captures all data that is replicated from the source table to the destination table plus all the events that are captured with the low level of logging.

To Enable Logging

  • Enter the following command to enable logging at a high level, where <IRGroupName> is the name of the IR Group and <SubscriptionName> is the name of the IR Subscription you wish to log:

    cscript "C:\Program Files\StarQuest\SQDR\EnableKeyLog.vbs" <IRGroupName> <SubscriptionName> high

  • Enter the following command to enable logging at a low level, where <IRGroupName> is the name of the IR Group and <SubscriptionName> is the name of the IR Subscription you wish to log:

    cscript "C:\Program Files\StarQuest\SQDR\EnableKeyLog.vbs" <IRGroupName> <SubscriptionName> low

To Disable Logging

  • Enter the following command to disable logging, where <IRGroupName> is the name of the IR Group and <SubscriptionName> is the name of the subscription for which activity is being logged:

    cscript "C:\Program Files\StarQuest\SQDR\EnableKeyLog.vbs" <IRGroupName> <SubscriptionName> off 

To View the Current Logging Activity

  • Enter the following command to view the subscriptions that are currently being logged:

    cscript "C:\Program Files\StarQuest\SQDR\EnableKeyLog.vbs"

To Collect the Log Data


DISCLAIMER

The information in technical documents comes without any warranty. 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 information in technical documents may be gathered from various sources, including IBM, Microsoft, and other organizations.