locked
"Operation is not valid due to the current state of the object." while trying to convert MySQL to MSSQL via SSMA 7.0 RRS feed

  • Question

  • I am failing to migrate a MySQL 5.7.13 database to either MS SQL Server 2016 or Azure SQL using SSMA 7.0 via MySQL ODBC Connector 5.3.6 (also tried 5.1.3) due to errors. How to fix or overcome the error?

    Converting table yyy.xxx ...
     Errors: M2SS0135: Unparsed SQL [CREATE TABLE `xxx` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `lastUpdate` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
      `logTime` datetime NOT NULL,
      `ip` varchar(255) NOT NULL,
      `remoteHost` varchar(255) NOT NULL,
      `userId` int(10) unsigned DEFAULT NULL,
      `clientId` int(10) unsigned DEFAULT NULL,
      `projectId` int(10) unsigned DEFAULT NULL,
      `tableName` varchar(255) NOT NULL,
      `rowId` int(10) unsigned DEFAULT NULL,
      `operation` varchar(255) NOT NULL,
      `message` text,
      PRIMARY KEY (`id`),
      KEY `userId` (`userId`),
      KEY `logTime` (`logTime`,`id`),
      KEY `projectId` (`projectId`),
      KEY `clientId` (`clientId`)
    ) ENGINE=InnoDB AUTO_INCREMENT=338323 DEFAULT CHARSET=utf8] cannot be converted.

    [Gui: Error] [8072/54]: LowLevelAdapter.ConvertTree : Convert error: System.InvalidOperationException: Operation is not valid due to the current state of the object.
       at Microsoft.SSMA.Framework.Generic.XTree.XNode.ChildrenList.get_Item(Int32 index)
       at Microsoft.SSMA.Framework.Generic.XTree.XNode.get_FirstChild()
       at Microsoft.SSMA.Framework.MySql.SqlServerTreeConverter.Converters.TableConverter.GenerateMetabase(XNode sourceNode, XNode target, XDocument targetDocument, ITreeConversionContext context, TreeConversionState state)
       at Microsoft.SSMA.Framework.MySql.SqlServerTreeConverter.Converters.ParsableObjectConverter.ConvertSql(XNode source, XNode target, ITreeConversionContext context, TreeConversionState state)
       at Microsoft.SSMA.Framework.MySql.SqlServerTreeConverter.Converters.TableConverter.ConvertNodeImpl(XNode source, XNode target, ITreeConversionContext context, TreeConversionState state)
       at Microsoft.SSMA.Framework.Generic.TreeConverters.Default.DefaultTreeNodeConverter.ConvertNode(XNode sourceNode, ITreeConversionContext context, TreeConversionState state)
       at Microsoft.SSMA.Framework.Generic.TreeConverters.Default.DefaultTreeConverter.ProcessNode(ITreeConversionContext context, TreeConversionState state, XNode node)
       at Microsoft.SSMA.Framework.Generic.Factories.Utils.TreeTraverser`2.ProcessSubTree(TContext context, TState state, XNode sourceSubtree, Set`1 objectsToProcess, Set`1 affectedNodes, IUIStopOperationProvider stopOperationProvider, IUIOutputWindowProvider outputWindow, IUIProgressBarProvider progressBarProvider)
       at Microsoft.SSMA.Framework.Generic.Factories.Utils.TreeTraverser`2.TraverseTree(TContext context, TState state, XNode sourceNode)
       at Microsoft.SSMA.Framework.Generic.Factories.Utils.OpTreeTraverser`2.TraverseTree(TContext context, TState state, XNode sourceNode)
       at Microsoft.SSMA.Framework.Generic.TreeConverters.Default.DefaultTreeConverter.ConvertTree(XNode sourceNode, ITreeConversionContext context)
       at Microsoft.SSMA.GUI.Generic.LowLevel.AppCommandProcessing.Commands.SsmaAppConvertCommand.StartConvert(Object context).
    [Gui: Error] [8072/54]: Exception: Operation is not valid due to the current state of the object.
     site: Microsoft.SSMA.Framework.Generic.XTree.XNode get_Item(Int32)
     source: Microsoft.SSMA.Framework.Generic.XTree
       at Microsoft.SSMA.Framework.Generic.XTree.XNode.ChildrenList.get_Item(Int32 index)
       at Microsoft.SSMA.Framework.Generic.XTree.XNode.get_FirstChild()
       at Microsoft.SSMA.Framework.MySql.SqlServerTreeConverter.Converters.TableConverter.GenerateMetabase(XNode sourceNode, XNode target, XDocument targetDocument, ITreeConversionContext context, TreeConversionState state)
       at Microsoft.SSMA.Framework.MySql.SqlServerTreeConverter.Converters.ParsableObjectConverter.ConvertSql(XNode source, XNode target, ITreeConversionContext context, TreeConversionState state)
       at Microsoft.SSMA.Framework.MySql.SqlServerTreeConverter.Converters.TableConverter.ConvertNodeImpl(XNode source, XNode target, ITreeConversionContext context, TreeConversionState state)
       at Microsoft.SSMA.Framework.Generic.TreeConverters.Default.DefaultTreeNodeConverter.ConvertNode(XNode sourceNode, ITreeConversionContext context, TreeConversionState state)
       at Microsoft.SSMA.Framework.Generic.TreeConverters.Default.DefaultTreeConverter.ProcessNode(ITreeConversionContext context, TreeConversionState state, XNode node)
       at Microsoft.SSMA.Framework.Generic.Factories.Utils.TreeTraverser`2.ProcessSubTree(TContext context, TState state, XNode sourceSubtree, Set`1 objectsToProcess, Set`1 affectedNodes, IUIStopOperationProvider stopOperationProvider, IUIOutputWindowProvider outputWindow, IUIProgressBarProvider progressBarProvider)
       at Microsoft.SSMA.Framework.Generic.Factories.Utils.TreeTraverser`2.TraverseTree(TContext context, TState state, XNode sourceNode)
       at Microsoft.SSMA.Framework.Generic.Factories.Utils.OpTreeTraverser`2.TraverseTree(TContext context, TState state, XNode sourceNode)
       at Microsoft.SSMA.Framework.Generic.TreeConverters.Default.DefaultTreeConverter.ConvertTree(XNode sourceNode, ITreeConversionContext context)
       at Microsoft.SSMA.GUI.Generic.LowLevel.AppCommandProcessing.Commands.SsmaAppConvertCommand.StartConvert(Object context)


    • Edited by MCCZ Thursday, July 14, 2016 6:12 PM
    Thursday, July 14, 2016 6:11 PM

All replies

  • Hi MCCZ,

    Based on my research, it could be your installation of SSMA for MySQL has corrupted. Please repair your SSMA installation and make sure you also installed SSMA for MySQL extension pack see if the issue goes away.

    If you have any other questions, please let me know.

    Regards,
    Lin
    Monday, July 18, 2016 6:50 AM
  • Hi Lin,

    I have uninstalled both SSMA for MySQL and the extension pack and installed them again, but the migration still reports the same errors. I am using root credentials to both database engines.

    Monday, July 18, 2016 2:09 PM
  • I am using client side migration. Both servers are local.
    Tuesday, July 19, 2016 4:15 PM