Stay organized with collections
Save and categorize content based on your preferences.
Database Migration Service uses migration jobs to migrate data from your source databases
to the AlloyDB for PostgreSQL destination cluster. Migration jobs help you organize the
source and destination connection profiles, define settings specific to the
migration process, monitor the progress, and safely finalize the whole operation.
Creating a migration job includes performing the following tasks:
Selecting source and destination connection profiles.
Selecting the conversion workspace and specifying objects you want to migrate.
Performing a migration job test to ensure that Database Migration Service is able
to connect to your data source and destination.
Starting the migration job, and monitoring the progress.
Promoting the migration job when you want to switch your application
to the new instance.
To get the permissions that you need to create a migration job for
heterogeneous SQL Server migrations, ask your administrator to grant the
required IAM roles on your project for the following
accounts involved in the migration process:
For more information about granting roles, see
Manage access in the Identity and Access Management documentation.
These predefined roles contain the permissions required to perform
heterogeneous SQL Server migrations with Database Migration Service. To see the exact
permissions that are required, expand the
Required permissions section:
Required permissions
The following permissions are required to perform heterogeneous SQL Server
migrations with Database Migration Service:
The migration job configuration wizard page opens.
This wizard contains multiple panels that walk you through
each configuration step.
You can pause the creation of a migration job at any point by
clicking SAVE & EXIT. All of the data that you enter up to
that point is saved in a draft migration job.
You can finish your draft migration job later. See
Update a draft migration job.
On the Get started page, enter the following information:
Migration job name
This is a human-readable name for your migration job. This
value is displayed in the Google Cloud console.
Migration job ID
This is a machine-readable identifier for your migration job.
You use this value to work with migration jobs by using
Database Migration Service Google Cloud CLI commands or API.
From the Source database engine list, select
your SQL Server source database.
From the Destination database engine drop-down menu, select
AlloyDB for PostgreSQL.
Optional: If you want to manage your own data encryption key for the migration,
expand the Advanced encryption options and do the following:
Select the Cloud KMS key option.
Leave the default Cloud KMS option for the Key type setting.
Database Migration Service doesn't support the Cloud KMS with autokey feature.
From the Select a customer-managed key drop-down menu, select your encryption
key. You can also manually enter the fully qualified identifier for your key.
Click Save and continue.
On the Define your source page, from the Source connection profile drop-down
menu, select your source connection profile.
Click Save and continue.
On the Define a destination page, from the Destination connection profile
drop-down menu, select your destination connection profile.
Click Save and continue.
On the Configure migration objects page, perform the following actions:
From the Conversion workspace drop-down menu, select your conversion workspace.
In the Select objects to migrate section, use the checkboxes to select which
objects you want to include in this migration job. This list is populated based on what objects
you converted to PostgreSQL schema in the conversion workspace.
Click Save and continue.
On the Test and create migration job, perform the following
actions:
(Optional) Click Test job to verify if Database Migration Service
can successfully identify all the backup files and establish
the necessary network connections.
If the test fails, you can consult the error messages to address
the problem, and run the test again. For more information on possible
errors, see
Diagnose issues.
Click Create and start job to begin your migration.
If you want to perform the migration job at a different time,
click Save and return later to run the job.
See
Start a migration job.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eDatabase Migration Service facilitates the migration of data from SQL Server to AlloyDB for PostgreSQL through migration jobs, including defining connection profiles, migration settings, monitoring progress, and finalizing the process.\u003c/p\u003e\n"],["\u003cp\u003eBefore initiating a migration job, it's necessary to configure the source database, establish network connectivity, set up connection profiles for both source and destination, and convert the SQL Server schema using a Database Migration Service conversion workspace.\u003c/p\u003e\n"],["\u003cp\u003eCreating a migration job involves selecting source and destination profiles, choosing a conversion workspace, specifying migration objects, testing the job to ensure connectivity, and finally, starting the migration.\u003c/p\u003e\n"],["\u003cp\u003eThe process requires specific IAM roles, such as Database Migration Admin, for the user and service accounts to ensure the necessary permissions are granted for performing heterogeneous SQL Server migrations.\u003c/p\u003e\n"],["\u003cp\u003eThe page mentions this feature is in Pre-GA and it is subject to the "Pre-GA Offerings Terms", which means it is available "as is" with possibly limited support.\u003c/p\u003e\n"]]],[],null,["# Create a migration job\n\nDatabase Migration Service uses migration jobs to migrate data from your source databases\nto the AlloyDB for PostgreSQL destination cluster. Migration jobs help you organize the\nsource and destination connection profiles, define settings specific to the\nmigration process, monitor the progress, and safely finalize the whole operation.\n\nCreating a migration job includes performing the following tasks:\n\n- Selecting source and destination connection profiles.\n\n- Selecting the conversion workspace and specifying objects you want to migrate.\n\n- Performing a migration job test to ensure that Database Migration Service is able\n to connect to your data source and destination.\n\n- Starting the migration job, and monitoring the progress.\n\n- Promoting the migration job when you want to switch your application\n to the new instance.\n\nBefore you begin\n----------------\n\n1. Ensure you meet the following requirements:\n - Your [configured your source database](/database-migration/docs/sqlserver-to-alloydb/configure-source-database) for migration.\n - You configured [source network connectivity](/database-migration/docs/sqlserver-to-alloydb/networking-methods-source).\n - You have the [source connection profile](/database-migration/docs/sqlserver-to-alloydb/create-source-connection-profile) for your database.\n - You [created and configured your destination](/database-migration/docs/sqlserver-to-alloydb/configure-destination-database) AlloyDB for PostgreSQL instance.\n - You configured [destination network connectivity](/database-migration/docs/sqlserver-to-alloydb/networking-methods-destination).\n - You have the [destination connection profile](/database-migration/docs/sqlserver-to-alloydb/create-destination-connection-profile) for the AlloyDB for PostgreSQL instance.\n - You [converted your source SQL Server schema](/database-migration/docs/sqlserver-to-alloydb/convert-sql) with a Database Migration Service conversion workspace.\n - Optional: If you want to manage your own certificates for the migration job, you [prepared the necessary encryption keys](/database-migration/docs/sqlserver-to-alloydb/cmek-for-migration-jobs).\n2. In the Google Cloud console, on the project selector page, select or [create a Google Cloud project](/resource-manager/docs/creating-managing-projects).\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n3. Enable the Database Migration Service and AlloyDB for PostgreSQL Admin APIs. [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=datamigration.googleapis.com,sqladmin.googleapis.com)\n\n### Required roles\n\nTo get the permissions that you need to create a migration job for\nheterogeneous SQL Server migrations, ask your administrator to grant the\nrequired IAM roles on your project for the following\n[accounts involved in the migration process](/database-migration/docs/sqlserver-to-alloydb/access-control):\n\n- User account that performs the migration:\n - [Database Migration Admin](/iam/docs/roles-permissions/datamigration#datamigration.admin) (`roles/datamigration.admin`)\n- Database Migration Service service account:\n - [Database Migration Admin](/iam/docs/roles-permissions/datamigration#datamigration.admin) (`roles/datamigration.admin`)\n\nFor more information about granting roles, see\n[Manage access](/iam/docs/granting-changing-revoking-access) in the Identity and Access Management documentation.\n\nThese predefined roles contain the permissions required to perform\nheterogeneous SQL Server migrations with Database Migration Service. To see the exact\npermissions that are required, expand the\n**Required permissions** section: \n\n#### Required permissions\n\nThe following permissions are required to perform heterogeneous SQL Server\nmigrations with Database Migration Service:\n\n- `datamigration.* `\n- `resourcemanager.projects.get `\n- `resourcemanager.projects.list `\n- `alloydb.clusters.create`\n- `alloydb.clusters.get`\n- `alloydb.clusters.list`\n- `alloydb.clusters.update`\n- `alloydb.clusters.delete`\n- `alloydb.instances.create`\n- `alloydb.instances.get`\n- `alloydb.instances.list`\n- `alloydb.instances.update`\n- `alloydb.instances.delete`\n- `alloydb.operations.get`\n- `compute.machineTypes.list `\n- `compute.machineTypes.get `\n- `compute.projects.get `\n\nYou might also be able to get these permissions with\n[custom roles](/iam/docs/creating-custom-roles) or other\n[predefined roles](/iam/docs/roles-permissions).\n\nDefine settings and create a migration job\n------------------------------------------\n\nTo create a migration job, perform the following steps:\n\n1. In the Google Cloud console, go to the **Migration jobs** page.\n\n [Go to Migration jobs](https://console.cloud.google.com/dbmigration/migrations)\n2. Click **Create migration job** .\n\n The migration job configuration wizard page opens.\n This wizard contains multiple panels that walk you through\n each configuration step.\n\n You can pause the creation of a migration job at any point by\n clicking **SAVE \\& EXIT** . All of the data that you enter up to\n that point is saved in a draft migration job.\n You can finish your draft migration job later. See\n [Update a draft migration job](/database-migration/docs/sqlserver-to-alloydb/manage-migration-jobs#update-draft).\n3. On the **Get started** page, enter the following information:\n - Migration job name This is a human-readable name for your migration job. This\n value is displayed in the Google Cloud console.\n\n - Migration job ID This is a machine-readable identifier for your migration job.\n You use this value to work with migration jobs by using\n Database Migration Service Google Cloud CLI commands or API.\n\n - From the **Source database engine** list, select your SQL Server source database.\n - From the **Destination database engine** drop-down menu, select **AlloyDB for PostgreSQL**.\n - Optional: If you want to manage your own data encryption key for the migration, expand the **Advanced encryption options** and do the following:\n 1. Select the **Cloud KMS key** option.\n 2. Leave the default **Cloud KMS** option for the **Key type** setting.\n\n Database Migration Service doesn't support the *Cloud KMS with autokey* feature.\n 3. From the **Select a customer-managed key** drop-down menu, select your encryption key. You can also manually enter the fully qualified identifier for your key.\n4. Click **Save and continue**.\n5. On the **Define your source** page, from the **Source connection profile** drop-down menu, select your source connection profile.\n6. Click **Save and continue**.\n7. On the **Define a destination** page, from the **Destination connection profile** drop-down menu, select your destination connection profile.\n8. Click **Save and continue**.\n9. On the **Configure migration objects** page, perform the following actions:\n 1. From the **Conversion workspace** drop-down menu, select your conversion workspace.\n 2. In the **Select objects to migrate** section, use the checkboxes to select which objects you want to include in this migration job. This list is populated based on what objects you converted to PostgreSQL schema in the conversion workspace.\n10. Click **Save and continue**.\n11. On the **Test and create migration job** , perform the following actions:\n 1. (Optional) Click **Test job** to verify if Database Migration Service can successfully identify all the backup files and establish the necessary network connections.\n\n If the test fails, you can consult the error messages to address\n the problem, and run the test again. For more information on possible\n errors, see\n [Diagnose issues](/database-migration/docs/sqlserver-to-alloydb/diagnose-issues).\n 2. Click **Create and start job** to begin your migration.\n\n If you want to perform the migration job at a different time,\n click **Save** and return later to run the job.\n See\n [Start a migration job](/database-migration/docs/sqlserver-to-alloydb/manage-migration-jobs#start).\n\nWhat's next\n-----------\n\n- [Start migration jobs](/database-migration/docs/sqlserver-to-alloydb/manage-migration-jobs#start)\n- [Monitor migration jobs](/database-migration/docs/sqlserver-to-alloydb/migration-job-metrics)\n- [Promote a migration job](/database-migration/docs/sqlserver-to-alloydb/finalize-migration)"]]