For a heterogeneous migration, Data Transmission Service converts columns to data types supported by the target database engine. The following tables list the mappings of source and target types for supported migration paths.

TiDB-to-MySQL

Source: a user-created TiDB database

Target: a user-created MySQL database, an ApsaraDB RDS for MySQL database, or an ApsaraDB for PolarDB database

TiDB data type MySQL data type
BIGINT BIGINT
BINARY BINARY
BIT BIT
BOOL\ BOOLEAN TINYINT
CHAR CHAR
DATE DATE
DATETIME DATETIME
DECIMAL DECIMAL
DOUBLE DOUBLE
ENUM ENUM
FLOAT FLOAT
INT INT
INTEGER INTEGER
JSON JSON

MEDIUMBLOB/LONGBLOB

TINYBLOB/BLOB/

MEDIUMBLOB/LONGBLOB

TINYBLOB/BLOB/

MEDIUMINT MEDIUMINT
SET SET
SMALLINT SMALLINT
TEXT/LONGTEXT TEXT/LONGTEXT
TIME TIME
TIMESTAMP TIMESTAMP
TINYINT TINYINT
VARBINARY VARBINARY
VARCHAR VARCHAR
YEAR YEAR

Oracle-to-MySQL

Source: a user-created Oracle database

Target: a user-created MySQL database, an ApsaraDB RDS for MySQL database, or an ApsaraDB for PolarDB database

Oracle data type MySQL data type
varchar2(n [char/byte]) varchar(n)
nvarchar2[(n)] national varchar[(n)]
char[(n [byte/char])] char[(n)]
nchar[(n)] national char[(n)]
number[(p[,s])] decimal[(p[,s])]
float(p)] double
long longtext
date datetime
binary_float decimal(65,8)
binary_double double
timestamp[(fractional_seconds_precision)] datetime[(fractional_seconds_precision)]
timestamp[(fractional_seconds_precision)]with localtimezone datetime[(fractional_seconds_precision)]
timestamp[(fractional_seconds_precision)]with localtimezone datetime[(fractional_seconds_precision)]
clob longtext
nclob longtext
blob longblob
raw varbinary(2000)
long raw longblob
bfile Not supported
interval year(year_precision) to month Not supported
interval day(day_precision)to second[(fractional_seconds_precision)] Not supported
Note
  • A CHAR column with a length greater than 255 bytes is converted to the varchar(n) type.
  • Data types such as BFILE, INTERVAL YEAR TO MONTH, and INTERVAL DAY TO SECOND in Oracle databases are not supported in MySQL databases. They cannot be converted to data types supported by the destination database during schema migration.

    The schema migration fails if the table to be migrated contains unsupported data types. You must make sure that these unsupported columns are excluded from the objects to be migrated.

  • The TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE data types in Oracle databases contain time zone information. However, the timestamp data type of MySQL databases does not contain time zone information. Therefore, DTS translates the time values of these data types into UTC time before transferring them to the target database.

Oracle-to-DRDS

Source: a user-created Oracle database

Target: a database created on a DRDS instance

Oracle data type DRDS data type
varchar2(n [char/byte]) varchar(n)
nvarchar2[(n)] national varchar[(n)]
char[(n [byte/char])] char[(n)]
nchar[(n)] national char[(n)]
number[(p[,s])] decimal[(p[,s])]
float(p)] double
long longtext
date datetime
binary_float decimal(65,8)
binary_double double
timestamp[(fractional_seconds_precision)] datetime[(fractional_seconds_precision)]
timestamp[(fractional_seconds_precision)]with localtimezone datetime[(fractional_seconds_precision)]
timestamp[(fractional_seconds_precision)]with localtimezone datetime[(fractional_seconds_precision)]
clob longtext
nclob longtext
blob longblob
raw varbinary(2000)
long raw longblob
bfile Not supported
interval year(year_precision) to month Not supported
interval day(day_precision)to second[(fractional_seconds_precision)] Not supported
Note
  • A CHAR column with a length greater than 255 bytes is converted to the VARCHAR(n) type in the DRDS database.
  • The TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE types in Oracle databases contain time zone information. However, the timestamp data type of DRDS databases does not contain the time zone information. Therefore, DTS translates the time values of these data types into UTC time before transferring them to the target database.

Oracle-to-PPAS

Source: a user-created Oracle database

Target: an ApsaraDB RDS for PPAS database

Oracle data type PPAS data type
varchar2(n [char/byte]) varchar2[(n)]
nvarchar2[(n)] nvarchar2[(n)]
char[(n [byte/char])] char[(n)]
nchar[(n)] nchar[(n)]
number[(p[,s])] number[(p[,s])]
float(p)] double precision
long long
date date
binary_float real
binary_double double precision
timestamp[(fractional_seconds_precision)] timestamp[(fractional_seconds_precision)]
timestamp[(fractional_seconds_precision)]with time zone timestamp[(fractional_seconds_precision)]with time zone
timestamp[(fractional_seconds_precision)]with local time zone timestamp[(fractional_seconds_precision)]with time zone
clob clob
nclob nclob
blob blob
raw raw(size)
long raw long raw
bfile Not supported
interval year(year_precision) to month interval year to month
interval day(day_precision) to second[(fractional_seconds_precision)] interval day to second[(fractional_seconds_precision)]
Note The TIMESTAMP [(fractional_seconds_precision)] WITH LOCAL TIME ZONE data type in Oracle databases is not supported in ApsaraDB RDS for PPAS databases. DTS translates the time values of these data types into UTC time before storing them as the TIMESTAMP [(fractional_seconds_precision)] WITH TIME ZONE data type of the target instance.