- Overview
- Environment
- Quick Start
- Configuration
- Commands
- mtk
- init-project
- config
- license
- mig
- show
- sync
- sync-schema
- sync-sequence
- sync-object-type
- sync-domain
- sync-wrapper
- sync-server
- sync-user-mapping
- sync-queue
- sync-table
- sync-nickname
- sync-rule
- sync-table-data
- sync-table-data-estimate
- sync-index
- sync-constraint
- sync-db-link
- sync-view
- sync-mview
- sync-function
- sync-procedure
- sync-package
- sync-trigger
- sync-synonym
- sync-table-data-com
- sync-alter-sequence
- sync-coll-statistics
- check-table-data
- gen
- gen completion
- encrypt
- convert-plsql
- report
- self
- mvd
- usql
- Graphical
- Faqs
- Release
MTK Object
Object
Migrate object definitions
- Case-sensitive
- Migration user, database, and schema
- schema = Oracle user
- schema = MySQL database
- schema = PostgreSQL schema
- schema = DB2 schema
- schema = Informix schema
- schema = SQLServer schema
Parameters schemas and tables are mutually exclusive. If both parameters are configured, the error "schema and table cannot exist together" will occur during migration.
If no migration object is defined, the error "not define Migrate object" will occur during migration.
Field | Type | Group | Description |
---|---|---|---|
tables | []string | Define the object names of tables, views, functions, stored procedures, packages, etc. to be migrated | |
schemas | []string | Defines schema during migration. | |
excludeTable | map[string][]string | Defines which tables are excluded. | |
tableSplit | map[string]map[string][]string | Defines table granularity parallelism, which can be automatically generated by using mtk show-table-split. |
Appears in:
Config
.object
Example:
Object Example
{
"tables": [
"MTK.TAB1",
"MTK.TAB111%",
"MTK1.*",
"MTK1.TAB_PART:P1,P2"
],
"schemas": [
"SCHEMA1",
"SCHEMA2"
],
"excludeTable": {
"SCHEMA1": [
"TABLE_SKIP1",
"TABLE_DUTY_LOG*",
"^TABLE_DUTY_LOG*",
"^TABLE_DUTY_LOG.*$"
],
"SCHEMA2": [
"TABLE_SKIP1"
]
},
"tableSplit": {
"SCHEMA1": {
"TAB_1": [
"ID < 10000",
"ID < 90000 AND ID >=10000",
"ID >= 90000"
]
}
}
}
tables
Type: []string
Desc: Define the object names of tables, views, functions, stored procedures, packages, etc. to be migrated
when running a subcommand migration, such as sync-function
and
configured with tables (MTK.XXX
) is the XXX
function under Migrating Schema MTK
.
Desc | |
---|---|
schema_name.* | is equivalent to configuring schema under schemas |
schema_name.table_name | |
schema_name.table_name:P01,P02 | |
schema_name.object_name% | |
schema_name.view_name | ./mtk sync-view Migrates the view with the specified name under the schema |
schema_name.function_name | ./mtk sync-function Migrates the function with the specified name under the schema |
schema_name.procedure_name | ./mtk sync-procedure Migrates the stored procedure with the specified name under the schema |
Example:
Tables Example
{
"tables": [
"MTK.TAB1",
"MTK.TAB111%",
"MTK1.*",
"MTK1.TAB_PART:P1,P2"
]
}
schemas
Type: []string
Desc: Defines schema during migration.
Example:
Schemas Example
{
"schemas": [
"SCHEMA1",
"SCHEMA2"
]
}
excludeTable
Type: map[string][]string
Desc: Defines which tables are excluded.
Example:
Exclude Table Example
{
"excludeTable": {
"SCHEMA1": [
"TABLE_SKIP1",
"TABLE_DUTY_LOG*",
"^TABLE_DUTY_LOG*",
"^TABLE_DUTY_LOG.*$"
],
"SCHEMA2": [
"TABLE_SKIP1"
]
}
}
tableSplit
Type: map[string]map[string][]string
Desc: Defines table granularity parallelism, which can be automatically generated by using mtk show-table-split.
Defines table migration query conditions.
Example:
Table Split Example
{
"tableSplit": {
"SCHEMA1": {
"TAB_1": [
"ID < 10000",
"ID < 90000 AND ID >=10000",
"ID >= 90000"
]
}
}
}