OverviewDatabase Migration Service uses migration jobs to migrate data from your source database instance to the destination Cloud SQL 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
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.
Select Oracle from the Source database engine drop-down list.
From the Destination database engine menu, select Cloud SQL 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 PostgreSQL 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-keyin 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 Cloud SQL 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.
Specify information about the source and destination connection profiles
Select your source and destination connection profiles from the Source connection profile and Destination connection profile drop-down lists.
Optional. Click VIEW DETAILS to see additional information about each connection profile.
Click RUN TEST for each connection profile to verify that Database Migration Service can communicate with both the source and the destination.
If a test fails, then it indicates which part of the process had an issue. Necessary changes can be made and then re-tested.
Navigate to the part of the flow in question to correct the issue, and then retest.
Click SAVE & 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 jobOn 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.