56
IBM InfoSphere Change Data Capture Version 6.5.2 InfoSphere Change Data Capture for Netezza databases, Version 6.5.2 InfoSphere Data Replication for Netezza, Version 10.1.2 End-User Documentation

InfoSphere Change Data Capture: End-User Documentation · IBM ®InfoSphereChange Data Capture (InfoSphere CDC) is a replication solution that captures database changes as they happen

  • Upload
    others

  • View
    39

  • Download
    2

Embed Size (px)

Citation preview

  • IBMInfoSphere Change Data CaptureVersion 6.5.2

    InfoSphere Change Data Capture forNetezza databases, Version 6.5.2InfoSphere Data Replication forNetezza, Version 10.1.2End-User Documentation

    ���

  • IBMInfoSphere Change Data CaptureVersion 6.5.2

    InfoSphere Change Data Capture forNetezza databases, Version 6.5.2InfoSphere Data Replication forNetezza, Version 10.1.2End-User Documentation

    ���

  • NoteBefore using this information and the product it supports, read the information in “Notices” on page 45.

    First edition

    This edition applies to version 10, release 1, modification 2 of IBM InfoSphere Data Replication for Netezza (productnumber 5725-E30) and to all subsequent releases and modifications until otherwise indicated in new editions.

    © Copyright IBM Corporation 2011.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

  • Contents

    About InfoSphere CDC and InfoSphereCDC Management Console . . . . . . 1

    System requirements . . . . . . . . . 3Supported operating systems and processors . . . 3Supported Netezza JDBC drivers . . . . . . . 3Supported databases. . . . . . . . . . . . 3Disk space requirements . . . . . . . . . . 4RAM requirements . . . . . . . . . . . . 4Port requirements. . . . . . . . . . . . . 4

    Before you install . . . . . . . . . . 7Required database, user accounts, and privileges . . 7Assessing disk space and memory requirements . . 7Netezza specific considerations for InfoSphere CDC . 8Preparing your environment for an installation ofInfoSphere CDC . . . . . . . . . . . . . 8Calculating database connections required byInfoSphere CDC . . . . . . . . . . . . . 9

    Installing InfoSphere CDC . . . . . . 11Installing InfoSphere CDC . . . . . . . . . 11

    To install InfoSphere CDC (Linux) . . . . . . 11Installing InfoSphere CDC using a silent installation 12

    To perform a silent installation of InfoSphereCDC (Linux) . . . . . . . . . . . . . 12

    Configuring InfoSphere CDC (Linux) . . 13To add a new instance of InfoSphere CDC (Linux) 13To edit an instance of InfoSphere CDC (Linux) . . 14To delete an instance of InfoSphere CDC (Linux) . . 14

    After you install and configure . . . . 17To start InfoSphere CDC (Linux) . . . . . . . 17To stop InfoSphere CDC (Linux) . . . . . . . 17Privileges required by users . . . . . . . . . 17

    Maintaining active TCP connections ina network environment. . . . . . . . 19To maintain active TCP connections . . . . . . 19

    Data types supported by InfoSphereCDC . . . . . . . . . . . . . . . . 21

    Metadata tables . . . . . . . . . . . 23

    Commands for InfoSphere CDC . . . . 25Using the InfoSphere CDC commands . . . . . 25Setting the TSINSTANCE environment variable . . 26Database transaction log commands . . . . . . 26

    dmshowbookmark - Display BookmarkInformation . . . . . . . . . . . . . 26

    Managing tables for replication commands . . . . 28dmreassigntable - Update Target Table Definition 28

    Monitoring replication commands . . . . . . . 29dmclearevents - Clear Events . . . . . . . 29dmshowevents - Show Events . . . . . . . 30

    Exporting and importing configuration commands 32dmexportconfiguration - Export InfoSphere CDCConfiguration . . . . . . . . . . . . 32dmimportconfiguration - Import InfoSphere CDCConfiguration . . . . . . . . . . . . 32

    Other commands . . . . . . . . . . . . 33dmbackupmd Backup Metadata . . . . . . 33dmconfigurets - Configure InfoSphere CDC . . 34dmset - Set InfoSphere CDC System Parameter 34dmshowversion - Show InfoSphere CDC Version 35dmshutdown - Shut Down InfoSphere CDC . . 35dmsupportinfo - Collect IBM SupportInformation . . . . . . . . . . . . . 37dmts64 - Start InfoSphere CDC . . . . . . . 38dmmdcommander . . . . . . . . . . . 38dmmdconsole . . . . . . . . . . . . 38

    User exits for InfoSphere CDC . . . . 39Sample Java class user exits for InfoSphere CDC . . 39

    To compile the sample Java class user exits(UNIX and Linux) . . . . . . . . . . . 40

    InfoSphere CDC API reference – Javadocs . . . . 40

    Troubleshooting and contacting IBMSupport . . . . . . . . . . . . . . 43

    Notices . . . . . . . . . . . . . . 45Trademarks . . . . . . . . . . . . . . 47

    © Copyright IBM Corp. 2011 iii

  • iv InfoSphere Change Data Capture: End-User Documentation

  • About InfoSphere CDC and InfoSphere CDC ManagementConsole

    IBM® InfoSphere® Change Data Capture (InfoSphere CDC) is a replication solutionthat captures database changes as they happen and delivers them to targetdatabases, message queues, or an ETL solution such as InfoSphere DataStage®

    based on table mappings configured in the InfoSphere CDC Management ConsoleGUI application.

    InfoSphere CDC provides low impact capture and fast delivery of data changes forkey information management initiatives including dynamic data warehousing,master data management, application consolidations or migrations, operational BI,and enabling SOA projects. InfoSphere CDC also helps reduce processingoverheads and network traffic by only sending the data that has changed.Replication can be carried out continuously or periodically. When data istransferred from a source server, it can be remapped or transformed in the targetenvironment.

    The following diagram illustrates the key components of InfoSphere CDC.

    For more information on how to install Management Console and Access Server,see Access Server and Management Console - Installation Guide. For information onhow to install your source and target replication engines, see the end-userdocumentation for your replication engine platform.

    The key components of the InfoSphere CDC architecture are described below:v Access Server—Controls all of the non-command line access to the replication

    environment. When you log in to Management Console, you are connecting toAccess Server. Access Server can be closed on the client workstation withoutaffecting active data replication activities between source and target servers.

    v Admin API—Operates as an optional Java-based programming interface thatyou can use to script operational configurations or interactions.

    © Copyright IBM Corp. 2011 1

  • v Apply agent—Acts as the agent on the target that processes changes as sent bythe source.

    v Command line interface—Allows you to administer datastores and useraccounts, as well as to perform administration scripting, independent ofManagement Console.

    v Communication Layer (TCP/IP)—Acts as the dedicated network connectionbetween the Source and the Target.

    v Source and Target Datastore—Represents the data files and InfoSphere CDCinstances required for data replication. Each datastore represents a database towhich you want to connect and acts as a container for your tables. Tables madeavailable for replication are contained in a datastore.

    v Management Console—Allows you to configure, monitor and managereplication on various servers, specify replication parameters, and initiate refreshand mirroring operations from a client workstation. Management Console alsoallows you to monitor replication operations, latency, event messages, and otherstatistics supported by the source or target datastore. The monitor inManagement Console is intended for time-critical working environments thatrequire continuous analysis of data movement. After you have set up replication,Management Console can be closed on the client workstation without affectingactive data replication activities between source and target servers.

    v Metadata—Represents the information about the relevant tables, mappings,subscriptions, notifications, events, and other particulars of a data replicationinstance that you set up.

    v Mirror—Performs the replication of changes to the target table or accumulationof source table changes used to replicate changes to the target table at a latertime. If you have implemented bidirectional replication in your environment,mirroring can occur to and from both the source and target tables.

    v Refresh—Performs the initial synchronization of the tables from the sourcedatabase to the target. This is read by the Refresh reader.

    v Replication Engine—Serves to send and receive data. The process that sendsreplicated data is the Source Capture Engine and the process that receivesreplicated data is the Target Engine. An InfoSphere CDC instance can operate as asource capture engine and a target engine simultaneously.

    v Single Scrape—Acts as a source-only log reader and a log parser component. Itchecks and analyzes the source database logs for all of the subscriptions on theselected datastore.

    v Source transformation engine—Processes row filtering, critical columns, columnfiltering, encoding conversions, and other data to propagate to the targetdatastore engine.

    v Source database logs—Maintained by the source database for its own recoverypurposes. The InfoSphere CDC log reader inspects these in the mirroringprocess, but filters out the tables that are not in scope for replication.

    v Target transformation engine—Processes data and value translations, encodingconversions, user exits, conflict detections, and other data on the target datastoreengine.

    There are two types of target-only destinations for replication that are notdatabases:v JMS Messages—Acts as a JMS message destination (queue or topic) for

    row-level operations that are created as XML documents.v InfoSphere DataStage—Processes changes delivered from InfoSphere CDC that

    can be used by InfoSphere DataStage jobs.

    2 InfoSphere Change Data Capture: End-User Documentation

  • System requirements

    Before you install InfoSphere CDC, ensure that the system you choose meets thenecessary operating system, hardware, software, communications, disk, andmemory requirements.

    In this section, you will learn:“Supported operating systems and processors”“Supported Netezza JDBC drivers”“Supported databases”“Disk space requirements” on page 4“RAM requirements” on page 4“Port requirements” on page 4

    Supported operating systems and processors

    Operating system and processor

    Linux Red Hat version 5.3 and later—x86/x64 processorsNote: InfoSphere CDC for Netezza databases only supports 64 bit operating systems.

    Supported Netezza JDBC drivers

    Netezza® JDBC driver

    Netezza JDBC driver, version 6.0.3 or above.

    Supported databases

    Database

    Netezza database version 6.0.2

    The JDBC driver must be compatible with all databases you want to replicate datato or from. Please consult your database's documentation for information regardingthe features supported by the drivers.

    © Copyright IBM Corp. 2011 3

  • Disk space requirements

    Disk space

    InfoSphere CDC target system:

    v 5 GB—For installation files, data queues, and log files.v Global disk quota—Disk space is required on your target system for this quota which is

    used to store LOB data received from your InfoSphere CDC source system. The amountof disk space required is determined by your replication environment and the amount ofLOB data you are replicating. To improve performance, InfoSphere CDC will only persistLOB data to disk if RAM is not available on your target system. Use themirror_global_disk_quota_gb system parameter to configure the amount of disk spaceused by this quota.

    RAM requirements

    RAM

    Each instance of InfoSphere CDC requires memory for the Java Virtual Machine (JVM). Thefollowing default values for memory are assigned:

    v 8192 MB of RAM—Default value for each 64-bit instance of InfoSphere CDC.

    Use the InfoSphere CDC configuration tool to configure the memory for each instance ofInfoSphere CDC.

    Although InfoSphere CDC memory requirements will fluctuate, you must workwith your system administrator to ensure the allocated memory for each instanceof the product is available at all times. This may involve deployment planningsince other applications with memory requirements may be installed on the sameserver with InfoSphere CDC. Using values other than the defaults or allocatingmore RAM than is physically available on your server should only be undertakenafter considering the impacts on product performance.Related concepts

    “Configuring InfoSphere CDC (Linux)” on page 13

    Port requirementsInfoSphere CDC requires that you allocate a port for communication with clientworkstations running Management Console and other servers. The port must beaccessible through a firewall, although you do not require access to the Internet.

    Protocol Default port Purpose

    TCP 11301 Accepts connections from:

    v Management Consolev Other installations of

    InfoSphere CDC as asource of replication

    v Command line utilities

    For more information onhow to install ManagementConsole, see ManagementConsole and Access Server -Installation Guide.

    4 InfoSphere Change Data Capture: End-User Documentation

  • Related concepts

    “Maintaining active TCP connections in a network environment” on page 19

    System requirements 5

  • 6 InfoSphere Change Data Capture: End-User Documentation

  • Before you install

    This section contains information on the tasks that you must complete beforeinstalling InfoSphere CDC. This section assumes that you have met all of thehardware, software, database, and port requirements. You must complete all of thetasks below before installing InfoSphere CDC.

    In this section, you will learn:“Required database, user accounts, and privileges”“Assessing disk space and memory requirements”“Netezza specific considerations for InfoSphere CDC” on page 8“Preparing your environment for an installation of InfoSphere CDC” on page 8“Calculating database connections required by InfoSphere CDC” on page 9

    Required database, user accounts, and privilegesConfiguring a connection to the Netezza database

    When you configure InfoSphere CDC, you are prompted for the hostname of theNetezza database you want InfoSphere CDC to connect to and replicate data.Before installing InfoSphere CDC, ensure that this database exists and that youhave created and set up a database user that has access to it.

    Setting up a Linux user account

    When you are installing InfoSphere CDC on a Linux machine, you must set up anew, or decide on an existing Linux account that you will use to install, configure,or upgrade InfoSphere CDC. You can install InfoSphere CDC in the directory ofyour choice, however, it must be owned by the Linux account.

    Configuring an Netezza database

    When you configure InfoSphere CDC, you are prompted for the name of theNetezza database from which you want InfoSphere CDC to replicate data. Beforeinstalling InfoSphere CDC, ensure that this Netezza database exists and that youhave created and set up a database user that has access to it.

    Assessing disk space and memory requirements

    InfoSphere CDC requires disk space and memory when it processes change datafrom your source database. In order to process change data efficiently and replicatethese changes to your target system, it is very important that InfoSphere CDC hasadequate disk space and memory for each of the components described in thissection.

    Memory requirements for the JVM (Java Virtual Machine)

    As a Java-based product, InfoSphere CDC requires you to allocate the maximumamount of memory (RAM) to be used by the Java Virtual Machine (JVM). Thisprevents InfoSphere CDC from using all of the available memory on the systemwhere it is installed.

    © Copyright IBM Corp. 2011 7

  • The Maximum Memory Allowed value is set on a per-instance basis for eachinstance you create for your target database. In most cases the default values areappropriate for 64-bit instances. However, if your database is processing anextremely heavy workload, you may have to adjust the default values. The RAMallocated must be physically available on your system.

    Disk space requirements for the global disk quota

    Disk space is required on your target system for this quota which is used to storein-scope change data that has not been committed in your database. The amount ofdisk space required is determined by your replication environment and theworkload of your source database.

    You can configure the amount disk space that is allocated to this quota with themirror_global_disk_quota_gb system parameter. The default setting of this systemparameter is such that InfoSphere CDC will only stop replicating after this diskquota exhausts all available disk space on your system. If you would preferInfoSphere CDC to stop replicating after it uses a specific amount of disk space,you can specify the value with this system parameter in Management Console.

    Netezza specific considerations for InfoSphere CDC

    There are several Netezza specific considerations you should review when workingwith InfoSphere CDC.v In order to maintain Netezza's operational efficiency, InfoSphere CDC for

    Netezza databases replicates rows in periodic bulk load operations. As anadministrator of InfoSphere CDC, you can expect a certain level of latency (inminutes) during replication because these operations are staged in memorybefore they are applied to the database. Latency may be higher when comparedto InfoSphere CDC performance on other supported databases, however thethroughput of rows per hour may be similar or greater. If you want to controlthe level of latency in your environment, you can modify theacceptable_latency_in_minutes system parameter in Management Console.

    v InfoSphere CDC for Netezza databases attempts to apply data such that SQLquery performance against the target database is minimally affected. Replicationof large volumes of changed data may affect query performance because of bulkload operations being performed on the database. Query performance may alsobe affected by the level of acceptable latency you specify with theacceptable_latency_in_minutes system parameter.

    v While the Netezza appliance permits and maintains primary key, default, foreignkey, unique, and references, the appliance does not support constraint checksand referential integrity. Therefore, InfoSphere CDC will not be able to detectsituations where the data has been changed either manually or by anapplication. As an administrator ofInfoSphere CDC for Netezza databases, youmust ensure that there are no duplicate rows in the table and ensure referentialintegrity in the data being replicated.

    Preparing your environment for an installation of InfoSphere CDC

    You need to allocate a Linux Red Hat version 5.3 or later machine on which youcan install InfoSphere CDC. This Linux machine should be close to the Netezzaappliance in order for InfoSphere CDC to obtain a strong network connection.Before you install, consider the following:

    8 InfoSphere Change Data Capture: End-User Documentation

  • v You can only install one instance of InfoSphere CDC for Netezza databases on asingle Netezza database.

    v InfoSphere CDC must not be installed on the Netezza appliance.v InfoSphere CDC for Netezza databases only supports 64 bit Linux operating

    systems.

    The following diagram illustrates a typical topology for InfoSphere CDC forNetezza databases product.

    Calculating database connections required by InfoSphere CDC

    As an administrator, you may find it necessary to calculate how many databaseconnections are needed before installing InfoSphere CDC on either a source or atarget database. Calculating the upper bound (both permanent and temporary)database connections will help you plan your environment so that it canaccommodate InfoSphere CDC.

    If you are installing InfoSphere CDC for Netezza databases, then you only need tocalculate database connections for the target database as this product onlyreplicates to target-only destinations.

    This topic includes the formulae and examples to help you calculate the number ofconnections required by InfoSphere CDC versions 6.5.x or 6.3.x. Only calculationsfor 6.5.x are relevant for the InfoSphere CDC for Netezza databases product.

    Calculating connections required by InfoSphere CDC version6.5.x or 6.3.x on a target database

    For InfoSphere CDC version 6.5.x or 6.3.x:

    (4+G)*N + 3*T

    Where:

    v T = number of InfoSphere CDC subscriptions (target datastore in ManagementConsole is version 6.5.x or 6.3.x).

    v G = number of Management Console GUI applications that are connected toyour instances of InfoSphere CDC.

    v N = number of InfoSphere CDC 6.5.x instances.

    Example: How to calculate required connections for a targetdatabase

    You want to setup InfoSphere CDC in the target environment as follows:v 3 subscriptions.v 2 InfoSphere CDC 6.5.x instances.v 1 installed Management Console GUI application.

    Before you install 9

  • The number of connections required on the target database will be:

    (4 + 1)*2 + 3*3 = 19

    You should plan for a maximum of 19 database connections before installingInfoSphere CDC on the target database.

    10 InfoSphere Change Data Capture: End-User Documentation

  • Installing InfoSphere CDC

    This section provides step-by-step instructions on how to install InfoSphere CDC.

    In this section, you will learn:“Installing InfoSphere CDC”“Installing InfoSphere CDC using a silent installation” on page 12

    Related concepts

    “Before you install” on page 7

    Installing InfoSphere CDCYou can install InfoSphere CDC on a Linux server.

    The Linux machine must be version 5.3 or later and you must install on InfoSphereCDC for Netezza databases on a 64 bit operating system.

    See also:“To install InfoSphere CDC (Linux)”

    To install InfoSphere CDC (Linux)

    Note the following before you install or upgrade InfoSphere CDC on Linux orUNIX:v Do not install or upgrade InfoSphere CDC as a root user.v The installation directory requires file system permissions of if you plan on

    using the same user account to install the product, create and configureinstances, or upgrade the product.

    v The installation directory requires file system permissions of if you plan onusing different user accounts to install the product, create and configureinstances, or upgrade the product.

    1. Log on to the account you set up for InfoSphere CDC.2. Copy the InfoSphere CDC installation file for your Linux platform from the

    InfoSphere CDC CD-ROM or download it from the InfoSphere CDC web site.3. Make the installation binary file executable.4. Run the installation program by typing the following command:

    ./.bin

    If you already have InfoSphere CDC installed, the installation program willprompt you to upgrade.

    5. Press Enter on the Introduction screen to display the license agreement.Follow the instructions on the screen to navigate through the licenseagreement.

    6. To accept the license agreement, type 1.7. Enter the absolute path to your installation directory or press Enter to accept

    the default.

    © Copyright IBM Corp. 2011 11

  • Note: The directory that you specify must be owned by the account you areusing for the installation. If the installation program cannot create thedirectory, you are prompted to specify a different directory.

    8. Review the installation summary. Press Enter to start the installation.9. After completing the installation, InfoSphere CDC gives you the option of

    launching the configuration tool for InfoSphere CDC.10. Enter 1 to launch the configuration tool.

    Note: If you have X-Windows installed, the installation program will launch theconfiguration tool in a graphical environment.Related concepts

    “Configuring InfoSphere CDC (Linux)” on page 13

    Installing InfoSphere CDC using a silent installationA silent installation allows you to automatically install InfoSphere CDC byspecifying a command with various parameters. You can use this type ofinstallation method for large-scale deployments of InfoSphere CDC by embeddingthe silent installation command in a script.

    See also:“To perform a silent installation of InfoSphere CDC (Linux)”

    To perform a silent installation of InfoSphere CDC (Linux)1. Log on to the account you set up for InfoSphere CDC.2. Copy the InfoSphere CDC installation binary from the InfoSphere CDC

    CD-ROM or download it from the InfoSphere CDC Web site.3. Make the installation binary executable.4. Install InfoSphere CDC and generate a response file with the following

    command: -r

    where:v is the full path to the installation file.

    5. On another system, perform the silent installation by running the followingcommand: -i silent -f

    where:v is the full path to the installation file.

    12 InfoSphere Change Data Capture: End-User Documentation

  • Configuring InfoSphere CDC (Linux)

    After installing InfoSphere CDC, the installation program launches a configurationtool. The configuration tool allows you to configure one or more InfoSphere CDCinstances for your environment. You must configure InfoSphere CDC before youcan start replication.

    In this section, you will learn:“To add a new instance of InfoSphere CDC (Linux)”“To edit an instance of InfoSphere CDC (Linux)” on page 14“To delete an instance of InfoSphere CDC (Linux)” on page 14

    To add a new instance of InfoSphere CDC (Linux)1. If you are configuring the first instance of InfoSphere CDC after installation,

    you can proceed to Step 3 of this procedure.2. At the command prompt, launch the configuration tool by issuing the

    following command in the specified directory:\\bin\dmconfigurets

    3. At the welcome message, press Enter to continue.4. Enter the name of the instance you want to add and press Enter.5. Enter the port number which InfoSphere CDC uses for communication with

    client workstations running Management Console and other servers.InfoSphere CDC displays a default port of 11301. Press Enter.

    Note: This port number cannot be used by other applications installed on thesame server. You will use this port number when specifying access parametersfor your datastore in the Access Manager perspective in Management Console.For more information, see your Management Console documentation.

    6. If you are using the auto-discovery feature in Access Manager, then enable thethis feature by typing the UDP port number that you set in Access Server.InfoSphere CDC uses this UDP port number for auto-discovery broadcastssent from Access Server. Otherwise, press Enter to disable this feature.

    7. Enter the amount of physically available RAM that you want to allocate forthis instance of InfoSphere CDC and press Enter. By default, the configurationtool allocates 8192 MB of RAM for each 64-bit instance.

    Note: Using values other than the defaults or allocating more RAM than isphysically available on your server should only be undertaken afterconsidering the impacts on product performance.

    8. Specify the JDBC driver for the Netezza database.9. Enter the hostname of the Netezza database and press Enter.

    10. Enter the name of the database that contains all of the tables for replicationand press Enter.

    11. Enter the port number of the database and press Enter. InfoSphere CDCdisplays a default port of 5480.

    12. Enter the user name for the database and press Enter.13. Enter the password for the specified database and press Enter.

    The configuration tool will now search the database for schemas.

    © Copyright IBM Corp. 2011 13

  • 14. Enter the number that corresponds to the database schema used by InfoSphereCDC for metadata tables and press Enter. You can specify any schema exceptthose in use by other installed instances of InfoSphere CDC for the givendatabase.

    Note: InfoSphere CDC metadata tables contain important configurationinformation and should be backed up as part of your database backupstrategy.

    15. Enter the absolute path for the refresh loader and press Enter.16. If InfoSphere CDC detects an unsupported encoding, an error message will be

    displayed and you will be asked to choose an alternate encoding.a. Enter y to proceed.

    Note: If you enter n and press Enter to cancel, the instance will not becreated.

    b. Enter a value to choose how the alternate encodings will be displayed:v 1—Displays the available alternate encodings that are the closest match

    to the database.v 2—Displays the available alternate encodings in order of byte length.v 3—Displays all available alternate encodings.

    c. Enter the number for the encoding to be used and press Enter.17. The configuration tool creates the InfoSphere CDC instance and prompts you

    to start the instance. Enter y to start the instance.

    Note: The configuration tool will prompt you if your configuration is about tooverwrite the metadata for an existing instance.

    Related tasks

    “To start InfoSphere CDC (Linux)” on page 17Related reference

    “dmbackupmd Backup Metadata” on page 33

    To edit an instance of InfoSphere CDC (Linux)1. Stop InfoSphere CDC if it is started by using the dmshutdown command. You

    cannot edit an instance that is running.2. At the command prompt, launch the configuration tool by issuing the following

    command from the /bin directory:./dmconfigurets

    3. Enter 1 and press Enter to list the installed instances of InfoSphere CDC.Record the name of the instance you want to modify.

    4. Press Enter to return to the main menu.5. Enter 3 and press Enter to modify an instance of InfoSphere CDC.6. Enter the number of the instance that you want to modify and press Enter.

    The configuration tool allows you to edit a number of values that you specifiedwhen adding an instance.

    7. After making your changes, type 5 and press Enter to apply your changes andreturn to the main menu. Enter 6 and press Enter to discard your changes.

    To delete an instance of InfoSphere CDC (Linux)1. Stop InfoSphere CDC if it is started by using the dmshutdown command.

    14 InfoSphere Change Data Capture: End-User Documentation

  • 2. At the command prompt, launch the configuration tool by issuing the followingcommand from the /bin directory:./dmconfigurets

    3. Enter 1 and press Enter to list the installed instances of InfoSphere CDC.Record the name of the instance you want to delete.

    4. Enter 4 and press Enter to delete an instance of InfoSphere CDC.5. Enter the instance name that you want to delete and press Enter.

    Configuring InfoSphere CDC (Linux) 15

  • 16 InfoSphere Change Data Capture: End-User Documentation

  • After you install and configure

    Once you have installed and configured InfoSphere CDC, you can start usingInfoSphere CDC.

    In this section, you will learn:“To start InfoSphere CDC (Linux)”“To stop InfoSphere CDC (Linux)”“Privileges required by users”

    To start InfoSphere CDC (Linux)

    Issue the following start command:v dmts64 - I

    To stop InfoSphere CDC (Linux)1. End replication on all subscriptions in Management Console. For more

    information on how to end replication on subscriptions, see your ManagementConsole documentation.

    2. Depending on how you want to stop InfoSphere CDC, issue one of thefollowing stop commands in the bin directory in your InfoSphere CDCinstallation directory:

    Option Description

    dmshutdown [-I ] Use this command to gracefully shut downInfoSphere CDC.

    dmterminate [-L ] Use this command to terminate all processesfor all instances running on a Linux server.Use this command when you cannotcompletely shut down InfoSphere CDCusing the dmshutdown command.

    Privileges required by usersUsers must be granted the following Netezza database privileges in order toreplicate with InfoSphere CDC:v LIST (to view tables)v TRUNCATE (required in order to perform a Refresh operation on a table)v UPDATEv INSERTv DELETEv CREATE TABLEv DROP TABLEv ALTER TABLE

    © Copyright IBM Corp. 2011 17

  • 18 InfoSphere Change Data Capture: End-User Documentation

  • Maintaining active TCP connections in a network environment

    If your deployment of InfoSphere CDC is in a network environment that uses afirewall, VPN gateway, or local system tools to detect idle TCP connections, it maybe necessary to configure the product to prevent these connections from beingclosed during periods of application inactivity between the source and target.

    By default, InfoSphere CDC sends a message over TCP connections every 20seconds to ensure these connections remain active during periods of inactivity. Ifyour network policies close TCP connections for idle periods of less than 20seconds, you must change the configuration of each instance of InfoSphere CDC toensure the TCP connections remain open.

    See also:“To maintain active TCP connections”

    To maintain active TCP connections1. For each instance of InfoSphere CDC, navigate to the following directory:

    UNIX or Linux:/instance//conf

    2. Open the comms.ini file in a text editor.3. Change the KEEP_ALIVE_TIMEOUT parameter to a value that is lower than the

    time used to detect idle connections in your network. For example, if yournetwork disables idle TCP connections after 15 seconds, you can change theKEEP_ALIVE_TIMEOUT parameter to a value of 10 seconds:KEEP_ALIVE_TIMEOUT=10

    4. Save the comms.ini file.5. For the changes to take effect, use the configuration tool to restart all instances

    of InfoSphere CDC.

    InfoSphere CDC will now send messages over the TCP connection every 10seconds.

    © Copyright IBM Corp. 2011 19

  • 20 InfoSphere Change Data Capture: End-User Documentation

  • Data types supported by InfoSphere CDC

    For information about data types supported by InfoSphere CDC, see Supported datatypes in the Management Console Administration Guide.

    © Copyright IBM Corp. 2011 21

  • 22 InfoSphere Change Data Capture: End-User Documentation

  • Metadata tables

    InfoSphere CDC maintains a set of metadata tables that represent data about yourcurrent replication configuration. These tables are created in the database that youspecify in the configuration tool and should be part of the backup strategy foryour database. InfoSphere CDC will not replicate these tables. Do not modify thecontents of these tables unless requested to do so by your IBM representative.

    The names of the metadata tables created by InfoSphere CDC are as follows:v TS_AUTHv TS_BKMARKRelated concepts

    “Configuring InfoSphere CDC (Linux)” on page 13

    © Copyright IBM Corp. 2011 23

  • 24 InfoSphere Change Data Capture: End-User Documentation

  • Commands for InfoSphere CDC

    This section discusses the commands available with InfoSphere CDC. Using thesecommands you can control replication, manage your tables for replication, monitorreplication, and perform various other tasks.

    In this section, you will learn:“Using the InfoSphere CDC commands”“Setting the TSINSTANCE environment variable” on page 26“Database transaction log commands” on page 26“Managing tables for replication commands” on page 28“Monitoring replication commands” on page 29“Exporting and importing configuration commands” on page 32“Other commands” on page 33

    Using the InfoSphere CDC commandsYou can issue InfoSphere CDC commands at a command line prompt or as part ofa batch file or shell script. Commands are located in the bin directory of yourInfoSphere CDC installation directory. You must run the commands from thisdirectory.

    Note: Use the -? flag to list the available parameters for a command and a shortdescription of each parameter. For example, dmstartmirror -?.

    Command formats

    For each command, the following items of information are provided:v Syntax—Identifies the name of the command and lists the command parameters.v Parameters—Describes each parameter in the command and identifies the values

    that can be specified.v Result—Indicates the values that are returned by the command if it is

    successful. These values can be useful for scripting. This section also specifiesthe information that is displayed on the screen, if any, as a result of executingthe command.

    v Examples—Provides one or more examples of invoking the command.

    Parameter formats

    Note the following conventions in the definition of the command parameters:v Angle brackets ( < > ) indicate a mandatory parameter.v Square brackets ( [ ] ) indicate an optional parameter. If you omit the parameter,

    InfoSphere CDC uses a default value.v A vertical bar ( | ) separating one or more parameters indicate that only one of

    the parameters in the list can be used. When one or more vertical bars appear ina list of parameters that is enclosed by square brackets [ ], the choices arelimited to the parameters in the list, but you have the option to not specify anyof the parameters.

    v Ellipsis ( ... ) means that a parameter or option can be repeated more than once.

    © Copyright IBM Corp. 2011 25

  • v You can issue the commands in Linux.

    Setting the TSINSTANCE environment variableBefore using InfoSphere CDC commands, you can set the TSINSTANCEenvironment variable to the name of your InfoSphere CDC instance.

    After you set the TSINSTANCE environment variable, you no longer have tospecify the instance name when issuing commands.

    The following command is for kshell. You can run similar commands in othershells:export TSINSTANCE=

    where:v is the name of your InfoSphere CDC instance.

    Database transaction log commandsThis section contains commands that help you manage your database transactionlog or bookmarks.

    See also:“dmshowbookmark - Display Bookmark Information”

    dmshowbookmark - Display Bookmark Information

    Use this command on your InfoSphere CDC target system to obtain the replicationposition (bookmark) in the stream of change data for a subscription. Aftergenerating the replication position information with this command, you can usethe dmsetbookmark command on the source system to set the replication positionfor a subscription. More information on the InfoSphere CDC stream of change datais provided in the following paragraphs.

    InfoSphere CDC parses the data from your database logs and creates a stream ofchange data to process on the source and eventually apply on the target. Thestream of change data is sorted in the order in which the data was committed inthe source database, whereas the data in your database logs is sorted in the orderin which the individual action was done in the source database.

    For example, two transactions named T1 and T2 may be ordered like this in yoursource database log:T1: Insert1T2: Insert1T2: Insert2T2: CommitT1: Commit

    As you can see, data is sorted in the database log according to when the individualaction was done in your source database.

    However, the InfoSphere CDC stream of change data will order the twotransactions like this:

    26 InfoSphere Change Data Capture: End-User Documentation

  • T2: Insert1T2: Insert2T2: CommitT1: Insert1T1: Commit

    Data is sorted according to when the data is committed in your source database.

    Syntaxdmshowbookmark [-I ] -s [-f ] [-x ] [-v] [-L ]

    Parameters

    -I The name of the InfoSphere CDC instance. You can set the TSINSTANCEenvironment variable to the name of your InfoSphere CDC instance. After thisis complete, you no longer have to specify the instance when issuingcommands.

    -s Specifies the source ID of the subscription for which you want to obtain thereplication position (bookmark).

    -f

    Specifies the name of the binary file that will be generated by this command.The generated file contains information about the replication position(bookmark) for the specified subscription.

    You can specify an absolute path for the location where you want to create thefile. If you do not specify an absolute path, the file is created in the InfoSphereCDC installation directory.

    Use the -f parameter in the dmsetbookmark command to read the binary filegenerated by this parameter.

    Note: Use the -x parameter if you are issuing this command from the target ofa DB2® for LUW DPF source environment.

    -x Specifies the name of the XML file that will be generated by this command.The generated file contains information about the replication position(bookmark) for the specified subscription. Use this parameter if you arereplicating from a DB2 for LUW DPF source environment. The XML filecontains replication positions (bookmarks) for all partitions.

    You can specify an absolute path for the location where you want to create thefile. If you do not specify an absolute path, the file is created in the InfoSphereCDC installation directory.

    Use the -f parameter in the dmsetbookmark command to read the XML filegenerated by this parameter.

    -v Displays verbose information about the replication position (bookmark),including a hexadecimal-encoded string. The amount of information displayeddepends on the type and version of the source engine. Thehexadecimal-encoded string is always displayed. This parameter displays asubset of what the dmdecodebookmark command displays. If not specified, onlya hexadecimal-encoded string is displayed.

    Commands for InfoSphere CDC 27

  • Note: Use the -x parameter if you are issuing this command from the target ofa DB2 LUW DPF source environment.

    -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Result

    This command returns a value of 0 if the command was successful and a non-zerovalue if the command fails.

    Examples

    dmshowbookmark -I MYINSTANCE -s MASTER -f bookmark

    InfoSphere CDC obtains the replication position (bookmark) information for thespecified instance and the MASTER source ID. Replication position (bookmark)information is contained in the bookmark binary file which will be placed in theInfoSphere CDC installation directory since no absolute path has been specified.

    dmshowbookmark -I MYINSTANCE -s FINANCE -x mybookmarks

    InfoSphere CDC obtains the replication position (bookmark) information for thespecified instance and the FINANCE source ID. Replication position (bookmark)information is contained in the mybookmarks XML file which will be placed in theInfoSphere CDC installation directory since no absolute path has been specified.

    Managing tables for replication commandsThis section contains commands that help you manage the tables that you want toreplicate with InfoSphere CDC.

    See also:“dmreassigntable - Update Target Table Definition”

    dmreassigntable - Update Target Table Definition

    Use this command to update the definition of a target table in InfoSphere CDCmetadata after you change the definition of the target table in your database.

    Syntax

    Parameters

    -I Specifies the name of the InfoSphere CDC instance. Alternatively, you canspecify the TSINSTANCE environment variable in place of this value.

    -s Specifies the subscription that contains the source table that is mapped to thetarget table which was updated in your database. To specify multiplesubscriptions, list the subscriptions separated by a space.

    -A Specifies that InfoSphere CDC updates definitions for all target tables in thesubscription.

    28 InfoSphere Change Data Capture: End-User Documentation

  • -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Result

    This command returns a value of 0 if the operation was successful. If it fails, thiscommand returns a non-zero value.

    Example

    dmreassigntable -I NEWINSTANCE -s FINANCE -A

    InfoSphere CDC updates definitions for all target tables in the Financesubscription.

    Monitoring replication commandsThis section contains commands that help you monitor replication in InfoSphereCDC.

    See also:“dmclearevents - Clear Events”“dmshowevents - Show Events” on page 30

    dmclearevents - Clear Events

    Use this command to delete events from the Event Log view in ManagementConsole.

    Syntaxdmclearevents [-I ] [-S|-T-|-B]

  • Result

    This command returns a value of 0 if the command was successful and a non-zerovalue if the command fails.

    Examples

    dmclearevents -I MYINSTANCE -S -A

    InfoSphere CDC clears events from the source for all subscriptions for the specifiedinstance.

    dmclearevents -I MYINSTANCE -T -s FINANCE MARKETING

    InfoSphere CDC clears events from both the source and target for the Finance andMarketing subscriptions for the specified instance.

    dmshowevents - Show Events

    Use this command to display InfoSphere CDC events to standard output. You canuse this command as an alternative to showing InfoSphere CDC events in theEvent Log view in Management Console.

    The output of this command shows events in chronological order with the mostrecent event shown first in the list.

    Syntaxdmshowevents [-I ] [-h] [-c max_msg][-L ]

    ordmshowevents -I ...> [-h] [-c ] [-L ]

    Parameters

    -I Specifies the name of the InfoSphere CDC instance. Alternatively, you canspecify the TSINSTANCE environment variable in place of this value.

    -a Specifies that InfoSphere CDC shows events for all subscriptions.

    -s Specifies the name of the subscription for which InfoSphere CDC displayssource events. To specify multiple subscriptions, list the subscriptionsseparated by a space.

    -t Specifies the source ID of the subscription for which InfoSphere CDC displaystarget events. List the source IDs if you specify more than one.

    -h Specifies that InfoSphere CDC displays a header before the list of events. Thisoption helps you identify each item of information that is displayed for eachevent.

    -c Specifies the maximum number of events that InfoSphere CDC displays. If you

    30 InfoSphere Change Data Capture: End-User Documentation

  • omit this parameter or you specify a value greater than the total number ofevents, InfoSphere CDC displays all events for the specified subscriptions andsource IDs.v Minimum Setting—0. No events are shown.v Maximum Setting—2147483647

    -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Result

    This command returns a value of 0 if the operation was successful. If it fails, thiscommand returns a non-zero value.

    Examples

    dmshowevents -I NEWINSTANCE -s FINANCE

    InfoSphere CDC displays all events for the Finance subscription for the specifiedinstance.

    dmshowevents -I MYINSTANCE –a –h

    InfoSphere CDC displays all events for all subscriptions. A header is displayedbefore the list of events for the specified instance.

    dmshowevents -I NEWINSTANCE –s FINANCE MARKETING –t ATLANTA –h –c 20

    InfoSphere CDC displays the most recent 20 events for the Finance and Marketingsubscriptions and for the Atlanta source ID. A header is displayed before the list ofevents for the specified instance.

    Sample outputTIME|AGENTTYPE|SUBSCRIPTION|EVENTID|SEVERITY|EVENTPROGRAM|EVENTTEXT

    2006-04-21 17:23:08.817|T|ATLANTA|95|Information|class com.datamirror.ts.target.publication.c|IBM InfoSphere Change Data Capture Communications ending.

    2006-04-21 17:23:08.614|T|ATLANTA|1538|Information|class com.datamirror.ts.target.publication.c|---IBM InfoSphere Change Data Capture for ATLANTA terminatingnormally.

    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 targetdatabase’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 identifiedin the first line of the output. In the AGENTTYPE field, S indicates source and Tindicates target.

    Commands for InfoSphere CDC 31

  • Exporting and importing configuration commandsThis section contains commands that allow you to export and/or import yourInfoSphere CDC global configuration.

    See also:“dmexportconfiguration - Export InfoSphere CDC Configuration”“dmimportconfiguration - Import InfoSphere CDC Configuration”

    dmexportconfiguration - Export InfoSphere CDC Configuration

    Use this command to export the configuration details of an installed instance ofInfoSphere CDC. Configuration details are sent to an XML configuration file. Youcan use the dmimportconfiguration command to import the XML file that youcreate with this command into another instance of InfoSphere CDC.

    Note: This command does not export subscription-specific settings that areconfigured in Management Console. Subscription-specific settings can be exportedto an XML file in Management Console. For more information, see yourManagement Console documentation.

    Note: This command is interactive and will prompt you for your password. Youcannot script this command.

    Syntaxdmexportconfiguration [-L ]

    Parameters

    The absolute path to the XML configuration file that you want to export.

    -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Result

    This command returns a value of 0 if the command was successful and a non-zerovalue if the command fails.

    Examples

    dmexportconfiguration c:\configuration.xml

    InfoSphere CDC exports the XML file to the specified absolute path.Related reference

    “dmimportconfiguration - Import InfoSphere CDC Configuration”

    dmimportconfiguration - Import InfoSphere CDC Configuration

    Use this command to import the InfoSphere CDC configuration settings from anXML file which you created with the dmexportconfiguration command.

    32 InfoSphere Change Data Capture: End-User Documentation

  • Syntaxdmimportconfiguration [-L ]

    Parameters

    The absolute path to the XML configuration file that you are importing.

    -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Result

    This command returns a value of 0 if the command was successful and a non-zerovalue if the command fails.

    Examplesdmimportconfiguration c:\configuration.xml

    InfoSphere CDC imports the XML configuration file from the specified absolutepath.Related reference

    “dmexportconfiguration - Export InfoSphere CDC Configuration” on page 32

    Other commandsThis section contains miscellaneous commands that allow you to determine theversion of InfoSphere CDC, verify communications, stop InfoSphere CDC, setsystem parameters, and back up your metadata.

    See also:“dmbackupmd Backup Metadata”“dmconfigurets - Configure InfoSphere CDC” on page 34“dmset - Set InfoSphere CDC System Parameter” on page 34“dmshowversion - Show InfoSphere CDC Version” on page 35“dmshutdown - Shut Down InfoSphere CDC” on page 35“dmsupportinfo - Collect IBM Support Information” on page 37“dmts64 - Start InfoSphere CDC” on page 38“dmmdcommander” on page 38“dmmdconsole” on page 38

    dmbackupmd Backup Metadata

    Use this command to create a backup of the InfoSphere CDC metadata databasewhich contains information about your current replication configuration. Youshould always back up your metadata when there are changes to your subscriptionconfiguration and table status. You can only back up your metadata whileInfoSphere CDC is running.

    The backup of the metadata database is created in \instance\\conf\backup. The files in the backup directory should bestored on separate media for possible recovery.

    Commands for InfoSphere CDC 33

  • Syntaxdmbackupmd [-I ] [-L ]

    Parameters

    -I Specifies the name of the InfoSphere CDC instance. Alternatively, you canspecify the TSINSTANCE environment variable in place of this value.

    -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Result

    This command returns a value of 0 if the command was successful and a non-zerovalue if the command fails.

    dmconfigurets - Configure InfoSphere CDC

    Use this command to launch the InfoSphere CDC configuration tool. You can usethis tool to create instances and configure your installation of InfoSphere CDC.

    Syntaxdmconfigurets [-L ]

    Parameters

    -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Result

    This command returns a value of 0 if the command was successful and a non-zerovalue if the command fails.

    dmset - Set InfoSphere CDC System Parameter

    Use this command to view or change InfoSphere CDC system parameters. You canalso change system parameters in Management Console. For more information, seeyour Management Console documentation.

    Note: You can set any system parameter using this command. However, it willonly display system parameters that are set to non-default values.

    Syntaxdmset [-I ] [[=[]]] [-L ]

    Parameters

    -I Specifies the name of the InfoSphere CDC instance. Alternatively, you canspecify the TSINSTANCE environment variable in place of this value.

    Specifies the name of the InfoSphere CDC system parameter.

    34 InfoSphere Change Data Capture: End-User Documentation

  • Specifies the value that you want to assign to the system parameter.

    -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Result

    This command returns a value of 0 if the command was successful and a non-zerovalue if the command fails.

    Examples

    dmset -I MYINSTANCE

    Displays all of the system parameters that are set to non-default values.

    dmset -I MYINSTANCE global_unicode_as_char=false

    Sets the global_unicode_as_char system parameter to false.

    dmset -I MYINSTANCE global_unicode_as_char

    Displays the current value of the specified parameter.

    dmset -I MYINSTANCE stop_replication=

    Deletes the stop_replication system parameter.

    dmshowversion - Show InfoSphere CDC Version

    Use this command to display the InfoSphere CDC version and build number. Runthis command before you contact your IBM representative.

    Syntaxdmshowversion [-L ]

    Parameters

    -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Result

    This command returns a value of 0 if the operation was successful. If it fails, thiscommand returns a non-zero value.

    dmshutdown - Shut Down InfoSphere CDC

    Use this command to stop an instance of InfoSphere CDC. This command is oftenused prior to taking a server or database offline for maintenance purposes orupgrading InfoSphere CDC.

    Commands for InfoSphere CDC 35

  • Note: As a best practice before you run this command and to ensure that itcompletes successfully, use the dmendreplication command to end replication onall subscriptions that use the instance specified in this command.

    To end replication on subscriptions that use the specified instance, you can use the–a parameter which will generate an error when forcefully ending replication onsubscriptions that use the instance as a target.

    If this command does not end InfoSphere CDC processes and stop the specifiedinstance, use the dmterminate command on the UNIX and Linux platform to forcea complete shut down.

    Syntaxdmshutdown [-I ] [-c|-i|-a] [-L ]

    Parameters

    -I Specifies the name of the InfoSphere CDC instance. Alternatively, you canspecify the TSINSTANCE environment variable in place of this value.

    -c Specifies that InfoSphere CDC stops the specified instance with the Normaloption. InfoSphere CDC will use this option by default if you do not specify -ior –a. The instance will only stop if no subscriptions are currently running.

    Normal is the most appropriate option for most business requirements and isthe preferred method for stopping an instance in most situations.

    -i Specifies that InfoSphere CDC stops the specified instance with the Immediateoption. The instance will only stop if no subscriptions are currently running.

    Starting the target instance after using this option can be slower than -c.

    -a Specifies that InfoSphere CDC stops the specified instance and ends replicationon all subscriptions that use the instance with the Abort option. Subscriptionsthat use the specified instance will end replication with an error.

    This option stops all in progress work and then ends replication rapidly.Starting replication on subscriptions after using this option can be much slowerthan using -c. A refresh in progress will be interrupted and the target will stopprocessing any data that has not been committed before replication ends.

    Attention: Use this option if your business reasons require a rapid end toreplication and you are willing to tolerate a much slower start when youresume replication on the specified subscriptions.

    A sudden business requirement for an unplanned shutdown of your sourcesystem may require this option for ending replication.

    Note: As a best practice, use the dmendreplication command to endreplication on all subscriptions that use the instance specified in this command.

    -L The name of the locale used for the InfoSphere CDC instance. The default isthe locale of the machine where InfoSphere CDC is installed.

    Result

    This command returns a value of 0 if the command was successful and a non-zerovalue if the command fails.

    36 InfoSphere Change Data Capture: End-User Documentation

  • Examples

    dmshutdown -I MYINSTANCE -c

    InfoSphere CDC stops the specified instance with the Normal option. The instancewill only stop if no subscriptions are currently running.

    dmshutdown -I MYINSTANCE –a

    InfoSphere CDC stops the specified instance and ends replication with the Abortoption for all subscriptions that use the instance. Subscriptions that use thespecified instance will end replication with an error.

    dmsupportinfo - Collect IBM Support Information

    Note: You should only run this command when the Management Console SupportAssistant cannot connect to your InfoSphere CDC datastore because it is notrunning or it will not run. For more information on the Support Assistant, seeManagement Console - Administration Guide.

    Use this command (when requested by IBM Technical Support) to collectInfoSphere CDC environment information in a generated .zip file that is used todiagnose and troubleshoot your support issue.

    Once the command has completed collecting information and generating the .zipfile, the output will display the full path and name of the .zip file. If you run thiscommand multiple times, the generated .zip files are numbered randomly. Notethat you are responsible for deleting the generated .zip files when they are nolonger required.

    Syntaxdmsupportinfo [-I ] [-t ] [-L ]

    Parameters

    -I Specifies the name of the InfoSphere CDC instance. Alternatively, you canspecify the TSINSTANCE environment variable in place of this value.

    If you do not specify an instance (possibly because you could not create aninstance), this command will only collect non-instance specific information.

    -t Specifies the date and time range (relative to the time zone of the operatingsystem where you issue this command) used by InfoSphere CDC to retrieveenvironment information.

    Note: As a best practice, specify a date and time range that only captures thetime period when you experienced problems. This allows for easier problemdiagnosis and reduces the size of the files retrieved.

    -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Commands for InfoSphere CDC 37

  • Result

    This command returns a value of 0 if the command was successful and a non-zerovalue if the command fails.

    Example

    dmsupportinfo -I PRODUCTION -t "2009-12-03 08:00:00 to 2009-12-03 12:00:00"

    Retrieves support information for the Production instance from 8:00 AM to 12:00PM on December 3, 2009. This is the time range when you experienced supportissues with this instance of InfoSphere CDC.Related concepts

    “Troubleshooting and contacting IBM Support” on page 43

    dmts64 - Start InfoSphere CDC

    Use this command to start a 64-bit instance of InfoSphere CDC.

    Syntaxdmts64 [-I ] [-L ]

    Parameters

    -I Specifies the InfoSphere CDC instance for which you want to start.

    -L The name of the locale used for the InfoSphere CDC instance. The default isyour machine's locale.

    Result

    This command returns a value of 0 if the command was successful and a non-zerovalue if the command fails.

    Examples

    dmts64 -I MYINSTANCE

    InfoSphere CDC starts for the specified instance.

    dmmdcommander

    This command is for internal use only.

    dmmdconsole

    This command is for internal use only.

    38 InfoSphere Change Data Capture: End-User Documentation

  • User exits for InfoSphere CDC

    A user exit lets you define a set of actions that InfoSphere CDC can run before orafter a database event occurs on a specified table. User exits allow you tocustomize your environment to meet your business requirements. After compilingthe user exit, you can specify the user exit in Management Console. For moreinformation, see your Management Console documentation.

    Note: When developing user exits with InfoSphere CDC for Netezza databases,there is no capability provided to retrieve a connection to the target Netezzadatabase.

    InfoSphere CDC provides the following type of user exit:v Java class—This type of user exit utilizes the InfoSphere CDC API. For more

    information, see the API reference Javadocs.

    Sample Java class user exits are also provided with InfoSphere CDC. You canextend or modify these samples to suit your environment.

    In this section, you will learn:“Sample Java class user exits for InfoSphere CDC”“InfoSphere CDC API reference – Javadocs” on page 40

    Sample Java class user exits for InfoSphere CDCInfoSphere CDC provides sample user exits that you can extend or modify to suityour environment. The samples are found in samples.jar, which is located in thesamples directory in your InfoSphere CDC installation directory. The Java filecontains the following samples:v DEUserExitSample.java—used in expressions using the %USERFUNC column

    function. It calculates the sum of the user-supplied parameters (in theexpression) and returns the sum incremented by 1. This sample is located incom.datamirror.ts.derivedexpressionmanager.

    v UserExitSample.java—subscribes to replication events to retrieve the details ofthe events which took place. This sample is located incom.datamirror.ts.target.publication.userexit.sample.

    v UserExitSample1.java—records new rows inserted into a table on the target andstores them in a text file. The user specifies the name of the text file as aparameter. This sample is located incom.datamirror.ts.target.publication.userexit.sample.

    Note the following:v To run the sample user exits without modifying them, you must specify the fully

    qualified path to the compiled user exit in Management Console. For example,com.datamirror.ts.target.publication.userexit.sample.UserExitSample.

    v Compiled sample user exits are located in the ts.jar file which is found in thelib directory in your InfoSphere CDC installation directory. Note that thecompiled user exits in the ts.jar file have a *.class extension.

    v If you want to modify the sample user exits, you must compile the user exitafter you make changes to the source code.

    © Copyright IBM Corp. 2011 39

  • v The user exit class must also be in your classpath.

    For more information on how to specify Java class user exits in ManagementConsole, see your Management Console documentation.

    See also:“To compile the sample Java class user exits (UNIX and Linux)”

    To compile the sample Java class user exits (UNIX and Linux)1. Stop InfoSphere CDC.2. Unzip the samples.jar file into the lib directory in your InfoSphere CDC

    installation directory. Make sure you maintain the directory structure whenunzipping the jar file.After unzipping the jar file, you will have a directory structure like thefollowing:/lib/com/datamirror/ts/target/publication/userexit/sample

    3. Make your changes to the sample user exit.4. Compile the modified user exit. For example, if you want to compile

    UserExitSample.java, open a command window, navigate to the lib directoryand issue the following command:javac -classpath ts.jar:. com/datamirror/ts/target/publication/userexit/sample/UserExitSample.java

    If this command runs successfully, there will be no output on your screen.

    Note: Your system must have the Java JDK to run this command.5. After running the command successfully, navigate to the following directory

    and confirm that you have created a UserExitSample.class file:/lib/com/datamirror/ts/target/publication/userexit/sample

    6. Start InfoSphere CDC.7. The final step to configure the user exit is to specify the fully qualified path to

    UserExitSample in Management Console. For example:com.datamirror.ts.target.publication.userexit.sample.UserExitSample

    Note: Do not specify the .class extension.

    For more information on how to specify Java class user exits in ManagementConsole, see your Management Console documentation.

    Note: If you plan to use the sample user exits in production environments, youwill have to test the samples before they are deployed. IBM does not assumeresponsibility for adverse results caused by modified or customized user exitclasses.

    InfoSphere CDC API reference – JavadocsThe API reference is available in Javadoc format in your InfoSphere CDCinstallation directory. To view the API reference, navigate to the api directorybelow and click the index.html file to open the Javadoc documentation in yourbrowser:v Windows—\docs\api

    40 InfoSphere Change Data Capture: End-User Documentation

  • v UNIX—/docs/api

    User exits for InfoSphere CDC 41

  • 42 InfoSphere Change Data Capture: End-User Documentation

  • Troubleshooting and contacting IBM Support

    The following support page contains the latest troubleshooting information anddetails on how to open a service request with IBM Support:v http://www.ibm.com/software/data/infosphere/support/change-data-capture/

    For contact information in your region:v http://www.ibm.com/planetwide/Related reference

    “dmsupportinfo - Collect IBM Support Information” on page 37

    © Copyright IBM Corp. 2011 43

    http://www.ibm.com/software/data/infosphere/support/change-data-capture/http://www.ibm.com/planetwide/

  • 44 InfoSphere Change Data Capture: End-User Documentation

  • Notices

    This information was developed for products and services offered in Canada.

    IBM may not offer the products, services, or features discussed in this document inother countries. Consult your local IBM representative for information on theproducts and services currently available in your area. Any reference to an IBMproduct, program, or service is not intended to state or imply that only that IBMproduct, program, or service may be used. Any functionally equivalent product,program, or service that does not infringe any IBM intellectual property right maybe used instead. However, it is the user's responsibility to evaluate and verify theoperation of any non-IBM product, program, or service.

    IBM may have patents or pending patent applications covering subject matterdescribed in this document. The furnishing of this document does not grant youany license to these patents. You can send license inquiries, in writing, to:

    IBM Director of LicensingIBM CorporationNorth Castle DriveArmonk, NY 10504-1785U.S.A.

    For license inquiries regarding double-byte (DBCS) information, contact the IBMIntellectual Property Department in your country or send inquiries, in writing, to:

    Intellectual Property LicensingLegal and Intellectual Property LawIBM Japan Ltd.1623-14, Shimotsuruma, Yamato-shiKanagawa 242-8502 Japan

    The following paragraph does not apply to the United Kingdom or any othercountry where such provisions are inconsistent with local law:INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THISPUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHEREXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESSFOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express orimplied warranties in certain transactions, therefore, this statement may not applyto you.

    This information could include technical inaccuracies or typographical errors.Changes are periodically made to the information herein; these changes will beincorporated in new editions of the publication. IBM may make improvementsand/or changes in the product(s) and/or the program(s) described in thispublication at any time without notice.

    Any references in this information to non-IBM Web sites are provided forconvenience only and do not in any manner serve as an endorsement of those Websites. The materials at those Web sites are not part of the materials for this IBMproduct and use of those Web sites is at your own risk.

    © Copyright IBM Corp. 2011 45

  • IBM may use or distribute any of the information you supply in any way itbelieves appropriate without incurring any obligation to you.

    Licensees of this program who wish to have information about it for the purposeof enabling: (i) the exchange of information between independently createdprograms and other programs (including this one) and (ii) the mutual use of theinformation which has been exchanged, should contact:

    IBM Canada Limited Office of the Lab Director8200 Warden AvenueMarkham, OntarioL6G 1C7CANADA

    Such information may be available, subject to appropriate terms and conditions,including in some cases, payment of a fee.

    The licensed program described in this information and all licensed materialavailable for it are provided by IBM under terms of the IBM Customer Agreement,IBM International Program License Agreement, or any equivalent agreementbetween us.

    Any performance data contained herein was determined in a controlledenvironment. Therefore, the results obtained in other operating environments mayvary significantly. Some measurements may have been made on development-levelsystems and there is no guarantee that these measurements will be the same ongenerally available systems. Furthermore, some measurements may have beenestimated through extrapolation. Actual results may vary. Users of this documentshould verify the applicable data for their specific environment.

    Information concerning non-IBM products was obtained from the suppliers ofthose products, their published announcements or other publicly available sources.IBM has not tested those products and cannot confirm the accuracy ofperformance, compatibility or any other claims related to non-IBM products.Questions on the capabilities of non-IBM products should be addressed to thesuppliers of those products.

    All statements regarding IBM's future direction or intent are subject to change orwithdrawal without notice, and represent goals and objectives only.

    All IBM prices shown are IBM's suggested retail prices, are current and are subjectto change without notice. Dealer prices may vary.

    This information is for planning purposes only. The information herein is subject tochange before the products described become available.

    This information contains examples of data and reports used in daily businessoperations. To illustrate them as completely as possible, the examples include thenames of individuals, companies, brands, and products. All of these names arefictitious and any similarity to the names and addresses used by an actual businessenterprise is entirely coincidental.

    COPYRIGHT LICENSE:

    This information contains sample application programs in source language, whichillustrate programming techniques on various operating platforms. You may copy,

    46 InfoSphere Change Data Capture: End-User Documentation

  • modify, and distribute these sample programs in any form without payment toIBM, for the purposes of developing, using, marketing or distributing applicationprograms conforming to the application programming interface for the operatingplatform for which the sample programs are written. These examples have notbeen thoroughly tested under all conditions. IBM, therefore, cannot guarantee orimply reliability, serviceability, or function of these programs.

    Each copy or any portion of these sample programs or any derivative work, mustinclude a copyright notice as follows:

    © (your company name) (year). Portions of this code are derived from IBM Corp.Sample Programs. © Copyright IBM Corp. _enter the year or years_. All rightsreserved.

    If you are viewing this information softcopy, the photographs and colorillustrations may not appear.

    TrademarksIBM, the IBM logo, and ibm.com® are trademarks of International BusinessMachines Corp., registered in many jurisdictions worldwide. Other product andservice names might be trademarks of IBM or other companies. A current list ofIBM trademarks is available on the Web at "Copyright and trademark information"at http://www.ibm.com/legal/copytrade.shtml.

    Linux is a trademark of Linus Torvalds in the United States, other countries, orboth.

    Microsoft, Windows, Windows NT, and the Windows logo are trademarks ofMicrosoft Corporation in the United States, other countries, or both.

    Netezza is a trademark or registered trademark of Netezza Corporation, an IBMCompany.

    UNIX is a registered trademark of The Open Group in the United States and othercountries.

    Java and all Java-based trademarks and logos are trademarks or registeredtrademarks of Oracle and/or its affiliates.

    Other company, product, or service names may be trademarks or service marks ofothers.

    Notices 47

    http://www.ibm.com/legal/copytrade.shtml

  • 48 InfoSphere Change Data Capture: End-User Documentation

  • ����

    Printed in USA

    ContentsAbout InfoSphere CDC and InfoSphere CDC Management ConsoleSystem requirementsSupported operating systems and processorsSupported Netezza JDBC driversSupported databasesDisk space requirementsRAM requirementsPort requirements

    Before you installRequired database, user accounts, and privilegesAssessing disk space and memory requirementsNetezza specific considerations for InfoSphere CDCPreparing your environment for an installation of InfoSphere CDCCalculating database connections required by InfoSphere CDC

    Installing InfoSphere CDCInstalling InfoSphere CDCTo install InfoSphere CDC (Linux)

    Installing InfoSphere CDC using a silent installationTo perform a silent installation of InfoSphere CDC (Linux)

    Configuring InfoSphere CDC (Linux)To add a new instance of InfoSphere CDC (Linux)To edit an instance of InfoSphere CDC (Linux)To delete an instance of InfoSphere CDC (Linux)

    After you install and configureTo start InfoSphere CDC (Linux)To stop InfoSphere CDC (Linux)Privileges required by users

    Maintaining active TCP connections in a network environmentTo maintain active TCP connections

    Data types supported by InfoSphere CDCMetadata tablesCommands for InfoSphere CDCUsing the InfoSphere CDC commandsSetting the TSINSTANCE environment variableDatabase transaction log commandsdmshowbookmark - Display Bookmark Information

    Managing tables for replication commandsdmreassigntable - Update Target Table Definition

    Monitoring replication commandsdmclearevents - Clear Eventsdmshowevents - Show Events

    Exporting and importing configuration commandsdmexportconfiguration - Export InfoSphere CDC Configurationdmimportconfiguration - Import InfoSphere CDC Configuration

    Other commandsdmbackupmd Backup Metadatadmconfigurets - Configure InfoSphere CDCdmset - Set InfoSphere CDC System Parameterdmshowversion - Show InfoSphere CDC Versiondmshutdown - Shut Down InfoSphere CDCdmsupportinfo - Collect IBM Support Informationdmts64 - Start InfoSphere CDCdmmdcommanderdmmdconsole

    User exits for InfoSphere CDCSample Java class user exits for InfoSphere CDCTo compile the sample Java class user exits (UNIX and Linux)

    InfoSphere CDC API reference – Javadocs

    Troubleshooting and contacting IBM SupportNoticesTrademarks