It may not be necessary to specify a CREATE TABLE MAPPING statement for each of your sending tables.
CREATE TABLE MAPPING |
CREATE DEFAULT TABLE MAPPINGS |
---|---|
Use to create an associate of a source table to a target table. |
Use to create an automatically specified table mapping between a sending table and a same- or similarly-named table at any target server. |
Designed for sending and receiving tables that are too dissimilar for the default mapping. |
Designed for sending and receiving tables that are the same or very nearly the same. |
|
Use to create default mappings that also provide for system variables (if you are distributing to transaction journal tables, for example) |
Usage
Creates table mappings based on the algorithm described in Create a default table mapping. The table mappings are created for any tables you do not explicitly map with a CREATE TABLE MAPPING statement.
The table mappings also include column mappings from system variables to target columns. The system variables are mapped only if target columns exist that have the names designated in the initialization file installed with Connect CDC Director (omnient.ini). You must ensure that such columns are defined in the receiving tables. You can edit the initialization file to modify the required names.
The system variables and their default designated names follow:
System variable |
Target column name |
---|---|
Row Manipulation Type |
sv_manip_type |
Sending DBMS Type |
sv_sending_dbms |
Sending Server Name |
sv_sending_server |
Sending Table Name |
sv_sending_table |
Transaction Id |
sv_trans_id |
Transaction Row Sequence |
sv_trans_row_seq |
Transaction Timestamp |
sv_trans_timestamp |
The CREATE DEFAULT TABLE MAPPINGS statement is also useful if:
-
You are adding a new receiving server and want to quickly map the existing source tables to that server.
-
You are distributing to transaction journal tables and want to include system variables in your default table mappings.
CREATE DEFAULT [JOURNAL ] TABLE MAPPINGS
FOR table-list AT [SERVER] source-server
TO [SERVERS] server-list [DISTRIBUTION distid]
;
-
Specify the CREATE DEFAULT TABLE MAPPINGS statement in your RSL file after all your CREATE SHARED TABLE statements.
-
The CREATE DEFAULT TABLE MAPPINGS statement does not replace any table mappings. To replace a mapping, use DELETE TABLE MAPPING followed by CREATE DEFAULT TABLE MAPPINGS, CREATE TABLE MAPPING, or both.
-
table-list is a comma-separated list of fully-qualified table names. New default mappings are created for these tables to any new target servers specified.
-
server-list is a comma-separated list of target server names.
-
distid is an optional Distribution name to which the created mappings are added.