Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
En el caso de las migraciones continuas, puedes iniciar el proceso de promoción cuando sea el momento de transferir las lecturas y escrituras a las bases de datos de destino.
La promoción significa que las bases de datos de Cloud SQL migradas ahora son accesibles para todas las operaciones de lectura y escritura.
Puedes promover una tarea de migración o bases de datos seleccionadas de una tarea de migración.
Inicia la promoción. Para evitar la pérdida de datos, asegúrate de detener todas las escrituras, las secuencias de comandos en ejecución y las conexiones de cliente a la base de datos de origen.
Aquí empieza el periodo de inactividad.
Asegúrate de que todos los datos disponibles de los archivos de registro de transacciones se repliquen en la instancia de destino de Cloud SQL para SQL Server.
Para conseguirlo, puedes realizar una de las siguientes acciones:
También puedes subir un archivo de registro de transacciones cuyo nombre termine con el sufijo .trn.final. Database Migration Service detiene las cargas continuas cuando detecta un archivo de copia de seguridad cuyo nombre coincide con la convención de sufijos .trn.final.
Cuando el servicio de migración de bases de datos termine de procesar ese archivo, el estado de la tarea de migración cambiará a Listo para promover.
La instancia de destino o las bases de datos que hayas seleccionado se promocionarán y las bases de datos migradas estarán disponibles para todas las operaciones de lectura y escritura.
El estado de la tarea de migración cambia a Completed.
Ahora, la aplicación se puede conectar a la instancia de Cloud SQL y la tarea de migración se puede eliminar de forma segura.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-21 (UTC)."],[[["\u003cp\u003ePromotion in continuous migrations shifts read and write operations to the destination Cloud SQL databases, making them fully accessible.\u003c/p\u003e\n"],["\u003cp\u003eBefore initiating promotion, it's critical to halt all writes, scripts, and client connections to the source database to prevent data loss, marking the start of downtime.\u003c/p\u003e\n"],["\u003cp\u003eEnsure all transaction log data is replicated by either stopping automated uploads or uploading the final transaction log file with the \u003ccode\u003e.trn.final\u003c/code\u003e suffix, after which the job status will update to \u003ccode\u003eReady to promote\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003ePromotion can be performed on all databases within a migration job, or selectively on specific databases, through the Google Cloud console or via gcloud commands.\u003c/p\u003e\n"],["\u003cp\u003eAfter successful promotion, the migrated databases are ready for read/write operations, the migration job status updates to \u003ccode\u003eCompleted\u003c/code\u003e, and it can then be safely deleted.\u003c/p\u003e\n"]]],[],null,["# Promote a migration job\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 the migrated Cloud SQL databases become now accessible\nfor all read and write operations.\n\nYou can promote a migration job or promote selected databases from a migration\njob.\n\n1. Initiate the promotion. To avoid data loss, make sure to stop all writes, running scripts, and client connections to the source database. The downtime period begins here.\n2. Make sure that all the available data from transaction log files is replicated to the Cloud SQL for SQL Server destination instance. You can achieve this result by performing one of the following actions:\n\n - Stop your [automated backup file uploads](/database-migration/docs/sqlserver/automate-backup-exports), or upload the last transaction log file. Monitor the [unprocessed transaction log backups size](/database-migration/docs/sqlserver/migration-job-metrics) to determine when Database Migration Service finishes processing that file.\n - Optionally, you can upload a transaction log file whose name ends in `.trn.final` suffix. Database Migration Service stops continuous loads when it detects a backup file whose name matches the [`.trn.final` suffix convention](/database-migration/docs/sqlserver/export-backup-files).\n\n When Database Migration Service finishes processing that file, migration\n job status changes to\n [**Ready to promote**](/database-migration/docs/sqlserver/migration-job-statuses#ready-to-promote).\n3. Perform the promote action:\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. On the **Jobs** tab, click the display name of the migration job that you want to promote.\n 3. The migration job details page opens.\n 4. Perform one of the following promote actions:\n - If you want to promote all databases included in the migration, on the migration job's toolbar, click **Promote**.\n\n The promote migration job dialog appears.\n - If you want to promote only specific databases, select them using the checkboxes next to the database names and on the **Databases** tab, click **Promote**.\n\n The dialog with a number of databases that you want to promote appears.\n 5. In the dialog, ensure that no errors are displayed, and then 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.\n4. The destination instance or the databases that you selected are promoted, and your migrated databases are now accessible for all read and write operations. The migration job status changes to `Completed`.\n5. The application can now be connected to the Cloud SQL instance and the migration job can be safely deleted."]]