Database Migration Service uses migration jobs to migrate data from your source database instance to the destination Cloud SQL for PostgreSQL database instance.
Creating a migration job includes:
- Defining settings for the migration job
- Specifying information about the connection profile that you created for your source database (source connection profile)
- Specifying information about the connection profile that you created for your destination database (destination connection profile)
- Configuring the objects that you want to migrate from the source database
- Testing the migration job to ensure that the connection information you provided for the job is valid
Before you begin
Before you create a migration job, make sure that you:
- Create connection profiles for both your source Oracle database and your destination Cloud SQL for PostgreSQL database. See Create connection profiles.
- Create a conversion workspace that Database Migration Service uses to convert the schema and objects from your source database to a format that's compatible with your destination database instance. See Create a conversion workspace.
Define settings for the migration job
- Go to the Migration jobs page in the Google Cloud Console.
- Click CREATE MIGRATION JOB at the top of the page.
- Provide a name for the migration job. Choose a friendly name that helps you identify the migration job. Don't include sensitive or personally identifiable information in the job name.
Keep the auto-generated Migration job ID.
From the Source database engine menu, select Oracle.
From the Destination database engine menu, select AlloyDB for PostgreSQL.
Select the destination region for your migration. This is where the Database Migration Service instance is created, and should be selected based on the location of the services that need your data, such as Compute Engine instances and App Engine apps, and other services. After you choose the destination region, this selection can't be changed.
Optional: Expand the Advanced encryption options section and specify whether you want to manage the encryption of the data that's migrated from the source to the destination. By default, your data is encrypted with a key that's managed by Google Cloud.
If you want to manage your encryption, you can use a customer-managed encryption key (CMEK). The key must be in the same location as your Cloud SQL for MySQL database. For example, for databases located in us-west1 can use only keys in us-west1.
- Select the Customer-managed encryption key (CMEK) radio button.
- From the Select a customer-managed key menu, select your CMEK.
If you don't see your key, then click ENTER KEY RESOURCE NAME to provide the resource name of the key that you want to use. For example, you can enter
projects/my-project-name/locations/my-location/keyRings/my-keyring/cryptoKeys/my-key
in the Key resource name field, and then click SAVE.
Review the required prerequisites that are generated automatically to reflect how the environment must be prepared for a migration job. These prerequisites can include how to configure the source database and how to connect it to the destination database instance. It's best to complete these prerequisites at this step, but you can complete them at any time before you test the migration job or start it. For more information about these prerequisites, see Configure your source Oracle database.
Click SAVE & CONTINUE.
Define source settings
On the Define your source page, perform the following:
- From the Source connection profile drop-down menu, select the source connection profile for your Oracle instance.
- Click Save and continue.
- (Optional) In the Test connection profile section, click Run test
to check if Database Migration Service can establish a network connection to your
source instance.
You can create the migration job even if the connection test fails, but you should fix any connectivity issues before you run the migration job.
- In the Customize source configuration section, configure the following
settings:
- Full dump configuration
- In this section, you can choose how to perform the full dump phase
of your migration.
- Select Automatic if you want Database Migration Service to automatically read all existing data from the databases you select for migration, and then load that data to the destination instance for you.
- Select Customer-managed if you want to
load existing data from your source to the destination instance outside Database Migration Service.
This option causes the migration job to skip the full dump phase
and immediately start with the CDC phase.
To use the customer-managed full dump phase, you need to provide an Oracle System Change Number (SCN) to mark at which log position you want Database Migration Service to begin the change data capture replication.
- Source read settings
- You can customize how many maximum concurrent connections Database Migration Service
can make to your source instance for the full dump phase or the
CDC phase.
Database Migration Service adjusts the number of connections to ensure the best performance within provided connection limit. Increasing the maximum connection limit can improve the migration speed, but introduces additional load on your source databases.
You can configure the following settings:
- Maximum concurrent full dump connections
Default value:
50
Allowed values: minimum
1
, maximum50
- Maximum concurrent CDC connections
Default value:
5
Allowed values: minimum
1
, maximum50
- Maximum concurrent full dump connections
- Click Save and continue.
Define destination settings
On the Define your destination page, perform the following:
- From the Destination connection profile drop-down menu, select the destination connection profile.
- Click Save and continue.
- (Optional) In the Test connection profile section, click Run test
to check if Database Migration Service can establish a network connection to your
destination.
You can create the migration job even if the connection test fails, but you should fix any connectivity issues before you run the migration job.
- In the Customize destination configuration section, configure the following
settings:
- Maximum concurrent destination connections
-
Default value:
128
Allowed values: minimum
2
, maximum256
You can customize how many maximum concurrent connections Database Migration Service can make to your destination instance.
Database Migration Service adjusts the number of connections to ensure the best performance within provided connection limit. Increasing the maximum connection limit can improve the migration speed, but introduces additional load on your destination databases.
- Transaction timeout
-
Default value:
30
Allowed values: minimum
30
, maximum300
During the migration process, Database Migration Service can encounter certain issues that cause the transaction to time out. You can adjust the number of seconds that Database Migration Service waits for the transaction to complete before it is canceled.
Canceled transactions don't cause your migration job to fail. The migration job continues to copy data, but moves to the Running with errors status. You can view migration job details to check what issues need to be addressed.
- Click Save and continue.
Select objects to migrate
Select your conversion workspace from the Conversion workspace drop-down list.
Optional. Click VIEW DETAILS to see additional information about the conversion workspace.
After you select a conversion workspace, the Select objects to migrate region of the page lists all objects (schemas and tables) from the Oracle source database that can be migrated into the destination.
Select the database objects from the list that you want Database Migration Service to migrate.
Click SAVE & CONTINUE.
Test and create the migration job
On this final step, review the summary of the migration job settings, source, and destination, and then test the validity of the migration job setup. If any issues are encountered, then you can modify the migration job's settings. Not all settings are editable.
Click TEST JOB to verify that:
The source database has been configured correctly, based on the prerequisites.
Database Migration Service can connect to the destination database.
All converted tables are present in the destination database.
All converted tables in the destination database have a primary key.
None of the converted tables in the destination database has a foreign key. Foreign keys don't block the migration, however they impact the overall performance of the migration. If there are tables with foreign keys in the destination database, Database Migration Service issues a warning.
If the test fails, then you can address the problem in the appropriate part of the flow, and return to re-test.
The migration job can be created even if the test fails, but after the job is started, it may fail at some point during the run.
Click CREATE & START JOB to create the migration job and start it immediately, or click CREATE JOB to create the migration job without immediately starting it.
If the job isn't started at the time that it's created, then it can be started from the Migration jobs page by clicking START.
Regardless of when the migration job starts, your organization is charged for the existence of the destination instance.
The migration job is added to the migration jobs list and can be viewed directly.