Mapping multiple source tables to new tables using LiveAudit
You can use a wizard to not only map multiple source tables using the LiveAudit™ feature, but also to create new target tables for the mappings.
Procedure
- Click Configuration > Subscriptions.
- Select a subscription, right-click and select Map Tables.
- Select Multiple One-to-One Mappings > LiveAudit and click Next.
- Review the following audit columns. You can choose to add, modify, or
delete audit columns to the target table. Click Next:
- AudTime
- Stores the &TIMSTAMP journal control field which indicates date and time changes are made to the source.
- AudType
- Stores the &ENTTYP journal control field which indicates the type of change made to the source.
- AudUser
- Stores the &USER journal control field which indicates the ID of the user who made the change to the source.
- Expand the database, schema, or table from the
Source Tables list to view tables from your database that are available for
mapping. Right-click the database user or schema and click Refresh if you do
not see your table listed.
You may be prompted to filter databases, schemas, or tables if Automatically prompt for filter when expanding nodes is enabled in your preferences. For more information see, Setting advanced preferences. To manually define a filter, select a datastore, database, or schema and click Specify Filter.
- Enable one or more tables to map from the Source Tables list. If you do not see your table listed, right-click the database user or schema and select Refresh.
- If you want to hide columns so that the target is not aware of them, select a source table and click Filter Columns. Clear the check box for the column you want to hide and click OK.
- Click Next.
- Select Create new target tables and
click Next.
CDC Replication creates a table that is able to hold the data being sent from the source but none of the other table characteristics, such as storage options, will be specified. The tables that are created by CDC Replication can often be useful for quickly creating test environments. For production environments, a DBA should manually create a table that will better address the expected usage of the target system. Some source data types have no natural corresponding target data type and CDC Replication is unable to provide a default mapping. In these cases, you need to explicitly create the target table.
- Select a target owner by clicking the Click
to select a target owner section of the list, under the Target
Library or Target Schema (if you
are using a DB2® agent) heading.
Note that if you are mapping to a datastore that uses a Db2 database, you must enter the Tablespace in the Select Schema for New Target Tables dialog box.
- Choose from the following options and click Next:
- Identical to the source table names—Names the new target tables the same name as the source tables.
- Source table names with prefixes and/or suffixes—Adds the suffix, the prefix, or both, to the source table name. Enable the Use prefix/suffix for index name check box to use the prefix and suffix as the index name.
- Review the mapping summary and click Finish.