Stay organized with collections
Save and categorize content based on your preferences.
For continuous migrations, you can initiate the promotion process
after it's time to move reads and writes to the destination databases.
Promotion means that Database Migration Service disconnects from your source database,
stops replicating change data events to the destination database,
and cleans up all the temporary migration data.
The destination instance is promoted, and your migrated databases
are now accessible for all read and write operations.
The migration job status changes to Completed.
The application can now be connected to the Cloud SQL instance and the
migration job can be safely deleted.
[[["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-08-29 UTC."],[[["\u003cp\u003eDatabase Migration Service allows for heterogeneous SQL Server to Cloud SQL for PostgreSQL migrations, but is currently a pre-GA feature with limited support.\u003c/p\u003e\n"],["\u003cp\u003ePromoting a migration job disconnects from the source database, stops replication, and cleans up temporary migration data.\u003c/p\u003e\n"],["\u003cp\u003ePrior to promoting, stop all writes to the source database, and observe the replication delay metric, waiting for it to decrease.\u003c/p\u003e\n"],["\u003cp\u003eMigration jobs can be promoted via the Google Cloud console or through gcloud commands, such as \u003ccode\u003egcloud database-migration migration-jobs promote MIGRATION_JOB_ID --region=REGION\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAfter promotion, the migrated databases are ready for read and write operations on the destination Cloud SQL instance, the job status is updated to complete, and the migration job can be deleted.\u003c/p\u003e\n"]]],[],null,["# Finalize a migration\n\nFor continuous migrations, you can initiate the promotion process\nafter it's time to move reads and writes to the destination databases.\nPromotion means that Database Migration Service disconnects from your source database,\nstops replicating change data events to the destination database,\nand cleans up all the temporary migration data.\n\n1. Optional: [Verify migration data](/database-migration/docs/sqlserver-to-csql-pgsql/verify-migration) for completeness.\n2. Stop all writes, running scripts, and client connections to the source database. The downtime period begins here.\n3. Observe the [replication delay metric](/database-migration/docs/sqlserver-to-csql-pgsql/migration-job-metrics#replication_delay) and wait for it to trend down significantly, ideally on the order of minutes or seconds.\n4. Perform the promote action on the migration job.\n\n ### Console\n\n 1. In the Google Cloud console, go to the **Migration jobs** page.\n\n [Go to Migration jobs](https://console.cloud.google.com/dbmigration/migrations)\n 2. In the **Jobs** tab, click the display name of the migration job that you want to promote.\n\n The migration job details page opens.\n 3. Click **Promote**.\n 4. In the dialog box, click **Promote**.\n\n ### gcloud\n\n\n Before using any of the command data below,\n make the following replacements:\n - \u003cvar class=\"edit\" scope=\"MIGRATION_JOB_ID\" translate=\"no\"\u003eMIGRATION_JOB_ID\u003c/var\u003e with your migration job identifier.\n\n If you don't know the identifier, you can use the\n [`gcloud database-migration migration-jobs list`](/sdk/gcloud/reference/database-migration/migration-jobs/list) command to list all\n migration jobs in a given region and view their identifiers.\n - \u003cvar class=\"edit\" scope=\"REGION\" translate=\"no\"\u003eREGION\u003c/var\u003e with the identifier of the region where your connection profile is saved.\n - Optional: Database Migration Service migrates all databases in your source by default. If you want to migrate only specific databases,\n use the `--databases-filter` flag and specify their identifiers as a comma-separated list.\n\n For example: `--databases-filter=my-business-database,my-other-database`\n\n You can later edit migration jobs that you created with the `--database-filter flag`\n by using the [`gcloud database-migration migration-jobs update`](/sdk/gcloud/reference/database-migration/migration-jobs/update) command.\n\n\n Execute the\n\n following\n\n command:\n\n #### Linux, macOS, or Cloud Shell\n\n **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](/sdk/gcloud/reference/init); or [gcloud auth login](/sdk/gcloud/reference/auth/login) and [gcloud config set project](/sdk/gcloud/reference/config/set). \n\n ```bash\n gcloud database-migration migration-jobs \\\n promote MIGRATION_JOB_ID \\\n --region=REGION\n ```\n\n #### Windows (PowerShell)\n\n **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](/sdk/gcloud/reference/init); or [gcloud auth login](/sdk/gcloud/reference/auth/login) and [gcloud config set project](/sdk/gcloud/reference/config/set). \n\n ```bash\n gcloud database-migration migration-jobs `\n promote MIGRATION_JOB_ID `\n --region=REGION\n ```\n\n #### Windows (cmd.exe)\n\n **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](/sdk/gcloud/reference/init); or [gcloud auth login](/sdk/gcloud/reference/auth/login) and [gcloud config set project](/sdk/gcloud/reference/config/set). \n\n ```bash\n gcloud database-migration migration-jobs ^\n promote MIGRATION_JOB_ID ^\n --region=REGION\n ```\n\n #### Result\n\n\n The action is performed in an asynchronous manner.\n As such, this command returns an\n [Operation entity](/database-migration/docs/reference/rest/v1/projects.locations.operations) that represents a long-running operation:\n\n ```\n done: false\n metadata:\n '@type': type.googleapis.com/google.cloud.clouddms.v1.OperationMetadata\n apiVersion: v1\n createTime: '2024-02-20T12:20:24.493106418Z'\n requestedCancellation: false\n target: MIGRATION_JOB_ID\n verb: start\n name: OPERATION_ID\n ```\n To see if your operation is successful, you can query the returned operation object, or check the status of the migration job:\n - Use the [`gcloud database-migration migration-jobs describe`](/sdk/gcloud/reference/database-migration/migration-jobs/describe) command to view the status of the migration job.\n - Use the [`gcloud database-migration operations describe`](/sdk/gcloud/reference/database-migration/operations/describe) with the \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e to see the status of the operation itself.\n5. The destination instance is promoted, and your migrated databases are now accessible for all read and write operations. The migration job status changes to `Completed`.\n6. The application can now be connected to the Cloud SQL instance and the migration job can be safely deleted."]]