|
| 1 | +### Fetch issues |
| 2 | + |
| 3 | +##### Fetch exits early due to mismatches |
| 4 | + |
| 5 | +`molt fetch` exits early in the following cases, and will output a log with a corresponding `mismatch_tag` and `failable_mismatch` set to `true`: |
| 6 | + |
| 7 | +- A source table is missing a primary key. |
| 8 | +- A source primary key and target primary key have mismatching types. |
| 9 | +- A [`STRING`]({% link {{site.current_cloud_version}}/string.md %}) primary key has a different [collation]({% link {{site.current_cloud_version}}/collate.md %}) on the source and target. |
| 10 | +- A source and target column have mismatching types that are not [allowable mappings]({% link molt/molt-fetch.md %}#type-mapping). |
| 11 | +- A target table is missing a column that is in the corresponding source table. |
| 12 | +- A source column is nullable, but the corresponding target column is not nullable (i.e., the constraint is more strict on the target). |
| 13 | + |
| 14 | +`molt fetch` can continue in the following cases, and will output a log with a corresponding `mismatch_tag` and `failable_mismatch` set to `false`: |
| 15 | + |
| 16 | +- A target table has a column that is not in the corresponding source table. |
| 17 | +- A source column has a `NOT NULL` constraint, and the corresponding target column is nullable (i.e., the constraint is less strict on the target). |
| 18 | +- A [`DEFAULT`]({% link {{site.current_cloud_version}}/default-value.md %}), [`CHECK`]({% link {{site.current_cloud_version}}/check.md %}), [`FOREIGN KEY`]({% link {{site.current_cloud_version}}/foreign-key.md %}), or [`UNIQUE`]({% link {{site.current_cloud_version}}/unique.md %}) constraint is specified on a target column and not on the source column. |
| 19 | + |
| 20 | +<section class="filter-content" markdown="1" data-scope="oracle"> |
| 21 | +##### ORA-01950: no privileges on tablespace |
| 22 | + |
| 23 | +If you receive `ORA-01950: no privileges on tablespace 'USERS'`, it means the Oracle table owner (`migration_schema` in the preceding examples) does not have sufficient quota on the tablespace used to store its data. By default, this tablespace is `USERS`, but it can vary. To resolve this issue, grant a quota to the table owner. For example: |
| 24 | + |
| 25 | +~~~ sql |
| 26 | +-- change UNLIMITED to a suitable limit for the table owner |
| 27 | +ALTER USER migration_schema QUOTA UNLIMITED ON USERS; |
| 28 | +~~~ |
| 29 | + |
| 30 | +##### No tables to drop and recreate on target |
| 31 | + |
| 32 | +When expecting a bulk load but seeing `no tables to drop and recreate on the target`, ensure the migration user has `SELECT` and `FLASHBACK` privileges on each table to be migrated. For example: |
| 33 | + |
| 34 | +~~~ sql |
| 35 | +GRANT SELECT, FLASHBACK ON migration_schema.employees TO C##MIGRATION_USER; |
| 36 | +GRANT SELECT, FLASHBACK ON migration_schema.payments TO C##MIGRATION_USER; |
| 37 | +GRANT SELECT, FLASHBACK ON migration_schema.orders TO C##MIGRATION_USER; |
| 38 | +~~~ |
| 39 | + |
| 40 | +##### Table or view does not exist |
| 41 | + |
| 42 | +If the Oracle migration user lacks privileges on certain tables, you may receive errors stating that the table or view does not exist. Either use `--table-filter` to {% if page.name != "migrate-load-replicate.md" %}[limit the tables to be migrated]({% link molt/migrate-load-replicate.md %}#schema-and-table-filtering){% else %}[limit the tables to be migrated](#schema-and-table-filtering){% endif %}, or grant the migration user `SELECT` privileges on all objects in the schema. Refer to {% if page.name != "migrate-load-replicate.md" %}[Create migration user on source database]({% link molt/migrate-load-replicate.md %}#create-migration-user-on-source-database){% else %}[Create migration user on source database](#create-migration-user-on-source-database){% endif %}. |
| 43 | + |
| 44 | +##### Oracle sessions remain open after forcefully stopping `molt` or `replicator` |
| 45 | + |
| 46 | +If you shut down `molt` or `replicator` unexpectedly (e.g., with `kill -9` or a system crash), Oracle sessions opened by these tools may remain active. |
| 47 | + |
| 48 | +- Check your operating system for any running `molt` or `replicator` processes and terminate them manually. |
| 49 | +- After confirming that both processes have stopped, ask a DBA to check for active Oracle sessions using: |
| 50 | + |
| 51 | + ~~~ sql |
| 52 | + SELECT sid, serial#, username, status, osuser, machine, program |
| 53 | + FROM v$session |
| 54 | + WHERE username = 'C##MIGRATION_USER'; |
| 55 | + ~~~ |
| 56 | + |
| 57 | + Wait until any remaining sessions display an `INACTIVE` status, then terminate them using: |
| 58 | + |
| 59 | + ~~~ sql |
| 60 | + ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE; |
| 61 | + ~~~ |
| 62 | + |
| 63 | + Replace `sid` and `serial#` in the preceding statement with the values returned by the `SELECT` query. |
| 64 | +</section> |
0 commit comments