REGISTER MIGRATION SOURCE STORAGE UNIT

Description

The REGISTER MIGRATION SOURCE STORAGE UNIT syntax is used to register migration source storage unit for the currently connection.

Syntax

Grammar Railroad diagram

  1. RegisterStorageUnit ::=
  2. 'REGISTER' 'MIGRATION' 'SOURCE' 'STORAGE' 'UNIT' storageUnitDefinition (',' storageUnitDefinition)*
  3. storageUnitDefinition ::=
  4. StorageUnitName '(' 'URL' '=' url ',' 'USER' '=' user (',' 'PASSWORD' '=' password)? (',' propertiesDefinition)?')'
  5. storageUnitName ::=
  6. identifier
  7. url ::=
  8. string
  9. user ::=
  10. string
  11. password ::=
  12. string
  13. propertiesDefinition ::=
  14. 'PROPERTIES' '(' ( key '=' value ) ( ',' key '=' value )* ')'
  15. key ::=
  16. string
  17. value ::=
  18. literal

Supplement

  • Confirm that the registered migration source storage unit can be connected normally, otherwise it will not be added successfully;
  • storageUnitName is case-sensitive;
  • storageUnitName needs to be unique within the current connection;
  • storageUnitName name only allows letters, numbers and _, and must start with a letter;
  • poolProperty is used to customize connection pool parameters, key must be the same as the connection pool parameter name, value supports int and String types;
  • When password contains special characters, it is recommended to use the string form; For example, the string form of password@123 is "password@123".
  • The data migration source storage unit currently only supports registration using URL, and temporarily does not support using HOST and PORT.

Example

  • Register migration source storage unit
  1. REGISTER MIGRATION SOURCE STORAGE UNIT ds_0 (
  2. URL="jdbc:mysql://127.0.0.1:3306/migration_ds_0?serverTimezone=UTC&useSSL=false",
  3. USER="root",
  4. PASSWORD="root"
  5. );
  • Register migration source storage unit and set connection pool parameters
  1. REGISTER MIGRATION SOURCE STORAGE UNIT ds_0 (
  2. URL="jdbc:mysql://127.0.0.1:3306/migration_ds_0?serverTimezone=UTC&useSSL=false",
  3. USER="root",
  4. PASSWORD="root",
  5. PROPERTIES("minPoolSize"="1","maxPoolSize"="20","idleTimeout"="60000")
  6. );

Reserved word

REGISTER, MIGRATION, SOURCE, STORAGE, UNIT, USER, PASSWORD, PROPERTIES, URL