v2.2 Install Failure
Prior version was the 0.9 Beta.
Install is to clean up the now unusable 0.9 artifacts to start with.
Log file content follows:
2017-08-07 16:52:22.212 -07:00 [Information] SQL Clone server version 2.2.0.7634
2017-08-07 16:52:22.258 -07:00 [Information] Running as XXX\yyy on XXX
2017-08-07 16:52:22.833 -07:00 [Information] Found client endpoint at net.tcp://127.0.0.1:22222/activationplugin/
2017-08-07 16:52:22.855 -07:00 [Information] Starting "Server Software Update Monitor"
2017-08-07 16:52:22.860 -07:00 [Information] Started "Server Software Update Monitor"
2017-08-07 16:52:22.863 -07:00 [Information] Starting "Server License Status Monitor"
2017-08-07 16:52:22.863 -07:00 [Information] Started "Server License Status Monitor"
2017-08-07 16:52:23.802 -07:00 [Warning] Encountered an error and will retry in 00:00:02
System.Data.SqlClient.SqlException (0x80131904): The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Operations_Agents_AgentId". The conflict occurred in database "SQLClone_Config", table "dbo.Agents", column 'Id'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, String executeMethod, IReadOnlyDictionary`2 parameterValues, Boolean closeConnection)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at RedGate.SqlClone.DataAccess.SqlServer.SqlCloneContextProvider.MigrateDatabase()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RedGate.SqlClone.Common.ActionRunner.<RetryAndBackoff>d__4`1.MoveNext()
ClientConnectionId:0e0f8052-a786-476b-91d7-fa050f3e10a2
Error Number:547,State:0,Class:16
2017-08-07 16:52:24.250 -07:00 [Information] Redgate Client capability version: 2
2017-08-07 16:52:24.250 -07:00 [Information] Redgate Client capability version: 2
2017-08-07 16:52:24.483 -07:00 [Information] Preparing to perform check for updates
Install is to clean up the now unusable 0.9 artifacts to start with.
Log file content follows:
2017-08-07 16:52:22.212 -07:00 [Information] SQL Clone server version 2.2.0.7634
2017-08-07 16:52:22.258 -07:00 [Information] Running as XXX\yyy on XXX
2017-08-07 16:52:22.833 -07:00 [Information] Found client endpoint at net.tcp://127.0.0.1:22222/activationplugin/
2017-08-07 16:52:22.855 -07:00 [Information] Starting "Server Software Update Monitor"
2017-08-07 16:52:22.860 -07:00 [Information] Started "Server Software Update Monitor"
2017-08-07 16:52:22.863 -07:00 [Information] Starting "Server License Status Monitor"
2017-08-07 16:52:22.863 -07:00 [Information] Started "Server License Status Monitor"
2017-08-07 16:52:23.802 -07:00 [Warning] Encountered an error and will retry in 00:00:02
System.Data.SqlClient.SqlException (0x80131904): The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Operations_Agents_AgentId". The conflict occurred in database "SQLClone_Config", table "dbo.Agents", column 'Id'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, String executeMethod, IReadOnlyDictionary`2 parameterValues, Boolean closeConnection)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at RedGate.SqlClone.DataAccess.SqlServer.SqlCloneContextProvider.MigrateDatabase()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RedGate.SqlClone.Common.ActionRunner.<RetryAndBackoff>d__4`1.MoveNext()
ClientConnectionId:0e0f8052-a786-476b-91d7-fa050f3e10a2
Error Number:547,State:0,Class:16
2017-08-07 16:52:24.250 -07:00 [Information] Redgate Client capability version: 2
2017-08-07 16:52:24.250 -07:00 [Information] Redgate Client capability version: 2
2017-08-07 16:52:24.483 -07:00 [Information] Preparing to perform check for updates
Jesus Christ: Lunatic, liar or Lord?
Decide wisely...
Decide wisely...
Tagged:
Comments
The foreign key we've introduced essentially says 'if an operation is associated with an agent, that agent must actually have existed at some point'. So, when Clone tries to perform the migration and apply that new constraint, it fails.
The best bet is to run some SQL updates on the data so that there's no such inconsistency and the migration can go ahead - if you get in touch with support@red-gate.com about this, we can help devise a path forward.
Redgate Software