Table of Contents

Search

  1. Preface
  2. Overview
  3. Datatype Mappings for DB2 for Linux, UNIX, and Windows Sources
  4. Datatype Mappings for Microsoft SQL Server Sources
  5. Datatype Mappings for MySQL Sources
  6. Datatype Mappings for Oracle Sources
  7. Datatype Mappings for Virtual Source Columns

Datatype Mapping Reference

Datatype Mapping Reference

Microsoft SQL Server Source and DB2 for Linux, UNIX, and Windows Target

Microsoft SQL Server Source and DB2 for Linux, UNIX, and Windows Target

The following table identifies the recommended datatype mappings for Data Replication configurations with a Microsoft SQL Server source and a DB2 for Linux, UNIX, and Windows target:
Microsoft SQL Server Source Datatype
DB2 Target Datatype
Comments
BIGINT
BIGINT
-
BINARY(
n
)
  • BLOB(1G)
    Mapping condition:
    n
    == -1
  • CHAR FOR BIT DATA(
    n
    )
    Mapping condition:
    (
    n
    <= 124) and (
    n
    != -1)
  • BLOB(
    n
    )
-
BIT
SMALLINT
-
CHAR(
n
)
  • CHAR(
    n
    )
    Mapping condition:
    (
    n
    <= 254)
  • VARCHAR(
    n
    )
    Mapping condition:
    254 <
    n
-
DATE
DATE
-
DATETIME
TIMESTAMP
-
DATETIME2
TIMESTAMP
-
DATETIMEOFFSET
TIMESTAMP
-
DECIMAL(
p
,
s
)
  • DECIMAL(
    p
    ,
    s
    )
    Mapping condition:
    (
    p
    <= 31) and (
    s
    <=
    p
    ) and (0 <=
    s
    ) and (1 <=
    p
    )
  • DECIMAL(
    p
    ,
    s'
    )
    s'
    = 0
    Mapping condition:
    (
    p
    <= 31) and (
    s
    == -1) and (1 <=
    p
    )
  • VARCHAR(42)
    Mapping condition:
    (
    p
    > 31)
  • DECIMAL(18,0)
    Mapping condition:
    (
    p
    == -1) and (
    s
    == -1)
-
FLOAT(
p
)
  • FLOAT(
    p'
    )
    p'
    = 7
    Mapping condition:
    p
    <= 7
  • FLOAT(
    p'
    )
    p'
    = 15
    Mapping condition:
    p
    <= 15
  • DOUBLE
    Mapping condition:
    p
    > 15 and
    p
    <= 53
-
GEOGRAPHY
BLOB
-
GEOMETRY
BLOB
-
HIERARCHYID
BLOB
-
IMAGE
BLOB(1G)
Use the global.lob_truncation_size runtime parameter to set the maximum size of a source LOB value that the Applier and InitialSync can replicate to the target. Maximum supported size for change data capture is 50 MB.
INT
INTEGER
-
MONEY
DECIMAL(19,4)
-
NCHAR(
n
)
  • GRAPHIC(
    n
    )
    Mapping condition:
    (
    n
    <= 127)
  • VARGRAPHIC(
    n
    )
    Mapping condition:
    127 <
    n
-
NTEXT
CLOB(1G)
Use the global.lob_truncation_size runtime parameter to set the maximum size of a source LOB value that the Applier and InitialSync can replicate to the target. Maximum supported size for change data capture is 50 MB.
NUMERIC(
p
,
s
)
  • DECIMAL(
    p
    ,
    s
    )
    Mapping condition:
    (
    p
    <= 31) and (
    s
    <=
    p
    ) and (0 <=
    s
    ) and (1 <=
    p
    )
  • DECIMAL(
    p
    ,
    s'
    )
    s'
    = 0
    Mapping condition:
    (
    p
    <= 31) and (
    s
    == -1) and (1 <=
    p
    )
  • DECIMAL(18,0)
    Mapping condition:
    (
    p
    == -1) and (
    s
    == -1)
  • VARCHAR(42)
    Mapping condition:
    (
    p
    > 31)
-
NVARCHAR(
n
)
  • CLOB(1G)
    Mapping condition:
    n
    == -1
  • VARGRAPHIC(
    n
    )
    Mapping condition:
    n
    > 0 and
    n
    <= 2023
  • CLOB
    Mapping condition:
    2023 <
    n
-
REAL
REAL
-
SMALLDATETIME
TIMESTAMP
-
SMALLINT
SMALLINT
-
SMALLMONEY
DECIMAL(10,4)
-
SQL_VARIANT
CLOB
-
SYSNAME(
n
)
VARGRAPHIC(
n
)
-
TEXT
CLOB(1G)
Use the global.lob_truncation_size runtime parameter to set the maximum size of a source LOB value that the Applier and InitialSync can replicate to the target. Maximum supported size for change data capture is 50 MB.
TIME
TIMESTAMP
-
TIME(0)
TIME
-
TIME(1)
TIMESTAMP
-
TIME(2)
TIMESTAMP
-
TIME(3)
TIMESTAMP
-
TIME(4)
TIMESTAMP
-
TIME(5)
TIMESTAMP
-
TIME(6)
TIMESTAMP
-
TIMESTAMP
BIGINT
-
TINYINT
DECIMAL(3,0)
-
UNIQUEIDENTIFIER(
n
)
CHAR FOR BIT DATA(
n'
)
n'
= 16
-
VARBINARY(
n
)
  • BLOB(1G)
    Mapping condition:
    n
    == -1
  • BLOB(
    n
    )
-
VARCHAR(
n
)
  • VARCHAR(
    n
    )
    Mapping condition:
    (
    n
    < 4046) and (
    n
    != -1)
  • CLOB
    Mapping condition:
    4046 <=
    n
  • CLOB
    Mapping condition:
    n
    == -1
-
XML
CLOB
-

0 COMMENTS

We’d like to hear from you!