%3CLINGO-SUB%20id%3D%22lingo-sub-1765290%22%20slang%3D%22en-US%22%3ESSMA%20dropping%20connection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1765290%22%20slang%3D%22en-US%22%3E%3CP%3ESSMA%20migration%20from%20MySQL%20to%20Azure%20SQL%20DB%20repeatedly%20dropping%20connection%20while%20data%20migration%20is%20in%20progress.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CEM%3E%3CSTRONG%3EError%3A%3C%2FSTRONG%3E%20'%3CFONT%20color%3D%22%23FF0000%22%3EThe%20connection%20has%20been%20disabled%3C%2FFONT%3E'.%3C%2FEM%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--536980373%22%20id%3D%22toc-hId--536980371%22%3ECollect%20relevant%20logs%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FH4%3E%0A%3CP%3EIn%20this%20case%20the%20error%20message%20is%20not%20giving%20us%20enough%20details%20on%20the%20root%20cause%2C%20so%20further%20investigation%20is%20required.%20Start%20initial%20data%20collection%20from%20SSMA%2C%20by%20following%20the%20below%20steps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%3E1.%26nbsp%3BOn%20source%20%20%0A%20%20%20-%20Collect%20the%20version%20details%20of%20the%20source%20database%20and%20the%20OS%20info.%20This%20is%20vital%20as%20there%20were%20numerous%20cases%20where%20we%20had%20started%20troubleshooting%20and%20then%20realized%20that%20we%20are%20on%20an%20unsupported%20build.%20%20%0A%20%20%20-%20Collect%20the%20version%20details%20of%20the%20providers%20%2F%20drivers%20used%20to%20make%20connection%20to%20the%20source%20database.%20%20%0A2.%26nbsp%3BOn%20destination%20%20%0A%20%20%20-%20Collect%20the%20version%20details%20of%20the%20SQL%20Server%20that%20we%20are%20trying%20to%20connect%20and%20the%20OS%20info.%20%20%20%0A%20%20%20-%20Collect%20the%20version%20details%20of%20the%20providers%20%2F%20drivers%20used%20to%20make%20connection.%20%20%0A3.%20Check%20the%20Migration%20Engine%20used%20(Client%20side%20%2F%20Server%20side)%20%20%0A%20%20%20-%20Navigate%20to%20Tools%20menu%20and%20go%20to%20Project%20Settings%20%20%0A%20%20%20-%20Check%20the%20migration%20engine%20option%20from%20the%20Migration%20menu%20%20%0A4.%26nbsp%3BCollect%20the%20SSMA%20logs%20after%20reproducing%20the%20issue%2C%20to%20get%20Log%20file%20path%20%20%0A%20%20%20-%20Navigate%20to%20Tools%20menu%20and%20go%20to%20Global%20Settings%20%20%0A%20%20%20-%20Select%20the%20Logging%20page%20and%20copy%20the%20Log%20file%20path%20under%20Misc%20category%20%20%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20are%20now%20ready%20to%20check%20the%20SSMA%20logs.%20Dropping%20connection%20with%20error%20%3CEM%3E'The%20connection%20has%20been%20disabled'%3C%2FEM%3E%26nbsp%3Bis%20often%20encountered%20with%20a%3CSTRONG%3E%20%3CFONT%20color%3D%22%23993300%22%3Econnection%20timeout%3C%2FFONT%3E%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22user-content-mitigation%22%20id%3D%22toc-hId--547483477%22%20id%3D%22toc-hId--547483475%22%3EMitigation%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FH3%3E%0A%3CP%3EWhen%20migrating%20big%20tables%2C%20the%20workaround%20is%20to%20tune%20the%20default%20migration%20parameters%20in%20Project%20Settings%2C%20to%20avoid%20the%20operation%20timeout%20and%20to%20make%20sure%20the%20migration%20succeed.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EOpen%20SSMA%20for%20MySql%20-%26gt%3B%20Go%20to%20Tools%20-%26gt%3B%20Project%20Settings%20-%26gt%3B%20Select%20General%20from%20the%20left%20menu%20-%26gt%3B%20Select%20Migration%20-%26gt%3B%20In%20the%20Misc%20section%20-%26gt%3B%20Set%20%3CSTRONG%3Edata%20migration%20timeout%3C%2FSTRONG%3E%20to%20a%20higher%20value%20(i.e.%201000)%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MelaniaNitu_0-1602277305280.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F225607i5669FE4F9F53E6FE%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22MelaniaNitu_0-1602277305280.png%22%20alt%3D%22MelaniaNitu_0-1602277305280.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EOpen%20SSMA%20for%20MySql%20-%26gt%3B%20Go%20to%20Tools%20-%26gt%3B%20Project%20Settings%20-%26gt%3B%20Select%20General%20from%20the%20left%20menu%20-%26gt%3B%20Select%20Migration%20-%26gt%3B%20In%20the%20Parallel%20data%20migration%20section%20-%26gt%3B%20Set%20Parallel%20data%20migration%20mode%20from%20%3CSTRONG%3EAuto%3C%2FSTRONG%3E%20to%20%3CSTRONG%3ECustom%3C%2FSTRONG%3E%20and%20set%20%3CSTRONG%3EThread%20Count%3C%2FSTRONG%3E%20from%2010%2C%20which%20is%20the%20default%2C%20to%20a%20lower%20value%20(i.e.%205)%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EOpen%20SSMA%20for%20MySql%20-%26gt%3B%20Go%20to%20Tools%20-%26gt%3B%20Project%20Settings%20-%26gt%3B%20Select%20General%20from%20the%20left%20menu%20-%26gt%3B%20Select%20Migration%20-%26gt%3B%20Lower%20the%20value%20of%20%3CSTRONG%3EBATCH_SIZE%3C%2FSTRONG%3E%20(i.e.%201000)%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MelaniaNitu_3-1602277904424.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F225613i688D5E89D4CBD885%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22MelaniaNitu_3-1602277904424.png%22%20alt%3D%22MelaniaNitu_3-1602277904424.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3ERun%20the%20data%20migration.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EAfter%20the%20above%20steps%2C%20the%20migration%20should%20complete%20successfully.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20more%20details%20on%20SSMA%20tool%2C%20check%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fssma%2Fsql-server-migration-assistant%3Fview%3Dsql-server-ver15%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESSMA%20reference%20documentation%3C%2FA%3E.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1765290%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EMigration%20of%20MySQL%20database%20to%20Azure%20Database%20using%20SQL%20Server%20Migration%20Assistant%20(SSMA)%26nbsp%3B%3C%2FSPAN%3Erepeatedly%20dropping%20connection%20while%20data%20migration%20is%20in%20progress.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1765290%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMigration%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMySQL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESSMA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

