Forum / Remote Desktop Manager - Support

import data source problem with mariadb after latest update

  • Create an Issue
  • Cancel

Hi all,

I've been doing some tests importing data from a MS SQL to a MariaDB server over the last few weeks which worked fine on all attempts including after I setup database replication between 2 mariadb servers. Today I updated RDM to 2019.1.34.0 and tried the import again to get the latest version of my entries on this setup before we migrate to it and I started having always the same error while doing the import.


MySql.Data.MySqlClient.MySqlException (0x80004005): Cannot add or update a child row: a foreign key constraint fails (`rdmproduction`.`Connections`, CONSTRAINT `FK_Connections_GroupInfo` FOREIGN KEY (`SecurityGroup`) REFERENCES `GroupInfo` (`ID`))
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.ExecuteNonQuery(String sql, IDbTransaction dbTransaction, IDbDataParameter[] parameters, Int32 commandTimeout)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.InsertConnection(Connection connection, IDbTransaction dbTransaction, ISecurityProvider provider, Nullable`1 repositoryID)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.SaveConnections(IEnumerable`1 connections, IDbTransaction dbTransaction, ISecurityProvider provider, Nullable`1 repositoryID)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.SaveConnection(Connection connection)


I've deleted all entries from my mariadb just to see if it would make any different to start importing the entries from scratch without overwriting them and it didn't make any difference. My guess is that perhaps there is one single entry that could be causing this, but just since the update? I'm trying to find any commonality here.

Clock5 mths

tested with 2019.1.30.0, same issue.

data import always fails at random, when I try again to import and skip all existing entries, sometimes fails at 3%, sometimes at 50%, so that is not regarding a specific entry on RDM that somehow could be causing this so far I can see.

Clock5 mths


Hello,

Are you using the legacy Security Groups in the MS SQL data source?

It seems that the MariaDB data source cannot import the entries that are configured with Security Groups in the SQL data source.

Best regards,



Érica Poirier

signaturesignature

Clock5 mths

Hi Erica,

I have security groups on my source MS SQL but they are not in use anymore, and exported the entries with included credentials. I already only use roles on my source MS SQL and destination MariaDB.

I've decided to export the entries again without credentials and it imported fine, then I exported then again with credentials just to see and it worked fine. I'm not sure what could have happened with my first export, but the only reason I can think is that for some reason the exported entries file that was "corrupt" as I tested with several different versions of mariaDB and also debian just to rule out it was an update.

I guess lesson of the day for me was to export the entries again next time I have a weird issue like that. Apologies about the waste of time.

Clock5 mths


Hello,

Thank you for your feedback and glad that you have found the main reason of this error.

Best regards,



Érica Poirier

signaturesignature

Clock5 mths