top of page
Writer's pictureGeorge Lin

Migrating Thousands Databases To Azure ONLINE? Here Is How We Got It Done - Part3: Get It Going (C)


The Other Actions


As you may have already noticed, there are some other action names you can pass to parameter $Action at MyAzDMS.ps1 command line. Those actions are optional and not needed if the migration goes smoothly, but in reality, you will have to take most, if not all, of the actions discussed below:


-Action ValidateDMSTaskCreattion


Try to create Validation DMS tasks to verify if the DMS activities can be created successfully. The database migration won't take place and the activities are not visible through Azure portal


-Action ShowMigrationState


Query the database migration state information of the selected DMS activities from the table $MigrationGroupTableName and display in a grid view windows.


-Action CutoverWithougCheckingLastLogIssue


Issue cutover request on the databases in the selected DMS activities that are in 'LOG_FILES_UPLOADING' state no matter if the last transactional log backup file having been restored/applied. This action is often used to test a migration cutover when data loss is not an issue


-Action ResetCutoverStateFlag


Reset the Cutover Time column value in MigGrp_XXX table for the databases in the selected activities so that a cutover request can be applied again on the database. This is required when the cutover had issued on the database, so as the CutoverTime column was updated as well by the action, but it didn't take effect. To re-try cutover on the same database, the CutoverTime value needs to be reset, otherwise cutover code in MyAzDMS.ps1 would consider it's a double-cutover and skip the database.


-Action CutoverByRESTAPI


Complete the database restore through calling the Azure REST API on the databases in the selected activities which are (usually stuck) in CUTOVER_IN_PROGRESS state and having had the last transactional log backup file restored/applied. This is a very useful and valuable function provided in MyAzDMS.ps1.



-Action StopAllDMSTask


Try to stop all selected running DMS activities mostly for troubleshooting failures. For example, one missing full backup incident on one database causes the whole activity fails even all other databases in the same activity are good to go. To redo the activity, you have to first stop then delete it so that it can be recreated using the same configuration.


-Action StopDMSValidationTask


Try to stop all selected running validation DMS activities.


-Action StopFailedDMSTask


Try to stop all selected DMS activities if they contains failed databases migration


-Action RemoveDMSTask


Try to delete selected DMS activities that are not in 'Running' state. Stop the activities first before try this action.


-Action RedoDMSTask


Try to redo the selected DMS activities with the following steps:

  1. Stop the selected DMS tasks

  2. Remove Selected DMS tasks

  3. Remove the related target databases

  4. Recreate the selected DMS tasks


-Action StartDMSInstance


Quickly start multiple Azure DMS instances in parallel for the selected migration IDs. The DMS service stops after 24 hours of inactivity. So you may find this action very handy.


-Action StopDMSInstance


Quickly stop multiple Azure DMS instances in parallel for the selected migration IDs. This action is often called when troubleshooting DMS activity failures


-Action RemoveDMSInstance


Quickly delete multiple Azure DMS instances in parallel for the selected migration IDs for cleaning up or troubleshooting (delete then recreate it with a different name)


-Action RemoveDMSProject


Quickly delete multiple DMS projects in the DMS instances for the selected migration IDs. All the activities in the projects will be dropped as well. In some troubleshooting situations, this is the only way to stop/remove failed DMS activities when both Stop-AzDMSTask and Delete-AzDMSTask don't work.


-Action RemoveDMSSAContainers


Delete the Azure Storage Account blob containers for the databases in the selected DMS activities. This is used when cleaning up the Azure resources post migration


-Action RemoveTargetDB


Delete the target databases on the target SQLMI for the selected DMS activates. Be very careful not deleting any real production databases. MyAzDMS.ps1 has some built-in features, configurable in Config.txt file, to prevent accident database deletion.


-Action RedoDatabaseMigration


Redo the DMS migration for the selected database including dropping the related target databases and re-configuring the DMS records in $DMSTaskConfigTableName and $MigrationGroupTableName table


Recent Posts

See All

Comments


bottom of page