Replication with Infosphere CDC : IBM InfoSphere CDC for solidDB® reference : Commands for IBM InfoSphere CDC : Monitoring replication commands
  
Monitoring replication commands
This section contains commands that help you monitor replication in IBM InfoSphere CDC:
See also
dmclearevents: Clear events
dmgetsubscriptionstatus: Get subscription status
dmshowevents: Display IBM InfoSphere CDC events
Commands for IBM InfoSphere CDC
dmclearevents: Clear events
Use this command to delete events from the Event Log view in Management Console.
Syntax
dmclearevents -I <instance_name> [-S|-T-|-B] <-A|-s <subscription_names> ...> [-L <locale>]
Parameters
-I <instance_name>
Specifies the name of the IBM InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-S
Specifies that IBM InfoSphere CDC clears events from the source.
-T
Specifies that IBM InfoSphere CDC clears events from both the source and target. If none of the S, T, and B options are specified, IBM InfoSphere CDC assumes B by default.
-B
Specifies the name of a source table in the subscription on which IBM InfoSphere CDC sets a log position. You must specify the table name in the format schema.table. List the tables if you specify more than one.
-A
Specifies that IBM InfoSphere CDC clears events for all subscriptions.
-s <subscription_names>
Specifies that IBM InfoSphere CDC clears events for the indicated subscription. List the subscriptions if you specify more than one.
-L <locale>
The name of the locale used for the IBM InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmclearevents -I myinstance -S -A
IBM InfoSphere CDC clears events from the source for all subscriptions for the specified instance.
dmclearevents -I myinstance -T -s Finance Marketing
IBM InfoSphere CDC clears events from both the source and target for the Finance and Marketing subscriptions for the specified instance.
See also
Monitoring replication commands
dmgetsubscriptionstatus: Get subscription status
Use this command to retrieve information indicating the current state of subscriptions and to send the results to standard output.
Syntax
dmgetsubscriptionstatus -I <instance_name> [-p] <-A|-s <subscription_name> ...> [-L <locale>]
Parameters
-I <instance_name>
Specifies the name of the IBM InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-p
Specifies that IBM InfoSphere CDC sends state information to standard output.
-A
Specifies that IBM InfoSphere CDC retrieves state information for all subscriptions.
-s <subscription_name>
Specifies the name of the subscription for which state information is retrieved. List the subscriptions if you specify more than one.
-L <locale>
The name of the locale used for the IBM InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns one of the following:
0—If the specified subscriptions have a state of Inactive.
1—If any of the specified subscriptions have a state other than Inactive.
A negative value—If an error has occurred while retrieving status information.
Examples
dmgetsubscriptionstatus -I myinstance -p -A
IBM InfoSphere CDC retrieves state information for all subscriptions and sends the results to standard output for the specified instance.
See also
Monitoring replication commands
dmshowevents: Display IBM InfoSphere CDC events
Use this command to display IBM InfoSphere CDC events to standard output. You can use this command as an alternative to showing IBM InfoSphere CDC events in the Event Log view in Management Console.
The output of this command shows events in chronological order with the most recent event shown first in the list.
Syntax
dmshowevents -I <instance_name> <-a|-s <subscription> ...
|-t <
source_ID> ...|-s <subscription> ... -t <source_ID> ...> [-h] [-c <max_msg>] [-L <locale>]
or
dmshowevents -I <instance_name> <-a|-s <subscription>|-t <source_ID> ...> [-h] [-c <max_msg>] [-L <locale>]
Parameters
-I <instance_name>
Specifies the name of the IBM InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-a
Specifies that IBM InfoSphere CDC shows events for all subscriptions.
-s <subscription>
Specifies the name of the source subscription for which IBM InfoSphere CDC shows events. List the subscriptions if you specify more than one.
-t <source_ID>
Specifies the source ID for which IBM InfoSphere CDC shows events. List the source IDs if you specify more than one.
-h
Specifies that IBM InfoSphere CDC displays a header before the list of events. This option helps you identify each item of information that is displayed for each event.
-c <max_msg>
Specifies the maximum number of events that IBM InfoSphere CDC displays. If you omit this parameter or you specify a value greater than the total number of events, IBM InfoSphere CDC displays all events for the specified subscriptions and/or source IDs.
Minimum setting: 0. No events are shown.
Maximum setting: 2147483647
-L <locale>
The name of the locale used for the IBM InfoSphere CDC instance. The default is the locale of the machine where IBM InfoSphere CDC is installed.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmshowevents -I new_instance -s Finance
IBM InfoSphere CDC displays all events for the Finance subscription for the specified instance.
dmshowevents -I myinstance –a –h
IBM InfoSphere CDC displays all events for all subscriptions. A header is displayed before the list of events for the specified instance.
dmshowevents -I newinstance –s Finance –t Atlanta –s Marketing –h –c 20
dmshowevents -I myinstance –s Finance Marketing –t Atlanta –h –c 20
IBM InfoSphere CDC displays the most recent 20 events for the Finance and Marketing subscriptions and for the Atlanta source ID. A header is displayed before the list of events for the specified instance.
Sample output
EVENTTIME|EVENTSOURCE|ORIGINATOR|EVENTID|SEVERITY|EVENTPROGRAM|EVENTTEXT
2006-04-21 17:23:08.817|T|ATLANTA|95|Information|class com.datamirror.ts.target. publication.c|Transformation Server Communications ending.
2006-04-21 17:23:08.614|T|ATLANTA|1538|Information|class com.datamirror.ts.target. publication.c|---Transformation Server for ATLANTA terminating normally.
2006-04-21 17:23:08.333|T|ATLANTA|1537|Information|class com.datamirror.ts.target. publication.c|Describe conversation with ATLANTA completed successfully.
2006-04-21 17:23:07.911|T|ATLANTA|1536|Information|class com.datamirror.ts.target. publication.c|Describe conversation started by ATLANTA.
2006-04-21 17:23:07.333|T|ATLANTA|1531|Information|class com.datamirror.ts.target. publication.c|Communication with ATLANTA successfully started on Data channel.
2006-04-21 17:23:06.973|T|ATLANTA|1534|Information|class com.datamirror.ts.engine.a |Code page conversation from the source database’s code page 1252 to the target database’s code page Cp1252 for ATLANTA will be performed by the Remote system
Fields in each record are separated by vertical bars ( | ). These fields are identified in the first line of the output. In the EVENTSOURCE field, S indicates source and T indicates target.
See also
Monitoring replication commands