REGISTER MIGRATION SOURCE STORAGE UNIT
Description
The REGISTER MIGRATION SOURCE STORAGE UNIT syntax is used to register migration source storage unit for the current connection.
Syntax
RegisterMigrationSourceStorageUnit ::=
'REGISTER' 'MIGRATION' 'SOURCE' 'STORAGE' 'UNIT' storageUnitDefinition (',' storageUnitDefinition)*
storageUnitDefinition ::=
storageUnitName '(' (simpleSource | urlSource) ',' 'USER' '=' user (',' 'PASSWORD' '=' password)? (',' propertiesDefinition)? ')'
storageUnitName ::=
identifier
simpleSource ::=
'HOST' '=' hostname ',' 'PORT' '=' port ',' 'DB' '=' dbName
urlSource ::=
'URL' '=' url
hostname ::=
string
port ::=
int
dbName ::=
string
url ::=
string
user ::=
string
password ::=
string
propertiesDefinition ::=
'PROPERTIES' '(' (key '=' value (',' key '=' value)*)? ')'
key ::=
string
value ::=
literalSupplement
- Confirm that the registered migration source storage unit can be connected normally, otherwise it will not be added successfully;
storageUnitNameis case-sensitive;storageUnitNameneeds to be unique within the current connection;storageUnitNamename only allows letters, numbers and_, and must start with a letter;poolPropertyis used to customize connection pool parameters,keymust be the same as the connection pool parameter name,valuesupports int and String types;- When
passwordcontains special characters, it is recommended to use the string form; For example, the string form ofpassword@123is"password@123". - The migration source storage unit supports registration using either
URL, orHOST,PORT, andDB.
Example
- Register migration source storage unit
REGISTER MIGRATION SOURCE STORAGE UNIT ds_0 (
URL="jdbc:mysql://127.0.0.1:3306/migration_ds_0?serverTimezone=UTC&useSSL=false",
USER="root",
PASSWORD="root"
);- Register migration source storage unit using host, port, and database name
REGISTER MIGRATION SOURCE STORAGE UNIT ds_0 (
HOST="127.0.0.1",
PORT=3306,
DB="migration_ds_0",
USER="root",
PASSWORD="root"
);- Register migration source storage unit and set connection pool parameters
REGISTER MIGRATION SOURCE STORAGE UNIT ds_0 (
URL="jdbc:mysql://127.0.0.1:3306/migration_ds_0?serverTimezone=UTC&useSSL=false",
USER="root",
PASSWORD="root",
PROPERTIES("minPoolSize"="1","maxPoolSize"="20","idleTimeout"="60000")
);Reserved word
REGISTER, MIGRATION, SOURCE, STORAGE, UNIT, USER, PASSWORD, PROPERTIES, URL, HOST, PORT, DB