Overview
DTS migrates advanced objects like functions, triggers, procedures, and events on a one-time basis. It only migrates advanced objects already in the source database to the target database before the task starts, not those added to the source database after the task starts.
Note:
Currently, advanced objects can be migrated between MySQL, TDSQL-C for MySQL, MariaDB, and Percona.
Scope of application
Advanced objects can be migrated only with NewDTS.
Notes
We recommend you not rename tables when migrating advanced objects; otherwise, the migration may fail.
As the failure to migrate advanced objects does not affect the entire migration task, the success of the entire migration task does not necessarily mean that the advanced objects are also successfully migrated. Therefore, we recommend you check whether they are migrated on the Migration Progress page after the migration is completed.
When procedures and functions are migrated, DTS will check whether user1
corresponding to DEFINER
([DEFINER = user1]
) in the source database is the same as the migration account user2
, and if not, DTS will change the SQL SECURITY
attribute of user1
in the target database from DEFINER
to INVOKER
([INVOKER = user1]
) after the migration, and set the DEFINER
in the target database to the migration account user2
([DEFINER = migration account user2]
).
Procedures and functions will be migrated during source database export. If there are no incremental migration tasks, triggers and events will be migrated when the task stops; otherwise, they will be migrated after you click Done, in which case the transition will take a longer time.
For cross-version migration, if the sql_mode
set for the advanced objects in the source database is not supported by the target database, sql_mode
will be changed to NO_AUTO_VALUE_ON_ZERO
after the advanced objects are migrated.
When migrating triggers and events, you need to grant the migration account the TRIGGER
and EVENT
permissions of the source database.
Directions
1. On the Set migration options and select migration objects page of the data migration task, set the Advanced Object feature as needed, which is not enabled by default. 2. The advanced object check item will be added to the verification task. For more information, see Advanced Object Check.
Was this page helpful?