Replication with Infosphere CDC : IBM InfoSphere CDC for solidDB® reference : Commands for IBM InfoSphere CDC : Managing tables for replication commands
  
Managing tables for replication commands
This section contains commands that help you manage the tables that you want to replicate with IBM InfoSphere CDC.
See also
dmdescribe: Describe source tables
dmflagforrefresh: Flag for refresh
dmmarktablecapturepoint: Mark a table capture point on a source table
dmpark: Park table
dmreaddtable: Update source table definition
dmreassigntable: Update target table definition
dmsetreplicationmethod: Set replication method
Commands for IBM InfoSphere CDC
dmdescribe: Describe source tables
Use this command to send source table metadata changes over to the target. This command exits after it has successfully described the specified subscriptions.
Syntax
dmdescribe -I <instance_name> <-A|-s <subscription_names> ...> [-L <locale>]
Parameters
-I <instance_name>
Specifies the IBM 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 IBM InfoSphere CDC will send source table mapping changes made to all subscriptions over to the target.
-s <subscription_names>
Specifies that IBM InfoSphere CDC sends source metadata 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 IBM InfoSphere CDC instance. The default is the locale of the machine where IBM InfoSphere CDC is installed.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmdescribe -I NEWINSTANCE -s FINANCE
IBM InfoSphere CDC sends source metadata changes in the Finance subscription over to the target for the specified instance.
See also
Managing tables for replication commands
dmflagforrefresh: Flag for refresh
Use this command to flag a source table for refresh. When you flag a table for refresh, you are selecting the tables that you want to refresh at a future point in time. Use this procedure when you have selected Refresh as your replication method on a subscription.
Syntax
dmflagforrefresh -I <instance_name> -s <subscription_names> <-A|-t <schema>.<table> ...> [-L <locale>]
Parameters
-I <instance_name>
Specifies the name of the IBM InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-s <subscription_names>
Specifies the name of the subscription. List the subscriptions if you specify more than one.
-A
Specifies that IBM 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 IBM InfoSphere CDC flags for refresh. You must specify the table name in the format schema.table. List the tables if you specify more than one.
-L <locale>
The name of the locale used for the IBM InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmflagforrefresh -I myinstance -s Finance -A
IBM InfoSphere CDC flags for refresh all source tables in the Finance subscription for the specified instance.
See also
Managing tables for replication commands
dmmarktablecapturepoint: Mark a table capture point on a source table
Use this command to mark a table capture point on a source table and move the table to active state. If you changed the table before executing this command, those changes will not be replicated.
Mark a table capture point on a source table when you want to override an existing position in the stream of changed data. This is possible when you have already synchronized (refreshed) your source and target tables using an application other than Management Console (for example, using the import or export capabilities of your database platform) and you know the point in time your source and target are synchronized with each other. IBM InfoSphere CDC mirrors changes to the target table from the current position in the stream of changed data. This position is set by IBM InfoSphere CDC when you select Mirror (Change Data Capture) after mapping your tables in the Map Tables wizard. If you want to override the position set by IBM InfoSphere CDC, then you can manually mark a table capture point in Management Console. When you decide to start mirroring on the subscription, IBM InfoSphere CDC identifies the position you have set as the point in time from which to capture and replicate database changes to the target.
Syntax
dmmarktablecapturepoint -I <instance_name> -s <subscription_names> <-A|-t <schema>.<table> ...> [-L <locale>]
Parameters
-I <instance_name>
Specifies the name of the IBM InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-s <subscription_names>
Specifies the subscription name. List the subscriptions if you specify more than one.
-A
Specifies that IBM 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 IBM InfoSphere CDC marks a table capture point. You must specify the table name in the format schema.table. List the tables if you specify more than one.
-L <locale>
The name of the locale used for the IBM InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmmarktablecapturepoint -I myinstance -s Finance -A
IBM InfoSphere CDC overrides an existing position in the stream of changed data on all source tables in the Finance subscription.
dmmarktablecapturepoint -I myinstance -s Finance -t myschema.mytable
IBM InfoSphere CDC moves the specified table to active in the Finance subscription.
See also
Managing tables for replication commands
dmpark: Park table
Use this command to park a source table. By parking a source table, you tell IBM InfoSphere CDC that you do not want to capture changes for that particular table in a subscription. When you park a table, IBM InfoSphere CDC does not replicate any subsequent changes you make on the source table, which may result in inconsistent source and target tables.
Before you can park a source table, if you are mirroring the table to the target, then you need to end replication on the subscription. For more information, see dmendreplication: End replication.
Syntax
dmpark -I <instance_name> -s <subscription_names> <-A|-t <schema>.<table> ...> [-L <locale>]
Parameters
-I <instance_name>
Specifies the name of the IBM InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-s <subscription_names>
Specifies the subscription name. List the subscriptions if you specify more than one.
-A
Specifies that IBM InfoSphere CDC parks all source tables in the subscription.
-t <schema>.<table>
Specifies the name of a source table in the subscription that IBM InfoSphere CDC parks. You must specify the table name in the format schema.table. List the tables if you specify more than one.
-L <locale>
The name of the locale used for the IBM InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmpark -I myinstance -s Finance -A
IBM InfoSphere CDC parks all source tables in the Finance subscription.
See also
Managing tables for replication commands
dmreaddtable: Update source table definition
Use this command to update the definition of a source table in IBM InfoSphere CDC metadata. Run this command after you have changed the definition of a source table using your RDBMS.
Syntax
dmreaddtable -I <instance_name> <-A|-t <schema>.<table> ...> [-a] [-L <locale>]
Parameters
-I <instance_name>
Specifies the name of the IBM InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-A
Specifies that IBM InfoSphere CDC 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 IBM InfoSphere CDC updates the definition. You must specify the table name in the format schema.table. List the tables if you want to specify more than one.
-a
Specifies that the active state of a table is kept after the table definition is updated.
-L <locale>
The name of the locale used for the IBM InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmreaddtable -I new_instance -A
IBM InfoSphere CDC updates definitions for all source tables that are available for replication.
See also
Managing tables for replication commands
dmreassigntable: Update target table definition
Use this command to update the definition of a target table in IBM InfoSphere CDC metadata. Run this command after you have changed the definition of a target table using your RDBMS.
Syntax
dmreassigntable -I <instance_name> -s <subscription_names> <-A|-t <schema>.<table> ...> [-L <locale>]
Parameters
-I <instance_name>
Specifies the name of the IBM InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-s <subscription_names>
Specifies the IBM InfoSphere CDC subscription that contains the table. List the subscriptions if you specify more than one.
-A
Specifies that IBM InfoSphere CDC updates definitions for all target tables in the subscription.
-t <schema>.<table>
Specifies the name of a target table in the subscription for which IBM InfoSphere CDC updates the definition. You must specify the table name in the format schema.table. List the tables if you specify more than one.
-L <locale>
The name of the locale used for the IBM InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmreassigntable -I new_instance -s Finance -A
IBM InfoSphere CDC updates definitions for all target tables in the Finance subscription.
See also
Managing tables for replication commands
dmsetreplicationmethod: Set replication method
Use this command to change the replication method for tables in a subscription. When running this command, IBM InfoSphere CDC changes the status of any “Active” tables to “Refresh”.
Before you run this command, you must end replication on the subscription.
Syntax
dmsetreplicationmethod -I <instance_name> <-r|-m> -s <subscription_names> <-A|-t <schema>.<table> ...> [-L <locale>]
Parameters
-I <instance_name>
Specifies the name of the IBM InfoSphere CDC instance. Alternatively, you can specify the TSINSTANCE environment variable in place of this value.
-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_names>
Specifies the name of the subscriptions.
-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. List the tables if you specify more than one.
-L <locale>
The name of the locale used for the IBM InfoSphere CDC instance. The default is your machine's locale.
Result
This command returns a value of 0 if the command was successful and a non-zero value if the command fails.
Examples
dmsetreplicationmethod -I myinstance -r -s Finance -A
All tables in the Finance subscription will use Refresh as the replication method in the specified IBM InfoSphere CDC instance.
dmsetreplicationmethod -I new_instance -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 IBM InfoSphere CDC instance.
See also
Managing tables for replication commands