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 MySQL Target

Microsoft SQL Server Source and MySQL Target

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

0 COMMENTS

We’d like to hear from you!