Diagnose issues in Oracle to PostgreSQL migrations

The migration job process might incur errors during runtime.

  • Some errors, such as a bad password on the source database, are recoverable. The migration job resumes automatically after these errors are fixed.
  • Some errors are unrecoverable, such as errors in data replication. You must restart the migration job after these errors are fixed.

When an error occurs, the migration job status changes to Failed, and the substatus reflects the last status before failure. To troubleshoot an error, navigate to the failed migration job to view the error and follow the steps outlined in the error message. To view more details about the error, navigate to Cloud Monitoring using the link on the migration job. The logs are filtered to the specific migration job.

In the following table, you can find some examples of issues and how they can be solved:

Symptom Possible causes Things to try
Error message: Cloud DMS can't set up a tunnel to be connected to the bastion host. Database Migration Service couldn't access the bastion host or the bastion host is not accepting connections. Verify your forward SSH tunnel settings in the connection profile, and the bastion host configuration, and try again.
Error message: Cloud DMS can't connect to the database or Cloud DMS private connectivity error, cannot connect to the database. Database Migration Service couldn't establish connectivity to the source Oracle database.

Verify that you can access the source Oracle database from your project, and make sure you correctly configured the connectivity settings in the source connection profile.

If there is a specific Oracle error code included, for example ORA-12170: TNS:Connect timeout occurred, check the Oracle documentation for more information.

Error message: Archiving mode is not ARCHIVELOG. The source wasn't configured correctly. Follow this guide to configure the source correctly.
Error message: Supplemental logging ("ALL COLUMN LOGGING") isn't turned on for the tables listed below. The source wasn't configured correctly. Follow this guide to configure the source correctly.
Error message: No Archive Log Files were found in the source. Database Migration Service only reads closed archive logs, and no logs were found in the source database.
  1. Run the following command in the source database to close the current log file: ALTER SYSTEM SWITCH LOGFILE.
  2. Try to find the logs again.

If the database doesn't have any active write operations, you might need to perform at least one INSERT operation to trigger the log creation.

Error message: We're missing the necessary permissions to read from the source. The source wasn't configured correctly. Follow this guide to configure the source correctly.
Error message: Unable to connect to the destination database. There was a problem connecting to the destination database. Verify the settings in the destination PostgreSQL connection profile. For private connectivity, see Troubleshoot Private Service Connect errors.
Error message: database {database_name} does not exist. Database Migration Service expects the destination database name and the username to match. Ensure that the username indicated in the destination connection profile and the destination database name match. Either recreate the destination database, or create a different username that matches the destination database. For more information, see Configure your destination AlloyDB for PostgreSQL database.

Ensure you have run Ora2pg to create the schema in the destination database.

Error message: The following tables don't exist in the destination database: {table_names} The listed tables that you are trying to migrate don't exist in the destination database. Ensure you have run Ora2pg to create the schema in the destination database, or modify the migration job settings.
Error message: password authentication failed for user {username}. The username or the password for the destination database are misconfigured. Ensure that the destination PostgreSQL connection profile is configured correctly with the right username and password.
Error message: The following tables in the destination database don't have primary keys: {table_names}. The tables listed exist in the destination database, but are missing primary keys. Ensure you have run Ora2pg to create the schema in the destination database. If the source table is missing a primary key, create the key manually in the destination database.
Warning: Foreign keys are impacting the migration duration and it's recommended to disable them prior to the migration. The following tables have foreign keys: {table_names}. The tables listed exist in the destination database, but have foreign keys. Disable all foreign keys and indexes in the destination database, and apply them back when the migration is completed. Foreign keys don't block the migration, however they impact its overall performance.
Error message: Unable to resume replication as log position is lost. This error might occur when the replication process is paused for a long time, which results in losing the log position. A migration job shouldn't be paused for periods close to the log retention period. When the error occurs, recreate the migration job.
Error message: ORA-00942: table or view does not exist. This error might occur as a result of caching on the Oracle server. Recreate the database user to fix the caching issue.