ISCDC For Oracle
ISCDC For Oracle
ISCDC For Oracle
Version 6.5
Note Before using this information and the product it supports, read the information in Notices on page 93.
First edition This edition applies to version 6, release 5 of IBM InfoSphere Change Data Capture (product number 5724-U70) and to all subsequent releases and modifications until otherwise indicated in new editions. Copyright IBM Corporation 2008, 2010. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Contents
About InfoSphere CDC and InfoSphere CDC Management Console . . . . . . 1 System requirements . . . . . . . . . 3
Supported operating systems and Supported databases. . . . . Hardware requirements. . . . Port requirements. . . . . . processors . . . . . . . . . . . . . . . . . . . . . . . . 3 3 4 4
Configuring InfoSphere CDC for OS (operating system) clustering (UNIX and Linux) . . . . . . . . . . . . . 25
Performing a forced or manual failover of InfoSphere CDC . . . . . . . . . . Preparing for a failover of InfoSphere CDC . . . . . . 26 . 26
. . . . . . . . . . 5
5 6 6 7 7 8 8 8
Required database, user accounts, and schemas. . . Allocating disk quota for capture components . . . Enabling supplemental logging . . . . . . . . Enabling InfoSphere CDC to use a bulk load refresh Setting the database instance to ARCHIVELOG mode Starting the Oracle listener. . . . . . . . . . Setting up a remote connection . . . . . . . . To setup a remote connection . . . . . . . .
. 30 . 30 31 . 31 . 31 . 31 . 32
iii
dmgetsubscriptionstatus - Get subscription status dmshowevents - Display InfoSphere CDC events Exporting and importing configuration commands dmexportconfiguration - Export InfoSphere CDC Configuration . . . . . . . . . . . . dmimportconfiguration - Import InfoSphere CDC Configuration . . . . . . . . . . . . Continuous Capture and staging store commands dmenablecontinuouscapture - Enable Continuous Capture . . . . . . . . . . . . . . dmdisablecontinuouscapture - Disable Continuous Capture . . . . . . . . . . dmgetstagingstorestatus - Retrieve Staging Store status . . . . . . . . . . . . . . . dmclearstagingstore - Remove cached operations from the staging store . . . . . . . . . . Other commands . . . . . . . . . . . . dmbackupmd - Backup Metadata . . . . . . dmconfigurets - Configure InfoSphere CDC . . dmmdcommander . . . . . . . . . . . dmmdconsole . . . . . . . . . . . . dmset - Set InfoSphere CDC system parameter dmshowversion - Show InfoSphere CDC version dmshutdown - Shut down InfoSphere CDC . . dmsupportinfo - Collect IBM Support information . . . . . . . . . . . . . dmterminate - Terminate InfoSphere CDC processes . . . . . . . . . . . . . . dmts32 - Start InfoSphere CDC . . . . . . .
61 62 63 64 64 65 66 66 66 67 67 68 68 69 69 69 70 70 72 73 74
. .
. .
. .
. .
. .
. 74 . 75
iv
The key components of the InfoSphere CDC architecture are described below: v Access ServerControls all of the non-command line access to the replication environment. When you log in to Management Console, you are connecting to Access Server. v Admin APIOperates as an optional Java-based programming interface that you can use to script operational configurations or interactions. After you have set up replication, Management Console can be closed on the client workstation without affecting active data replication activities between source and target servers. v Apply agentActs as the agent on the target that processes changes as sent by the source. v Command line interfaceAllows you to administer datastores and user accounts, as well as to perform administration scripting, independent of Management Console.
Copyright IBM Corp. 2008, 2010
v Communication Layer (TCP/IP)Acts as the dedicated network connection between the Source and the Target. v DatastoreThe Source and Target datastores represent the data files and InfoSphere CDC instances required for data replication. Each datastore represents a database to which you want to connect and acts as a container for your tables. Tables made available for replication are contained in a datastore. v InfoSphere CDC Management ConsoleThe interactive application that you use to configure and monitor replication. It allows you to manage replication on various servers, specify replication parameters, and initiate refresh and mirroring operations from a client workstation. Management Console also allows you to monitor replication operations, latency, event messages, and other statistics supported by the source or target datastore. The monitor in Management Console is intended for time-critical working environments that require continuous analysis of data movement. v MetadataRepresents the information about the relevant tables, mappings, subscriptions, notifications, events, and other particulars of a data replication instance that you set up. v MirrorPerforms the replication of changes to the target table or accumulation of source table changes used to replicate changes to the target table at a later time. If you have implemented bidirectional replication in your environment, mirroring can occur to and from both the source and target tables. v RefreshPerforms the initial synchronization of the tables from the source database to the target. This is read by the Refresh reader. v Replication EngineServes to send and receive data. The process that sends replicated data is the Source Capture Engine and the process that receives replicated data is the Target Engine. An InfoSphere CDC instance can operate as a source capture engine and a target engine simultaneously. v Single ScrapeActs as a source-only log reader and a log parser component. It checks and analyzes the source database logs for all of the subscriptions on the selected datastore. v Source transformation engineUsed to process row filtering, critical columns, column filtering, encoding conversions, and other data to propagate to the target datastore engine. v Source database logsMaintained by the source database for its own recovery purposes. The InfoSphere CDC log reader inspects these in the mirroring process, but only looks for those tables that are mapped for replication. v Target transformation engineUsed to process data and value translations, encoding conversions, user exits, conflict detections, and other data on the target datastore engine. There are two types of target-only destinations for replication that are not databases: v JMS MessagesActs as a JMS message destination (queue or topic) for row-level operations that are created as XML documents. v InfoSphere DataStageProcesses changes delivered from InfoSphere CDC that can be used by InfoSphere DataStage jobs. For more information on how to install Management Console and Access Server, see Access Server and Management Console - Installation Guide. For information on how to install your source and target replication engines, see the end-user documentation for your replication engine platform.
System requirements
Before you install InfoSphere CDC, ensure that the system you choose meets the necessary operating system, hardware, software, communications, disk, and memory requirements. In this section, you will learn: Supported operating systems and processors Supported databases Hardware requirements on page 4 Port requirements on page 4
Note: If you are upgrading your operating system to a more recent version, you should also consider upgrading InfoSphere CDC to the latest version to ensure support for the upgraded operating system.
Supported databases
Database Install Oracle Client software and one of the following versions of the Oracle database: v Oracle 9i (release 9.2.0.5 or later) v Oracle 10g (release 10.1.0.4 or later) v Oracle 11g (release 11gR1 and 11gR2) If you are configuring InfoSphere CDC for an Oracle RAC environment, the following versions of Oracle are supported: v Oracle 9i (release 9.2.0.5 or later) v Oracle 10gR2 v Oracle 11g (release 11gR1 and 11gR2)
Note: If you are upgrading your database to a more recent version, you should also consider upgrading InfoSphere CDC to the latest version to ensure support for the upgraded database.
Hardware requirements
RAM 1 GB Available for IBM processes. Disk space 5 GBFor installation files. Oracle tablespace for InfoSphere CDC metadata 25 MBThis is only an estimate and depends on the size of your replication configuration.
Port requirements
InfoSphere CDC requires that you allocate a port for communication with client workstations running Management Console and other servers. The port must be accessible through a firewall, although you do not require access to the internet.
Protocol TCP Default port 11111 Purpose Accepts connections from: v Management Console v Other installations of InfoSphere CDC as a source of replication v Command line utilities For more information on how to install Management Console, see Management Console and Access Server Installation Guide.
Note: If you plan to use a read-only database connection, ensure that you have the DBMS_FLASHBACK Oracle supplied package installed. By default, this package is installed when you create an Oracle database and run the CATPROC.SQL script. No further action is required for this package. For more information about this package, refer to your Oracle documentation.
following SQL statement: select suppplemental_log_data_min from v$database; If supplemental logging is enabled, the returned value will be YES or IMPLICIT. v Table level supplemental loggingInfoSphere CDC also requires full supplemental logging at the table level for those tables you have selected for InfoSphere CDC to replicate using the mirroring replication method. This supplemental logging is typically handled by InfoSphere CDC, unless you are using a read-only database connection to the source database. For a read-only database environment, before configuring subscriptions that involve tables for mirroring, ensure that you have sufficient supplemental logging enabled for those tables. During InfoSphere CDC subscription configuration, the application checks to see if the required logging is enabled. If sufficient table supplemental logging is not enabled, thenInfoSphere CDC will return errors and does not complete the configuration. The appropriate setting for table level supplemental logging (by database version) is: Oracle 9ienable full supplemental logging with conditional supplemental log groups. Oracle 10g or higher enable full supplemental logging with conditional or unconditional supplemental log groups. To enable supplemental logging at the database level and table level, contact your Oracle database administrator. For more information on the command that enables supplemental logging, see your Oracle documentation.
reading the logs through the file system. If the database produces high volumes of logs, you should consider multiplexing the logs by configuring a log destination outside ASM.
8. If the absolute paths of the directories containing the online logs differ between the local server and the remote server, add the mirror_online_log_directory system parameter in Management Console: 9. Set the value of this system parameter to match the mount point on the local server.
10
11
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. Type 1 to launch the configuration tool. Note: If you have X-Windows installed, the installation program will launch the configuration tool in a graphical environment. Related concepts Configuring InfoSphere CDC (UNIX and Linux) on page 21
12
<installation_binary_name> -r <response-file> where: v <response-file> is the full path to the installation file. 5. On another system, perform the silent installation by running the following command: <installation_binary_name> -i silent -f <response-file> where: v <response-file> is the full path to the installation file. Related tasks To install InfoSphere CDC (UNIX and Linux) on page 11
13
14
To upgrade from Transformation Server for Oracle to InfoSphere CDC for Oracle
1. Ensure you have an existing installation of Transformation Server for Oracle version 6.0 (Service Pack 3 and later) on a database server. 2. Install InfoSphere CDC for Oracle version 6.5 on the same database server where you have installed Transformation Server for Oracle version 6.0 (Service Pack 3 TFE 28 and later). 3. Ensure both instances of Transformation Server for Oracle and InfoSphere CDC are started. 4. End any active replication. 5. Upgrade existing subscriptions and transfer existing bookmarks from Transformation Server for Oracle version 6.0 (Service Pack 3 TFE 28 and later) to InfoSphere CDC for Oracle version 6.5 in Management Console. For more information, see Upgrading existing Transformation Server subscriptions to InfoSphere CDC in your Management Console documentation. Related reference dmts64 - Start InfoSphere CDC on page 74 dmts32 - Start InfoSphere CDC on page 74 dmendreplication - End replication on page 40
15
16
17
18
Where: v racsystemvipvirtual IP for your RAC environment. v racsid.racystem.comservice name for your RAC environment. v instancesidunique name of this instance in your RAC environment. When creating an InfoSphere CDC instance for your RAC environment in the InfoSphere CDC configuration tool, select the service that you defined in this procedure when prompted to select a TNS. You must select a single node (considered the main node by InfoSphere CDC), not the entire RAC instance. Related concepts Installing InfoSphere CDC in an Oracle Real Application Clusters (RAC) environment on page 17 Installing InfoSphere CDC on page 11 Related tasks To add a new instance of InfoSphere CDC (UNIX and Linux) on page 21 Creating a failover script for InfoSphere CDC in an Oracle RAC environment
19
20
2. At the welcome message, press Enter to continue. 3. Type the name of the instance and press Enter to add a new instance of InfoSphere CDC. 4. Type 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 11001. Press Enter. Note: This port number cannot be used by other applications installed on the same server. You will use this port number when specifying access parameters for your datastore in the Access Manager perspective in Management Console. For more information, see your Management Console documentation. Note: For more information on the port requirements for InfoSphere CDC, see Port requirements on page 4. 5. If you are using the auto-discovery feature in Access Manager, then enable the this feature by typing the UDP port number that you set in Access Server. The default port is 2222. InfoSphere CDC uses this UDP port number for auto-discovery broadcasts sent from Access Server. Otherwise, press Enter to disable.
Copyright IBM Corp. 2008, 2010
21
6. Depending on the bit version of your server, type 32 or 64 and press Enter. 7. Type the amount of physically available RAM that you want to allocate for this instance of InfoSphere CDC and press Enter. By default, the configuration tool allocates 512 MB of RAM for each 32-bit instance and 1024 MB of RAM for each 64-bit instance. Note: Using values other than the defaults or allocating more RAM than is physically available on your server should only be undertaken after considering the impacts on product performance. 8. If you want to connect to a read-only source database, then type y. If you use a database with read-only privileges, in the step 12, specify the read-only user for that database. If you want read and write access, then type n. Note: Once you have created the instance, this option is set and you cannot connect to a source database with read and write access. 9. Type the path of the Oracle database you want to replicate data to or from and contains all of the tables for replication. This is the database that you configured as part of the pre-installation tasks. Press Enter. 10. Select the TNS name for your Oracle database that you defined in the tnsnames.ora file. If you are configuring an instance for an Oracle RAC environment, consider the following: v With non-ASM managed redo log files, select the Oracle service name that you defined in tnsnames.ora. v With ASM-managed redo log files, select the Oracle SID of the local node where InfoSphere CDC is installed. 11. If you want to specify extra JDBC parameters, then type y. 12. Type the user name (case-sensitive) for the specified database and press Enter. 13. Type the password (case-sensitive) for the specified database and press Enter. The configuration tool will now search the database for schemas. 14. Type the number that corresponds to the database schema used by InfoSphere CDC for metadata tables and press Enter. You can specify any schema except those in use by other installed instances of InfoSphere CDC for the given database. Note: InfoSphere CDC metadata tables contain important configuration information and should be backed up as part of your database backup strategy. 15. The configuration tool creates the InfoSphere CDC instance and prompts you to start the instance. Type y to start the instance. Note: The configuration tool will prompt you if your configuration is about to overwrite the metadata for an existing instance. Related reference dmbackupmd - Backup Metadata on page 68
22
3. Type 1 and press Enter to list the installed instances of InfoSphere CDC. Record the name of the instance you want to modify. 4. Type 3 and press Enter to modify an instance of InfoSphere CDC. 5. Type the instance name that you want to modify and press Enter. The configuration tool allows you to edit a number of values that you specified when adding an instance. 6. After making your changes, type 5 and press Enter to apply your changes and return to the main menu. Type 6 and press Enter to discard your changes.
23
24
Configuring InfoSphere CDC for OS (operating system) clustering (UNIX and Linux)
InfoSphere CDC supports Active/Passive two-node clusters on the UNIX and Linux platforms. Clustering provides continuous access to resources in the event of a hardware failure, software failure, or some other interruption. To implement InfoSphere CDC clustering support in your environment, you must complete all of the following pre-requisite tasks. Note: Prerequisites that only apply to InfoSphere CDC as a clustered source or a clustered target are specified. v Install InfoSphere CDC on the shared drive of the cluster. v Add a new instance of InfoSphere CDC. v Ensure that the server port you specify during configuration of the instance is available and persistent on both nodes of the cluster. InfoSphere CDC listens on this port. v Ensure that InfoSphere CDC connects to the database in the same way on both nodes of the cluster. In other words, database connection parameters such as the path to the database and services must be identical on both nodes of the cluster. v Ensure that all of the database logs required for replication are available. This prerequisite only applies to InfoSphere CDC as a clustered source. v Ensure that the path to the database logs required for replication is identical on both nodes of the cluster. This prerequisite only applies to InfoSphere CDC as a clustered source. v Ensure that every InfoSphere CDC source that connects to the target sees the target in the same way. The target must have a clustered IP address or use the same host name for both nodes of the cluster. This prerequisite only applies to InfoSphere CDC as a clustered target. v Optionally, schedule a regular backup of your InfoSphere CDC metadata and event log messages. Note that metadata will only change when you add or modify subscriptions. You can find more information about this prerequisite in the failover procedure for InfoSphere CDC in this section. Note: You can run the dmshowlogdependency command with the i flag to list the database logs required for replication. In this section, you will learn: Performing a forced or manual failover of InfoSphere CDC on page 26 Preparing for a failover of InfoSphere CDC on page 26
25
Related concepts Configuring InfoSphere CDC instances (UNIX and Linux) on page 21 Related tasks To install InfoSphere CDC (UNIX and Linux) on page 11
26
5. Run the dmclearstagingstore command on the new active node for all instances. 6. Start all subscriptions on the new active node with the dmstartmirror command. Related concepts Starting InfoSphere CDC on page 29 Related tasks Performing a forced or manual failover of InfoSphere CDC on page 26 Related reference dmclearstagingstore - Remove cached operations from the staging store on page 67 dmstartmirror - Start mirroring on page 45
Configuring InfoSphere CDC for OS (operating system) clustering (UNIX and Linux)
27
28
29
Description Use this command to gracefully shut down InfoSphere CDC. If you have multiple active InfoSphere CDC installations on the same UNIX or Linux server, and you want to shut them all down, run this command from the installation directory for each InfoSphere CDC instance.
dmterminate -I <instance_name>
Use this command to terminate all InfoSphere CDC processes for all instances running on a UNIX or Linux server. Use this command when you cannot completely shut down InfoSphere CDC using the dmshutdown command.
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 your network disables idle TCP connections after 15 seconds, you can change the KEEP_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 10 seconds.
30
31
v v v v v v v v v v v v v v v v v v
sys.coltype$ sys.dba_constraints sys.dba_cons_columns sys.dba_indexes sys.dba_ind_columns sys.dba_mviews sys.dba_objects sys.dba_profiles sys.dba_roles sys.dba_rollback_segs sys. dba_sequences sys.dba_tables sys.dba_tablespaces sys.dba_tab_columns sys.dba_users sys.hist_head$ sys.icol$ sys.ind$
v sys.lob$ v sys.nls_database_parameters v sys.obj$ v v v v v v v v v v v v sys.resource_cost sys.tab$ sys.user$ sys.user_role_privs sys.v_$archived_log sys.v_$controlfile sys.v_$database sys.v_$log sys.v_$logfile sys.v_$log_history sys.v_$mystat sys.v_$session
v sys.v_$version
32
Operation privileges
By default, the installation program grants the Oracle DBA role to the user and these include the privileges required for users to perform required operations. However, if you decide to alter these DBA privileges or revoke the DBA role from the user, then you must grant the following privileges so that users can perform required operations. Note: For privileges that specify ANY TABLE, you may choose to grant privileges only on a specific table. As tables get added to the InfoSphere CDC configuration, you may need to monitor the tables on which users have privileges.
Privilege CREATE ANY INDEX CREATE ANY TABLE DELETE ANY TABLE EXECUTE ANY PROCEDURE INSERT ANY TABLE LOCK ANY TABLE SELECT ANY TABLE UPDATE ANY TABLE Required For Creating tables on the target for a user other than the InfoSphere CDC user. Creating tables that belong to a user other than the InfoSphere CDC user. Replicating to tables that belong to a user other than the InfoSphere CDC user. Executing stored procedures that belong to a user other than the InfoSphere CDC user. Replicating to tables that belong to a user other than the InfoSphere CDC user. Refresh target tables that belong to a user other than the InfoSphere CDC user. Use tables that belong to a user other than the InfoSphere CDC user. Replicate to tables that belong to a user other than the InfoSphere CDC user.
View privileges
Users requires special privileges on the following views: v dba_col_comments v dba_constraints v dba_cons_columns v dba_indexes v v v v v v v dba_ind_columns dba_log_groups dba_objects dba_sys_privs dba_tables dba_tab_columns dba_tab_comments
v dba_tab_privs v and dba_users These views are equivalent to the all_views (for example all_col_comments and all_constraints) but the all_views exclude those tables for which the user executing a query does not have permissions. This filtering imposes a noticeable performance cost on systems with large numbers of tables and users.
33
You must grant users SELECT privileges on the following dynamic system views with the grant option: v dba_tab_cols v sys.con$ v sys.v_$transaction v sys.v_$archived_log v sys.v_$database v sys.v_$controlfile v v v v v v v v v v v v sys.v_$log sys.v_$log_history sys.v_$logfile sys.v_$mystat sys.v_$session sys.v_$version sys.all_coll_types sys.all_constraints sys.all_type_attrs sys.dba_constraints sys.dba_cons_columns sys.dba_indexes
v sys.all_cons_columns
v sys.dba_ind_columns v sys.dba_mviews v sys.dba_objects v sys.dba_profiles v sys.dba_roles v v v v v v v v sys.dba_rollback_segs sys.dba_sequences sys.dba_tab_columns sys.dba_tables sys.dba_tablespaces sys.dba_users sys.nls_database_parameters sys.resource_cost
v sys.attrcol$, sys.ccol$ v sys.cdef$, sys.col$ v v v v v v v sys.coltype$ sys.hist_head$ sys.icol$ sys.ind$ sys.lob$ sys.obj$ sys.tab$
v sys.user$ v uuser_role_privs
34
For information about privileges and the grant command, see your Oracle documentation.
35
36
Metadata tables
InfoSphere CDC maintains a set of metadata tables that represent data about your current replication configuration. These tables are created in the schema and database that you specify in the configuration tool and should be part of the backup strategy for your database. InfoSphere CDC will not replicate these tables. Do not modify the contents 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 DRSESSIONHISTORY v TS_AUTH Note: For all users you added in the Access Manager perspective in Management Console, make sure you give GRANT SELECT privileges to the TS_AUTH metadata table. For more information on how to add users in the Access Manager perspective in Management Console. For more information, see your Management Console documentation. v TS_BOOKMARK v TS_CONFAUDThe conflict resolution audit table records information about conflicts that were resolved using conflict detection and resolution. Related concepts Configuring InfoSphere CDC (UNIX and Linux) on page 21
37
38
Command formats
For each command, the following items of information are provided: v SyntaxIdentifies the name of the command and lists the command parameters. v ParametersDescribes each parameter in the command and identifies the values that can be specified. v ResultIndicates the values that are returned by the command if it is successful. These values can be useful for scripting. This section also specifies the information that is displayed on the screen, if any, as a result of executing the command. v ExamplesProvides 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 in
39
a list of parameters that is enclosed by square brackets [ ], the choices are limited to the parameters in the list, but you have the option to not specify any of the parameters. v Ellipsis ( ... ) means that a parameter or option can be repeated more than once. v Unless otherwise noted, the commands apply to UNIX and Linux.
If you are replicating data continuously with Continuous mirroring and business reasons arise that require an end to replication, InfoSphere CDC provides multiple options that suit most business needs. If your business requirements dictate that replication must end at a particular point in your source database log because the target database must be in a known state when replication ends, you can choose from the following Scheduled End to replication options:
40
v -se parameterWhen specified without t or p, this parameter ends replication at the current time in the source database log. v -t parameterWhen specified with se, this parameter ends replication at a user-specified date and time. v -p parameterWhen specified with se, this parameter ends replication at a user-specified log position. An example of a scenario that might require these options is that you are populating a reporting instance and you need stable (non-changing) data in your reporting instance during the day. At the end of the day when you shut down your application, you can choose one of the Scheduled End (Net Change) options to update the reporting instance with data from the current day as well. If business requirements do not require a specific end point but do require a time frame for ending replication, InfoSphere CDC provides escalating options (Normal, Immediate, and Abort) that end replication more rapidly at the expense of a slower start when resuming replication. For example, a routine end to replication with no particular urgency may require the Normal option, whereas a sudden business need to end replication rapidly may require the Abort option. A routine reboot of a SAN might be appropriate for the Normal option, whereas a sudden and unexpected hardware or application failure may require the Abort option. If you initiate an end to replication and business reasons warrant a change in the desired time frame, you can reschedule the end of replication by specifying a new date and time, a new position in the database log, or choose another option for ending replication. Ending replication is also necessary if you want to update and make changes to your subscription by: v v v v Adding a table mapping to the subscription. Deleting a table mapping from the subscription. Temporarily removing a table mapping from the subscription (parking a table). Modifying mapping details such as source and target column mappings, derived columns, data translations, row and column selections, user exits, and so on.
v Updating the properties of a subscription when the structure of your source or target tables change. This command also includes an asynchronous option for scripting (-nw parameter) that can be used with -se to allow your script to continue executing without waiting for the Scheduled End to replication. You can also start and end replication in Management Console. For more information, see Management Console Administration Guide. To stop an instance after ending replication on all subscriptions, use the dmshutdown command.
Syntax
dmendreplication -I <INSTANCE_NAME> [-c|-i|-a|-se [-t <date and time>|-p <log position>] [-w|-nw]] <-A|-s <SUBSCRIPTION NAME ...> [-L <locale>]
41
Parameters
-I <INSTANCE_NAME> Specifies the InfoSphere CDC instance for which you want to end replication. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -c Specifies that InfoSphere CDC ends replication on the specified subscriptions with the Normal option. InfoSphere CDC will use this option by default if you do not specify se, -i, or a. This option completes in progress work and then ends replication. If a refresh is in progress, Normal will complete the refresh for the current table before replication ends. Normal is the most appropriate option for most business requirements and is the preferred method for ending replication in most situations. -i Specifies that InfoSphere CDC ends replication on the specified subscriptions with the Immediate option. This option stops all in progress work and then ends replication. Starting replication after using this option can be slower than using -c. If a refresh is in progress, the refresh for the current table will be interrupted and then replication will end. Attention: Use this option if business reasons require replication to end faster than -c at the expense of a slower start when you resume replication on the specified subscriptions. -a Specifies that InfoSphere CDC ends replication on the specified subscriptions with the Abort option. This option stops all in progress work and then ends replication rapidly. Starting replication after using this option can be much slower than using -c. A refresh in progress will be interrupted and the target will stop processing any data that has not been committed before replication ends. Attention: Use this option if your business reasons require a rapid end to replication and you are willing to tolerate a much slower start when you resume replication on the specified subscriptions. A sudden business requirement for an unplanned shutdown of your source system may require this option for ending replication. -se Specifies that InfoSphere CDC will end replication normally at the current source system time in the source database log with the Scheduled End option. The source system time when replication will end is set when you issue this command. If you specify the following parameters with -se, replication will end at a specific date and time or log position: v tEnd replication at a specific date and time in your source database log. v pEnd replication at a specific log position in your source database log. Note: As latency between the source and target increases, the amount of time required to end replication will also increase.
42
-t <date and time> Indicates the date and time in the source database log when replication will end when using se. When specifying a value for this parameter, use the following format: yyyy-MM-dd HH:mm This parameter is optional when you specify se. -p <log position> Indicates that InfoSphere CDC will end replication at the specified Oracle SCN in your source database log when using -se. The following is an example of an SCN decimal format for Oracle: 6091085393 This parameter is optional when you specify se. -w Indicates that this command will wait for replication to end when you use se. w is the default setting for a Scheduled End to replication. If you are scripting the command with this parameter, your script must wait for -se processing to complete before it continues to execute. Note: This parameter does not apply if you specify c, -i, or a. InfoSphere CDC will always wait if you specify c, -i, or a when ending replication. -nw Indicates that this command will not wait for replication to end if you specify -se. If you are scripting this command, this parameter allows your script to continue executing (asynchronous) if -se processing is not complete. -A Indicates that InfoSphere CDC ends replication on all subscriptions. Use s to end replication on one or more subscriptions. -s <SUBSCRIPTION NAME> Indicates the subscriptions where InfoSphere CDC will end replication. To specify multiple subscriptions, list the subscriptions separated by a space. For example: Subscription1 Subscription2 Subscription3 You must specify a value for this parameter or use A for all subscriptions. -L <locale> The name of the locale used for the InfoSphere CDC instance. The default is the 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-zero value if the command fails.
Examples
dmendreplication -I MYINSTANCE -c -s FINANCE InfoSphere CDC ends replication with the Normal option for the FINANCE subscription in the specified instance. dmendreplication -I MYINSTANCE se t 2010-02-05-00-00 FINANCE -nw
Commands for InfoSphere CDC
43
InfoSphere CDC ends replication with the Scheduled End option for the FINANCE subscription at the specified time in the source database log. The command exits before Scheduled End processing is complete. dmendreplication -I MYINSTANCE a s SUBSCRIPTION1 SUBSCRIPTION2 InfoSphere CDC ends replication with the Abort option for SUBSCRIPTION1 and SUBSCRIPTION2 in the specified instance.
Syntax
dmrefresh -I <INSTANCE_NAME> [-a|-f] <-A|-s <SUBSCRIPTION_NAME ...> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the InfoSphere CDC instance for which you want to refresh one or more subscriptions. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -a Specifies that InfoSphere CDC refreshes all target tables in the subscription. -f Specifies that InfoSphere CDC refreshes only target tables that are flagged for refresh. If you omit both the -a and -f options, InfoSphere CDC assumes -f by default.
-A Specifies that InfoSphere CDC refreshes all subscriptions. -s <SUBSCRIPTION_NAME> Specifies that InfoSphere CDC refreshes the indicated subscription. To specify multiple subscriptions, list the subscriptions separated by a space. -L <locale> The name of the locale used for the 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.
44
Examples
dmrefresh -I NEWINSTANCE -a -s FINANCE InfoSphere CDC refreshes all target tables in the Finance subscription.
Syntax
dmstartmirror -I <INSTANCE_NAME> [-c|-n [-t <date and time>|-p <log position>] [-w|-nw]] <-A|-s <SUBSCRIPTION NAME ...> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the InfoSphere CDC instance for which you want to start mirroring. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -c Specifies that InfoSphere CDC will start Continuous mirroring on the specified subscriptions.
45
If you do not specify c or -n, InfoSphere CDC will start Continuous mirroring by default on the specified subscriptions. -n Specifies that InfoSphere CDC mirrors all committed database changes in the source database and then ends replication normally at the current source system time in the database log with the Scheduled End option. The source system time when replication will end is set when you issue this command. If you specify the following parameters with n, replication will end at a specific date and time or log position: v tEnd replication at a specific date and time in your source database log. v pEnd replication at a specific log position in your source database log. Note: As latency between the source and target increases, the amount of time required to end replication will also increase. -t <date and time> Indicates the date and time in the source database log when replication will end when using n. When specifying a value for this parameter, use the following format: yyyy-MM-dd HH:mm This parameter is optional when you specify n. -p <log position> Indicates that InfoSphere CDC will end replication at the specified Oracle SCN in your source database log when using -se. The following is an example of an SCN decimal format for Oracle: 6091085393 This parameter is optional when you specify n. -w Indicates that this command will wait for replication to end when you use n. w is the default setting for a Scheduled End to replication. If you are scripting the command with this parameter, your script must wait for -n processing to complete before it continues to execute. This parameter does not apply if you specify c for Continuous mirroring. -nw Indicates that this command will not wait for replication to end if you specify -n. If you are scripting this command, this parameter allows your script to continue executing (asynchronous) if -n processing is not complete. This parameter does not apply if you specify c for Continuous mirroring. -A Indicates that InfoSphere CDC starts mirroring for all subscriptions. Use s to start mirroring for one or more subscriptions. -s <SUBSCRIPTION_NAME> Indicates the subscriptions where InfoSphere CDC will start mirroring. To specify multiple subscriptions, list the subscriptions separated by a space. For example: Subscription1 Subscription2 Subscription3 You must specify a value for this parameter or use A for all subscriptions. -L <locale> The name of the locale used for the InfoSphere CDC instance. The default is the locale of the machine where InfoSphere CDC is installed.
46
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmstartmirror -I MYINSTANCE c -s FINANCE InfoSphere CDC starts continuous mirroring for the FINANCE subscription. dmstartmirror -I MYINSTANCE n p 000000FB:000001A4:0001 nw A InfoSphere CDC starts mirroring with the Scheduled End option for all subscriptions in the specified instance. Replication will end at the specified Microsoft SQL Server LSN in the source database log. The command will not wait for Scheduled End processing to complete. dmstartmirror -I MYINSTANCE n t 2010-02-05-00-00 FINANCE -nw InfoSphere CDC starts mirroring with the Scheduled End option for the FINANCE subscription in the MYINSTANCE instance. Replication will end at the specified time in the source database log. The command will exit before Scheduled End processing is complete.
47
Syntax
dmarchivelogavailable -I <INSTANCE_NAME> [-t <thread_number>] -f <filename>
Parameters
-I <INSTANCE_NAME> The name of the InfoSphere CDC instance. You can set the TSINSTANCE environment variable to the name of your InfoSphere CDC instance. After this is complete, you no longer have to specify the instance when issuing commands. -t <thread_number> The thread ID of the Oracle archive log. This parameter is optional. -f <archive_log_file_name> Specify the name (including extension) and the fully qualified path to the archive log file as it appears in your Oracle production database. For example, you can specify the following value: /archivelog/arch_1_22781.arc
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmarchivelogavailable -t 1 -f /archivelog/arch_1_22781.arc Indicates to InfoSphere CDC that archive log arch_1_22781.arc with thread ID 1 is now available for replication. dmarchivelogavailable -t 1 -f /archivelog/arch_1_22782.arc Indicates to InfoSphere CDC that archive log arch_1_22782.arc with thread ID 1 is now available for replication. Related reference dmarchivelogremoved - Mark archive log as removed dmshowlogdependency - Show Log Dependency on page 51
Syntax
dmarchivelogremoved -I <INSTANCE_NAME> -f <file name> [-a]
Parameters
-I <INSTANCE_NAME> The name of the InfoSphere CDC instance. You can set the TSINSTANCE environment variable to the name of your InfoSphere CDC instance. After this is complete, you no longer have to specify the instance when issuing commands.
48
-f <file name> Indicates the name (including extension) and the fully qualified path to the archive log file that you want to remove from InfoSphere CDC replication. For example, you can specify the following value: /archivelog/arch_1_22781.arc -a Indicates that all available logs before and including the log that you specified in this command will be removed. This parameter is optional.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Example
dmarchivelogremoved -f /archivelog/arch_1_22781.arc -a Indicates that archive log arch_1_22781.arc and all previous logs are no longer required by InfoSphere CDC for replication and can be removed from the directory for shipped archive logs. Related reference dmarchivelogavailable - Mark archive log as available on page 47 dmshowlogdependency - Show Log Dependency on page 51
Syntax
dmdecodebookmark -I <INSTANCE_NAME> (-b <bookmark> | -f <bookmark_file>) [-d <database_version>] [-L <locale>]
Parameters
-I <INSTANCE_NAME> The name of the InfoSphere CDC instance. You can set the TSINSTANCE environment variable to the name of your InfoSphere CDC instance. After this is complete, you no longer have to specify the instance when issuing commands. -b <bookmark> The bookmark as a hexadecimal-encoded string. -f <bookmark_file> The bookmark file as a binary file. -d<database_version> The database and version that generated the bookmark specified, if the bookmark was generated by InfoSphere CDC version 6.2 or earlier. -L <locale> The name of the locale used for the 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.
Commands for InfoSphere CDC
49
Examples
dmdecodebookmark -f bookmark.txt InfoSphere CDC displays information about the bookmark.txt file.
Syntax
dmsetbookmark -I <INSTANCE_NAME> -s <SUBSCRIPTION_NAME ...> (-b | -l | -f) [-a] [-L <locale>]
Parameters
-I <INSTANCE_NAME> The name of the InfoSphere CDC instance. You can set the TSINSTANCE environment variable to the name of your InfoSphere CDC instance. After this is complete, you no longer have to specify the instance when issuing commands. -s <SUBSCRIPTION_NAME> The name of the subscription for which InfoSphere CDC sets a bookmark. -b <bookmark> Specifies the bookmark which determines the point in the database log where you want InfoSphere CDC to resume mirroring. The next time InfoSphere CDC mirrors, it will scrape at the given position. The bookmark is a hex encoded string that is obtained from the dmshowbookmark command. -l <bookmark> Bookmark indicating the new scraping point. For more information, contact your InfoSphere CDC support representative. -f <bookmark_file> Specifies the binary file containing a bookmark which determines the point in the database log where you want InfoSphere CDC to resume mirroring. The next time InfoSphere CDC mirrors, it will scrape at the given position. The bookmark file is a binary file that stores the position. -a Sets all tables in the subscriptions (except for parked tables) as active as of the new scraping point. -L <locale> The name of the locale used for the 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
dmsetbookmark -I MYINSTANCE -b 2FC5GJHKLKSJLKJL458K9K809IK9 -s FINANCE
50
InfoSphere CDC sets a bookmark position on the Finance subscription for the specified instance. This command specifies that mirroring will resume at the indicated position in the database log.
Syntax
dmshowbookmark -I <INSTANCE_NAME> -s <SOURCE_ID> [-f] [-v] [-L <locale>]
Parameters
-I <INSTANCE_NAME> The name of the InfoSphere CDC instance. You can set the TSINSTANCE environment variable to the name of your InfoSphere CDC instance. After this is complete, you no longer have to specify the instance when issuing commands. -s <SOURCE_ID> Specifies the source ID of the subscription for which the bookmark is displayed. [-f] <file_name> Specifies the name of the binary file for the bookmark output. [-v] Displays verbose information about a bookmark, including a hexadecimal-encoded string. The amount of information displayed depends on the type and version of the source engine. The hexadecimal-encoded string is always displayed. It is a subset of what the dmdecodebookmark command displays. If not specified, only a hexadecimal-encoded sting is displayed. -L <locale> The name of the locale used for the 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
dmshowbookmark -I MYINSTANCE -s MASTER InfoSphere CDC shows bookmark information for the master source ID.
51
v A list of the required database logs that are missing for the specified instance. If you are shipping your archive logs, a log status is also displayed. v The earliest open transaction in the database log for the specified instance. v The database log that the specified instance of InfoSphere CDC is currently reading on the source. v The database log for the subscription that the specified instance of InfoSphere CDC is currently applying on the target.
Syntax
dmshowlogdependency -I <INSTANCE_NAME> (-c | -i | -t | -l | -m) (-s <SUBSCRIPTION_NAME> | -A) [-v] [-L <locale>]
Parameters
-I <INSTANCE_NAME> The name of the InfoSphere CDC instance. You can set the TSINSTANCE environment variable to the name of your InfoSphere CDC instance. After this is complete, you no longer have to specify the instance when issuing commands. -c -i Considers the current position instead of the restart position. Displays the complete list of database logs that are required for the specified instance and are required for replication. These logs are required to start replication and they contain data that has not yet been applied to the target. The path to the archive log will be displayed if you are shipping your archive logs. This parameter will display the following log status information if you are shipping your archive logs: v Available/Not AvailableStatus that indicates whether or not the archive log file is available. You must run the dmarchivelogavailable command to make archive logs available to InfoSphere CDC. v Exists/MissingStatus that indicates whether the log file exists or is missing. If a log file is missing, you will have to adjust your log shipping process. -t Displays the current database log for a subscription that the specified InfoSphere CDC instance is currently reading. This is the log containing the current position confirmed by the target. Displays the current source database log that the specified InfoSphere CDC instance is currently reading. This is the log containing the current scraping position.
-l
-m Displays a list of database logs that are missing for the specified instance and are required for replication. These logs must be restored before you can start replication. If no logs are missing, the output will display 'OK' which you can parse with a script or batch file. The path to the archive log will be displayed if you are shipping your archive logs. This parameter will display the following log status information if you are shipping your archive logs: v Available/Not AvailableStatus that indicates whether or not the archive log file is available. You must run the dmarchivelogavailable command to make archive logs available to InfoSphere CDC.
52
v Exists/MissingStatus that indicates whether the log file exists or is missing. If a log file is missing, you will have to adjust your log shipping process. -s <SUBSCRIPTION_NAME> Specifies the name of the subscription for which you want to display the database log that InfoSphere CDC is currently reading. Use this parameter in conjunction with the -t parameter to display the database log. -A Specifies all subscriptions in the specified InfoSphere CDC instance. -v Specifies verbose output (otherwise, the output is formatted for scripting). -L <locale> The name of the locale used for the 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
dmshowlogdependency -I MYINSTANCE -i -s MYSUBSCRIPTIONNAME Displays the complete list of database logs that are required for the specified instance and subscription. dmshowlogdependency -I MYINSTANCE -m -A Displays the complete list of database logs that are missing for all subscriptions in the specified instance. Related reference dmarchivelogavailable - Mark archive log as available on page 47 dmarchivelogremoved - Mark archive log as removed on page 48
53
Syntax
dmdescribe -I <INSTANCE_NAME> <-A|-s <SUBSCRIPTION_NAME ...> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the InfoSphere CDC instance for which you want to send source table mapping changes over to the target. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -A Specifies that InfoSphere CDC will send source table mapping changes made to all subscriptions over to the target. -s <SUBSCRIPTION_NAME> Specifies that InfoSphere CDC sends source table mapping changes for the indicated subscriptions over to the target. To specify multiple subscriptions, list the subscriptions separated by a space. -L <locale> The name of the locale used for the 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
dmdescribe -I NEWINSTANCE -s FINANCE InfoSphere CDC sends source table mapping changes in the Finance subscription over to the target for the specified instance.
Syntax
dmflagforrefresh -I <INSTANCE_NAME> -s <SUBSCRIPTION_NAME ...> <-A|-t <schema>.<table> ...> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
54
-s <SUBSCRIPTION_NAME> Specifies the name of the subscription. To specify multiple subscriptions, list the subscriptions separated by a space. -A Specifies that InfoSphere CDC flags all source tables for refresh in the subscription. -t <schema>.<table> Specifies the name of a source table in the subscription that InfoSphere CDC flags for refresh. You must specify the table name in the format schema.table. To specify multiple tables, list the tables separated by a space. -L <locale> The name of the locale used for the 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
dmflagforrefresh -I MYINSTANCE -s FINANCE -A InfoSphere CDC flags for refresh all source tables in the Finance subscription for the specified instance.
Syntax
dmmarktablecapturepoint -I <INSTANCE_NAME> -s <SUBSCRIPTION_NAME ...> <-A|-t <schema>.<table> ...> [-L <locale>]
55
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -s <SUBSCRIPTION_NAME> Specifies the subscription name. To specify multiple subscriptions, list the subscriptions separated by a space. -A Specifies that InfoSphere CDC overrides an existing position in the stream of changed data on all source tables in the subscription. -t <schema>.<table> Specifies the name of a source table in the subscription on which InfoSphere CDC marks a table capture point. You must specify the table name in the format schema.table. To specify multiple tables, list the tables separated by a space. -L <locale> The name of the locale used for the 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
dmmarktablecapturepoint -I MYINSTANCE -s FINANCE -A All tables in the Finance subscription will use Refresh as the replication method in the specified InfoSphere CDC instance. dmmarktablecapturepoint -I MYINSTANCE -s FINANCE -A -t myschema.mytable InfoSphere CDC moves the specified table to active in the Finance subscription.
Syntax
dmpark -I <INSTANCE_NAME> -s <SUBSCRIPTION_NAME ...> <-A|-t <schema>.<table> ...> [-L <locale>]
56
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -s <SUBSCRIPTION_NAME> Specifies the subscription name. To specify multiple subscriptions, list the subscriptions separated by a space. -A Specifies that InfoSphere CDC parks all source tables in the subscription. -t <schema>.<table> Specifies the name of a source table in the subscription that InfoSphere CDC parks. You must specify the table name in the format schema.table. To specify multiple tables, list the tables separated by a space. -L <locale> The name of the locale used for the 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
dmpark -I MYINSTANCE -s FINANCE -A InfoSphere CDC parks all source tables in the Finance subscription. Related reference dmendreplication - End replication on page 40
Syntax
dmreaddtable -I <INSTANCE_NAME> <-A|-t <schema>.<table> ...> [-a] [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -A Specifies that InfoSphere CDC updates definitions for all source tables that are available for replication. -t <schema>.<table> Specifies the name of a source table in the subscription for which InfoSphere
57
CDC updates the definition. You must specify the table name in the format schema.table. To specify multiple tables, list the tables separated by a space. -a Specifies that InfoSphere CDC will preserve the Active table status after updating the definition of the source tables in the InfoSphere CDC metadata. By using this optional parameter, the table status will not be set to Parked, you will not lose the bookmark, and the tables will not require a refresh after you run the command. -L <locale> The name of the locale used for the 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
dmreaddtable -I NEWINSTANCE -A InfoSphere CDC updates definitions for all source tables that are available for replication. The status for all tables will be set to Parked. dmreaddtable -I NEWINSTANCE -A -a InfoSphere CDC updates definitions for all source tables that are available for replication and all tables will retain an Active status.
Syntax
dmreassigntable -I <INSTANCE_NAME> -s <SUBSCRIPTION_NAME ...> <-A|-t <schema>.<table> ...> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -s <SUBSCRIPTION_NAME> Specifies the subscription that contains the source table that is mapped to the target table which was updated in your database. To specify multiple subscriptions, list the subscriptions separated by a space. -A Specifies that InfoSphere CDC updates definitions for all target tables in the subscription. -t <schema>.<table> Specifies the name of a source table in the subscription that is mapped to the target table for which InfoSphere CDC updates the table definition in the metadata. You must specify the table name in the format schema.table. To specify multiple tables, list the tables separated by a space.
58
-L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns a value of 0 if the operation was successful. If it fails, this command returns a non-zero value.
Example
dmreassigntable -I NEWINSTANCE -s FINANCE -A InfoSphere CDC updates definitions for all target tables in the Finance subscription. dmreassigntable -I CDCINSTANCE -s FINANCE -t SCHEMA1.SRCTBL1 InfoSphere CDC updates the definition for the target table that is mapped to the SCHEMA1.SRCTBL1 source table in the Finance subscription.
Syntax
dmsetreplicationmethod -I <INSTANCE_NAME> <-r|-m> -s <SUBSCRIPTION_NAME ...> <-A|-t <schema>.<table> ...> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -m Specifies that tables will use Mirror (Change Data Capture) as the replication method. -r Specifies that tables will use Refresh (Snapshot) as the replication method.
-s <SUBSCRIPTION_NAME> Specifies the name of the subscriptions. To specify multiple subscriptions, list the subscriptions separated by a space. -A Specifies that all tables in the subscription will use the indicated replication method. -t <schema>.<table> Specifies the name of a source table in the subscription that will use the indicated replication method. You must specify the table name in the format schema.table. To specify multiple tables, list the tables separated by a space. -L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale.
Commands for InfoSphere CDC
59
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmsetreplicationmethod -I MYINSTANCE -r -s FINANCE -A All tables in the Finance subscription will use Refresh as the replication method in the specified InfoSphere CDC instance. dmsetreplicationmethod -I NEWINSTANCE -m -s FINANCE -t acct.taxcodes The source table acct.taxcodes in the Finance subscription will use Mirror as the replication method in the specified InfoSphere CDC instance.
Syntax
dmclearevents -I <INSTANCE_NAME> [-S|-T-|-B] <-A|-s <SUBSCRIPTION_NAME ...> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -S Specifies that InfoSphere CDC clears events from the source. -T Specifies that InfoSphere CDC clears events from the target. -B Specifies that InfoSphere CDC clears events from both the source and target. If none of the S, T, and B options are specified, InfoSphere CDC assumes B by default. -A Specifies that InfoSphere CDC clears events for all subscriptions. -s <SUBSCRIPTION_NAME> Specifies that InfoSphere CDC clears events for the indicated subscription. To specify multiple subscriptions, list the subscriptions separated by a space.
60
-L <locale> The name of the locale used for the 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 InfoSphere CDC clears events from the source for all subscriptions for the specified instance. dmclearevents -I MYINSTANCE -T -s FINANCE MARKETING InfoSphere CDC clears events from both the source and target for the Finance and Marketing subscriptions for the specified instance.
Syntax
dmgetsubscriptionstatus -I <INSTANCE_NAME> [-p] <-A|-s <SUBSCRIPTION_NAME ...> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -p Specifies that InfoSphere CDC sends status information to standard output. -A Specifies that InfoSphere CDC retrieves status information for all subscriptions. -s <SUBSCRIPTION_NAME> Specifies the name of the subscription for which status information is retrieved. To specify multiple subscriptions, list the subscriptions separated by a space. -L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns one of the following statuses for each subscription: v RecoveringThe subscription is in an undetermined state. v IdleThe subscription is not running. v StartingThe subscription is in start up mode and is not currently replicating data. v RunningThe subscription is running and replicating data.
61
Examples
dmgetsubscriptionstatus -I MYINSTANCE -p -A InfoSphere CDC retrieves status information for all subscriptions and sends the results to standard output for the specified instance.
Syntax
dmshowevents -I <INSTANCE_NAME> <-a|-s <SUBSCRIPTION_NAME> ... |-t <SOURCE_ID> ...|-s <SUBSCRIPTION_NAME> ... -t <SOURCE_ID> ...> [-h] [-c max_msg] [-L <locale>]
or
dmshowevents -I <INSTANCE_NAME> <-a|-s <SUBSCRIPTION_NAME>|-t <SOURCE_ID>> ...> [-h] [-c <max_msg>] [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -a Specifies that InfoSphere CDC shows events for all subscriptions. -s <SUBSCRIPTION_NAME> Specifies the name of the subscription for which InfoSphere CDC displays source events. To specify multiple subscriptions, list the subscriptions separated by a space. -t <SOURCE_ID> Specifies the source ID of the subscription for which InfoSphere CDC displays target events. List the source IDs if you specify more than one. -h Specifies that 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 InfoSphere CDC displays. If you omit this parameter or you specify a value greater than the total number of events, InfoSphere CDC displays all events for the specified subscriptions and source IDs. -L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale. v Minimum Setting0. No events are shown. v Maximum Setting2147483647
62
Result
This command returns a value of 0 if the operation was successful. If it fails, this command returns a non-zero value.
Examples
dmshowevents -I NEWINSTANCE -s FINANCE InfoSphere CDC displays all events for the Finance subscription for the specified instance. dmshowevents -I MYINSTANCE a h 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 MARKETING t ATLANTA h c 20 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
TIME|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 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 AGENTTYPE field, S indicates source and T indicates target.
63
Syntax
dmexportconfiguration <path_to_configuration_file> [-L <locale>]
Parameters
<path_to_configuration_file> The relative or absolute path to the XML configuration file that you want to export. The relative path is relative to your installation of InfoSphere CDC. -L <locale> The name of the locale used for the 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
dmexportconfiguration c:\configurations\configuration.xml InfoSphere CDC exports the XML file to the specified relative path. Related reference dmimportconfiguration - Import InfoSphere CDC Configuration
Syntax
dmimportconfiguration <path_to_configuration_file> [-L <locale>]
64
Parameters
<path_to_configuration_file> The relative or absolute path to the XML configuration file that you are importing. The relative path is relative to your installation of InfoSphere CDC. -L <locale> The name of the locale used for the 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
dmimportconfiguration c:\configurations\configuration.xml
InfoSphere CDC imports the XML configuration file from the specified relative path. Related reference dmexportconfiguration - Export InfoSphere CDC Configuration on page 64
65
dmdisablecontinuouscapture - Disable Continuous Capture dmgetstagingstorestatus - Retrieve Staging Store status dmclearstagingstore - Remove cached operations from the staging store on page 67
Syntax
dmenablecontinuouscapture -I <INSTANCE_NAME> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale. Related reference dmdisablecontinuouscapture - Disable Continuous Capture dmgetstagingstorestatus - Retrieve Staging Store status
Syntax
dmdisablecontinuouscapture -I <INSTANCE_NAME> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale. Related reference dmenablecontinuouscapture - Enable Continuous Capture dmgetstagingstorestatus - Retrieve Staging Store status
66
Syntax
dmgetstagingstorestatus -I <INSTANCE_NAME> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale. Related reference dmenablecontinuouscapture - Enable Continuous Capture on page 66 dmdisablecontinuouscapture - Disable Continuous Capture on page 66
Syntax
dmclearstagingstore -I <INSTANCE_NAME> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns a value of 0 if the operation was successful. If it fails, this command returns a non-zero value.
Other commands
This section contains miscellaneous commands that allow you to determine the version of InfoSphere CDC, verify communications, stop InfoSphere CDC, set system parameters, and back up your metadata. See also: dmbackupmd - Backup Metadata on page 68 dmconfigurets - Configure InfoSphere CDC on page 68 dmmdcommander on page 69 dmmdconsole on page 69 dmset - Set InfoSphere CDC system parameter on page 69
Commands for InfoSphere CDC
67
dmshowversion - Show InfoSphere CDC version on page 70 dmshutdown - Shut down InfoSphere CDC on page 70 dmsupportinfo - Collect IBM Support information on page 72 dmterminate - Terminate InfoSphere CDC processes on page 73 dmts32 - Start InfoSphere CDC on page 74 dmts64 - Start InfoSphere CDC on page 74 dmverifycommunications on page 75
Syntax
dmbackupmd -I <INSTANCE_NAME> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -L <locale> The name of the locale used for the 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.
Syntax
dmconfigurets [-L <locale>]
Parameters
-L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale.
68
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
dmmdcommander
This command is for internal use only.
dmmdconsole
This command is for internal use only.
Syntax
dmset -I <INSTANCE_NAME> [<parameter_name>[=[<parameter_value>]]] [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. <parameter_name> Specifies the name of the InfoSphere CDC system parameter. <parameter_value> Specifies the value that you want to assign to the system parameter. -L <locale> The name of the locale used for the 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
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
Commands for InfoSphere CDC
69
Displays the current value of the specified parameter. dmset -I MYINSTANCE stop_replication= Deletes the stop_replication system parameter.
Syntax
dmshowversion [-L <locale>]
Parameters
-L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns a value of 0 if the operation was successful. If it fails, this command returns a non-zero value.
Syntax
dmshutdown -I <INSTANCE_NAME> [-c|-i|-a|-se [-t <date and time>|-p <log position>] [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value. -c Specifies that InfoSphere CDC stops the specified instance and ends replication
70
on all subscriptions that use the instance as a source with the Normal option. InfoSphere CDC will use this option by default if you do not specify se, -i, or a. This option completes in progress work and then ends replication. If a refresh is in progress, Normal will complete the refresh for the current table before replication ends. Normal is the most appropriate option for most business requirements and is the preferred method for ending replication in most situations. -i Specifies that InfoSphere CDC stops the specified instance and ends replication on all subscriptions that use the instance as a source with the Immediate option. This option stops all in progress work and then ends replication. Starting replication after using this option can be slower than using -c. If a refresh is in progress, the refresh for the current table will be interrupted and then replication will end. Attention: Use this option if business reasons require replication to end faster than -c at the expense of a slower start when you resume replication on the specified subscriptions. -a Specifies that InfoSphere CDC stops the specified instance and ends replication on all subscriptions that use the instance as a source or target with the Abort option. Subscriptions that use the specified instance as a target will end replication with an error. This option stops all in progress work and then ends replication rapidly. Starting replication after using this option can be much slower than using -c. A refresh in progress will be interrupted and the target will stop processing any data that has not been committed before replication ends. Attention: Use this option if your business reasons require a rapid end to replication and you are willing to tolerate a much slower start when you resume replication on the specified subscriptions. A sudden business requirement for an unplanned shutdown of your source system may require this option for ending replication. Note: As a best practice, use the dmendreplication command to end replication on all subscriptions that use the instance specified in this command as a source or target. -se Specifies that InfoSphere CDC will stop the specified instance and end replication normally at the current source system time in the source database log with the Scheduled End option. Replication will end on subscriptions that use the specified instance as a source. The source system time when replication will end is set when you issue this command. You can use the following parameters with this option to end replication at a specific date and time or log position: v tStop the instance and end replication at a specific date and time in your source database log. v pStop the instance and end replication at a specific log position in your source database log.
71
Note: As latency between the source and target increases, the amount of time required to end replication will also increase. -t <date and time> Indicates the date and time in the source database log when replication will end when using se. When specifying a value for this parameter, use the following format: yyyy-MM-dd HH:mm This parameter is optional when you specify se. -p <log position> Indicates that InfoSphere CDC will end replication at the specified Oracle SCN in your source database log when using -se. The following is an example of an SCN decimal format for Oracle: 6091085393 This parameter is optional when you specify se. -L <locale> The name of the locale used for the InfoSphere CDC instance. The default is the 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-zero value if the command fails. Related reference dmterminate - Terminate InfoSphere CDC processes on page 73
Syntax
dmsupportinfo [-I <INSTANCE_NAME>] [-t <"yyyy-MM-dd hh:mm:ss to yyyy-MM-dd hh:mm:ss">] [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the name of the InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
72
If you do not specify an instance (possibly because you could not create an instance), this command will only collect non-instance specific information. -t <"yyyy-MM-dd hh:mm:ss to yyyy-MM-dd hh:mm:ss"> Specifies the date and time range (relative to the time zone of the operating system where you issue this command) used by InfoSphere CDC to retrieve environment information. Note: As a best practice, specify a date and time range that only captures the time period when you experienced problems. This allows for easier problem diagnosis and reduces the size of the files retrieved. -L <locale> The name of the locale used for the 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.
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:00 PM on December 3, 2009. This is the time range when you experienced support issues with this instance of InfoSphere CDC. Related concepts Troubleshooting and contacting IBM Support on page 91
Syntax
dmterminate [-L <locale>]
Parameters
-L <locale> The name of the locale used for the InfoSphere CDC instance. The default is your machine's locale.
Commands for InfoSphere CDC
73
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Syntax
dmts32 -I <INSTANCE_NAME> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the InfoSphere CDC instance for which you want to start. -L <locale> The name of the locale used for the 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
dmts32 -I -MYINSTANCE InfoSphere CDC starts for the specified instance.
Syntax
dmts64 -I <INSTANCE_NAME> [-L <locale>]
Parameters
-I <INSTANCE_NAME> Specifies the InfoSphere CDC instance for which you want to start. -L <locale> The name of the locale used for the 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.
74
Examples
dmts64 -I MYINSTANCE InfoSphere CDC starts for the specified instance.
dmverifycommunications
This command is for internal use only.
75
76
Stored procedure user exits for table and row level operations
A stored procedure is a program (or procedure) which is physically stored within a database. The advantage of a stored procedure is that when it is run, in response to a user request, it is run directly by the database engine, which usually runs on a separate database server and is generally faster at processing database requests. After writing and compiling user exit programs, you can specify at which user exit point you want to invoke the user exit (either before or after a row-level or before or after a table-level operation) on the User Exits tab of InfoSphere CDC. See also: Defining a stored procedure user exit Stored procedure user exit database connections on page 78 Retrieving data with a stored procedure user exit on page 78 Example of a stored procedure user exit on page 84
77
resultAn integer output parameter that returns '0' if the stored procedure user exit is successful or a non-zero value if the stored procedure user exit is not successful. returnMsgA character output parameter that returns error messages to the Event Log if the stored procedure user exit is not successful. Related reference Example of a stored procedure user exit on page 84
78
Description Represents the entry point from where the stored procedure was invoked. You can invoke a stored procedure from the following entry points: v 1indicates that InfoSphere CDC has invoked the stored procedure before a table clear (truncate) operation v 2indicates that InfoSphere CDC has invoked the stored procedure after a table clear (truncate) operation v 3indicates that InfoSphere CDC has invoked the stored procedure before a row insert operation v 4indicates that InfoSphere CDC has invoked the stored procedure after a row insert operation v 5indicates that InfoSphere CDC has invoked the stored procedure before a row update operation v 6indicates that InfoSphere CDC has invoked the stored procedure after a row update operation v 7indicates that InfoSphere CDC has invoked the stored procedure before a row delete operation v 8indicates that InfoSphere CDC has invoked the stored procedure after a row delete operation v 9indicates that InfoSphere CDC has invoked the stored procedure before a table refresh operation v 10indicates that InfoSphere CDC has invoked the stored procedure after a table refresh operation
User exits for InfoSphere CDC
79
Description Identifies uniquely the location of the source data. Represents the name of the source table in the source database that sends replicated data to the target. Represents the name of the target table in the target database that receives replicated data from the source.
s$tgtTabId
VARCHAR
j$CODE
VARCHAR
j$CTRR or j$CNTRRN
VARCHAR
80
Description Generates journal or log codes that identify the operation type on the source system. The name of the journal/log where InfoSphere CDC is reading insert, update, or delete operations from. Identifies the name of the job that made the insert, update, or delete on the source system. Identifies the name of the source table or its alias. Identifies the process ID of the program on the source table that is making the insert, update, or delete operation. Identifies the name of the program on the source system that made the insert, update or delete operation. Identifies the sequence number of the insert, update, or delete operation in the journal or log. Identifies the host name of the source system. Identifies the operating system user name that made the insert, update, or delete operation on the source. Identifies the database user name that made the insert, update, or delete operation on the source. Identifies the date and time of when the insert, update, or delete operation or refresh was made on the source. In environments that support microsecond precision, the date and time format of this journal control field is YYYY-MM-DDHH:MM:SS.UUUUUU. Otherwise, InfoSphere CDC sets the microsecond component UUUUUU to zeroes or does not include it at all.
j$JRN or j$JOURNAL
VARCHAR
j$JOB
VARCHAR
VARCHAR VARCHAR
j$PGM or j$PROGRAM
VARCHAR
j$SEQN or j$SEQNO
VARCHAR
VARCHAR VARCHAR
j$USPF
VARCHAR
j$TSTP or j$TIMSTAMP
VARCHAR
81
82
Mode Input
Description Used to retrieve the after image of the data in a source column. The after image is the translated data from the source table column. For example, the data that was translated by a derived expression. For example, you may have made the following UPDATE to your source table: UPDATE source_table set MYCOLUMN = 2 where MYCOLUMN = 1; This will set 2 on all rows where MYCOLUMN was 1 before the execution of this SQL statement. When you define a stored procedure and decide that you want the stored procedure to retrieve the after image of MYCOLUMN, you would specify the following: a$MYCOLUMN; This returns a value of 2.
Used to access the target table to find the rows that need to be modified. Note: Key columns are not available for auditing. Used to retrieve data values after transformation, which will be used to update the table in the target database. Only these values may be modified by the stored procedure.
Input/Output
83
This stored procedure user exit will INSERT these values into PROD.AUDIT_TABLE1.
This stored procedure user exit is successful and returns a '0' value. Note: If your stored procedure returns a non-zero value because the stored procedure is not successful, then an error message is sent to the Event Log.
84
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 when unzipping the jar file. After unzipping the jar file, you will have a directory structure like the following:
User exits for InfoSphere CDC
85
<installation_directory>/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 directory and 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:
<installation_directory>/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 Management Console, see your Management Console documentation. Note: If you plan to use the sample user exits in production environments, you will have to test the samples before they are deployed. IBM does not assume responsibility for adverse results caused by modified or customized user exit classes.
86
87
Column CNFTYPE
Description The type of conflict that was detected. The value is one of: v 1arrow was inserted into the source table. The key for that row already exists in the target table. v 2arrow was updated or deleted on the source table. The key for that row does not exist in the target table. v 3arrow was updated or deleted on the source table. The images of the source and target tables do not match. v 4an unexpected conflict was detected.
RESMTD
The conflict resolution method that was used. The value is one of: v 1source wins v 2target wins v 3largest value wins v 4smallest value wins v 5user exit If the resolution method was None, then a row will not be entered into this table. See your InfoSphere CDC documentation for more information on these methods.
CNFRES
Indicates if the conflict was resolved. The value is one of: v Ythe conflict was resolved. v Nthe conflict was not resolved.
BEFORETRNC
Indicates if the before image stored in BEFOREIMG was truncated. The value is one of: v Ythe value was truncated. v Nthe value was not truncated.
BEFOREIMG
A representation of the row in the source table after it was changed. See Row Image Format for more information on the format of this column. Indicates if the after image stored in AFTERIMG was truncated. The value is one of: v Ythe value was truncated. v Nthe value was not truncated.
AFTERTRNC
AFTERIMG
A representation of the row in the source table after it was changed. See Row Image Format for more information on the format of this column. A representation of the row in the target table before replication occurred. See Row Image Format for more information on the format of this column. Indicates if the after image stored in TGTIMG was truncated. The value is one of: v Ythe value was truncated. v Nthe value was not truncated.
TGTIMG
TGTTRNC
WINIMG
A representation of the final row in the target table after conflict resolution has occurred. See Row Image Format for more information on the format of this column.
88
Column WINTRNC
Description Indicates if the image stored in WINIMG was truncated. The value is one of: v Ythe value was truncated. v Nthe value was not truncated.
In the format above, value is the data in the column and length is the number of characters used to represent the data. The images display numeric data as character strings and NULL values as (null). The row images match the column order in the source table and the conflict resolution audit table. These images may be truncated if the image is longer than the maximum length of VARCHAR data in the target metadata database. If a table's key column is not the first column in the table, then it may be truncated.
Truncated images
If a row image is longer than the maximum length of a VARCHAR column, then they will be truncated. There is a column in the audit table that indicates if each image column has been truncated. For example, if WINTRNC is Y, then the value of WINIMG was truncated. The format of the truncated column is:
(-length:value)
In the format above, value is the truncated value and length is the number of characters in the truncated string.
89
90
91
92
Notices
This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A. For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to: IBM World Trade Asia Corporation Licensing 2-31 Roppongi 3-chome, Minato-ku Tokyo 106-0032, Japan The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.
Copyright IBM Corp. 2008, 2010
93
Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact: IBM Canada Limited Office of the Lab Director 8200 Warden Avenue Markham, Ontario L6G 1C7 CANADA 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 material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement, or any equivalent agreement between us. Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurements may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. All statements regarding IBM's future direction or intent are subject to change or withdrawal without notice, and represent goals and objectives only. All IBM prices shown are IBM's suggested retail prices, are current and are subject to change without notice. Dealer prices may vary. This information is for planning purposes only. The information herein is subject to change before the products described become available. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating
94
platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. Each copy or any portion of these sample programs or any derivative work, must include 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 rights reserved. If you are viewing this information softcopy, the photographs and color illustrations may not appear.
Trademarks
The following terms are trademarks of International Business Machines Corporation in the United States, other countries, or both: AIX DB2 IBM InfoSphere POWER System i Intel, Intel Inside (logos), Itanium, MMX, Pentium, and Xeon are trademarks of Intel Corporation in the United States, other countries, or both. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. Other company, product, or service names may be trademarks or service marks of others.
Notices
95
96
Printed in USA