There are cases where Connect CDC discovers new datatypes at runtime, for example, user-defined datatypes in MS SQL Server (see User-defined datatypes) and Sybase.
If such datatypes are used, they must be defined at all instances of the DBMS. For example, you cannot have two Sybase instances that have different lists of user-defined datatypes.
Datatypes discovered at runtime are assumed to be compatible with any other datatype. The Connect CDC Director does not prevent you from mapping a user-defined datatype to any datatype supported by Connect CDC. If datatypes are in fact incompatible, you will receive runtime errors. Table registration and data distribution may fail.
To distribute a column that has a user-defined datatype, define the same datatype in the Connect CDC metabase database (omnirep), exactly as it is in the original database. Do this before you register the table in the Connect CDC Director.
If a user-defined datatype is not defined in the metabase, when a request is started and the XML metadata loaded, Connect CDC Kernel fails to populate the SQL metabase.
EXEC sp_addType UDTNUM42, "numeric(4,2)";
EXEC sp_addType UDTVC20, "varchar(20)";
EXEC sp_addType UDTVC30, "varchar(30)";
EXEC sp_addType UDTINT, "int";
create table qatest.dbo.UDT (
key1 int primary key,
col1 varchar(20),
col2 udtvc20,
col3 udtvc30,
col4 udtnum42,
col5 udtint);
Executing these commands would result in the creation of the following datatypes:
These datatypes display in the Datatypes column on the Table Properties dialog box, Mapping Tab, as the following example shows:
Similarly, they are displayed on the Table Properties dialog box, Column Tab, just as system-defined datatypes would be.