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 Microsoft SQL Server Target

Microsoft SQL Server Source and Microsoft SQL Server Target

The following table identifies the recommended datatype mappings for Data Replication configurations with a Microsoft SQL Server source and a Microsoft SQL Server target:
Microsoft SQL Server Source Datatype
Microsoft SQL Server Target Datatype
Comments
BIGINT
BIGINT
-
BINARY(
n
)
BINARY(
n
)
-
BIT
BIT
-
CHAR(
n
)
CHAR(
n
)
-
DATE
DATE
-
DATETIME
DATETIME
-
DATETIME2
DATETIME2
-
DATETIMEOFFSET
DATETIMEOFFSET
-
DECIMAL(
p
,
s
)
  • DECIMAL(
    p
    ,
    s
    )
    Mapping condition:
    (
    p
    <= 38) and (
    s
    <=
    p
    ) and (0 <=
    s
    ) and (1 <=
    p
    )
  • DECIMAL(
    p
    ,
    s'
    )
    s'
    = 0
    Mapping condition:
    (
    p
    <= 38) and (
    s
    == -1) and (1 <=
    p
    )
  • DECIMAL(18,0)
    Mapping condition:
    (
    p
    == -1) and (
    s
    == -1)
-
FLOAT
FLOAT
-
GEOGRAPHY
GEOGRAPHY
-
GEOMETRY
GEOMETRY
-
HIERARCHYID
HIERARCHYID
-
IMAGE
IMAGE
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
INT
-
MONEY
MONEY
-
NCHAR(
n
)
NCHAR(
n
)
-
NTEXT
NTEXT
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
)
  • NUMERIC(
    p
    ,
    s
    )
    Mapping condition:
    (
    p
    <= 38) and (
    s
    <=
    p
    ) and (0 <=
    s
    ) and (1 <=
    p
    )
  • NUMERIC(
    p
    ,
    s'
    )
    s'
    = 0
    Mapping condition:
    (
    p
    <= 38) and (
    s
    == -1) and (1 <=
    p
    )
  • NUMERIC(18,0)
    Mapping condition:
    (
    p
    == -1) and (
    s
    == -1)
-
NVARCHAR(
n
)
  • NVARCHAR(
    n
    )
    Mapping condition:
    n
    != -1
  • NVARCHAR(MAX)
    Mapping condition:
    n
    == -1
-
REAL
REAL
-
SMALLDATETIME
SMALLDATETIME
-
SMALLINT
SMALLINT
-
SMALLMONEY
SMALLMONEY
-
SQL_VARIANT
SQL_VARIANT
-
SYSNAME(
n
)
NVARCHAR(
n'
)
n'
= (
n
+
SrcMinCharsetSize
- 1) /
SrcMinCharsetSize
-
TEXT
TEXT
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
TIME
-
TIME(0)
TIME(0)
-
TIME(1)
TIME(1)
-
TIME(2)
TIME(2)
-
TIME(3)
TIME(3)
-
TIME(4)
TIME(4)
-
TIME(5)
TIME(5)
-
TIME(6)
TIME(6)
-
TIMESTAMP
BIGINT
-
TINYINT
TINYINT
-
UNIQUEIDENTIFIER
UNIQUEIDENTIFIER
-
VARBINARY(
n
)
  • VARBINARY(
    n
    )
    Mapping condition:
    n
    != -1
  • VARBINARY(MAX)
    Mapping condition:
    n
    == -1
-
VARCHAR(
n
)
  • VARCHAR(
    n
    )
    Mapping condition:
    n
    != -1
  • VARCHAR(MAX)
    Mapping condition:
    n
    == -1
-
XML
XML
-

0 COMMENTS

We’d like to hear from you!