|
| 1 | +# Heterogeneous Database Migration Prerequisites (PostgreSQL & MySQL) |
| 2 | + |
| 3 | +This repository contains prerequisite SQL objects (views) to support **optimal parallel processing** and **reliable restart capability** when migrating from **non-Oracle (heterogeneous) source databases**. |
| 4 | + |
| 5 | +You can place the SQL statements provided below into separate files (recommended structure included). |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +For heterogeneous source databases, certain prerequisites must be met to enable: |
| 12 | +- **Parallel processing** during migration, and |
| 13 | +- **Reliable restart capability** (resume in-progress work without restarting from the beginning) |
| 14 | + |
| 15 | +If the required views are **not** created on the source database, the migration may **fall back to CTAS**, and any in-progress table migration may **restart from the beginning**. |
| 16 | + |
| 17 | +> Note: API parameters are similar to **database link parameters**. For details, refer to **Database Link Parameters** in the public documentation. |
| 18 | +
|
| 19 | +--- |
| 20 | + |
| 21 | +## General Prerequisites (All Heterogeneous Sources) |
| 22 | + |
| 23 | +- Ensure the supplied user credentials have the required privileges to access the schema being migrated. |
| 24 | +- The database specified by `service_name` must provide access to the target schema. |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## PostgreSQL |
| 29 | + |
| 30 | +### Purpose |
| 31 | +To enable parallel processing and reliable restart capability on a PostgreSQL source database, create the required views. |
| 32 | + |
| 33 | +### Files (recommended) |
| 34 | +Place the SQL into files such as: |
| 35 | + |
| 36 | +- `postgres/ALL_TAB_PARTITIONS.sql` |
| 37 | +- `postgres/ALL_PART_KEY_COLUMNS.sql` |
| 38 | +- `postgres/ALL_PART_TABLES.sql` |
| 39 | + |
| 40 | +### Required Views |
| 41 | +- `ALL_TAB_PARTITIONS` |
| 42 | +- `ALL_PART_KEY_COLUMNS` |
| 43 | +- `ALL_PART_TABLES` |
| 44 | + |
| 45 | +> Add the PostgreSQL SQL definitions to the files above. |
| 46 | +
|
| 47 | +--- |
| 48 | + |
| 49 | +## MySQL |
| 50 | + |
| 51 | +### Parameter Requirements |
| 52 | +- For a MySQL source database, set `schema_list` to an empty array (`[]`). |
| 53 | +- The value provided in `service_name` is used as the schema name, because MySQL does not support schemas in the same way as other databases. |
| 54 | +- For `table_list`, specify tables using the `service_name` value as the schema name, along with the corresponding table name. |
| 55 | + |
| 56 | +### Purpose |
| 57 | +To enable parallel processing and reliable restart capability on a MySQL source database, create the required views. |
| 58 | + |
| 59 | +### Files (recommended) |
| 60 | +Place the SQL into files such as: |
| 61 | + |
| 62 | +- `mysql/ALL_PART_TABLES.sql` |
| 63 | +- `mysql/ALL_PART_KEY_COLUMNS.sql` |
| 64 | +- `mysql/ALL_TAB_PARTITIONS.sql` |
| 65 | + |
| 66 | +### Required Views |
| 67 | +- `ALL_PART_TABLES` |
| 68 | +- `ALL_PART_KEY_COLUMNS` |
| 69 | +- `ALL_TAB_PARTITIONS` |
0 commit comments