SSMA migration from MySQL to Azure SQL DB repeatedly dropping connection while data migration is in progress. 

 

Error: 'The connection has been disabled'.

 

Collect relevant logs

In this case the error message is not giving us enough details on the root cause, so further investigation is required. Start initial data collection from SSMA, by following the below steps.

 

1. On source  
   - Collect the version details of the source database and the OS info. This is vital as there were numerous cases where we had started troubleshooting and then realized that we are on an unsupported build.  
   - Collect the version details of the providers / drivers used to make connection to the source database.  
2. On destination  
   - Collect the version details of the SQL Server that we are trying to connect and the OS info.   
   - Collect the version details of the providers / drivers used to make connection.  
3. Check the Migration Engine used (Client side / Server side)  
   - Navigate to Tools menu and go to Project Settings  
   - Check the migration engine option from the Migration menu  
4. Collect the SSMA logs after reproducing the issue, to get Log file path  
   - Navigate to Tools menu and go to Global Settings  
   - Select the Logging page and copy the Log file path under Misc category  

 

You are now ready to check the SSMA logs. Dropping connection with error 'The connection has been disabled' is often encountered with a connection timeout.

 

Mitigation

When migrating big tables, the workaround is to tune the default migration parameters in Project Settings, to avoid the operation timeout and to make sure the migration succeed.

 

  1. Open SSMA for MySql -> Go to Tools -> Project Settings -> Select General from the left menu -> Select Migration -> In the Misc section -> Set data migration timeout to a higher value (i.e. 1000)

    MelaniaNitu_0-1602277305280.png

  2. Open SSMA for MySql -> Go to Tools -> Project Settings -> Select General from the left menu -> Select Migration -> In the Parallel data migration section -> Set Parallel data migration mode from Auto to Custom and set Thread Count from 10, which is the default, to a lower value (i.e. 5)

  3. Open SSMA for MySql -> Go to Tools -> Project Settings -> Select General from the left menu -> Select Migration -> Lower the value of BATCH_SIZE (i.e. 1000)

    MelaniaNitu_3-1602277904424.png

     

  4. Run the data migration.

After the above steps, the migration should complete successfully.

 

For more details on SSMA tool, check SSMA reference documentation