Error upgrading to Octopus 3.12.4

I’m getting a SQL error when upgrading to 3.12.4 our current version is 3.3.16. Below is the main error.

Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0081SetMissingStepTemplateId.cs’
Upgrade failed due to an unexpected exception:
System.Data.SqlClient.SqlException (0x80131904): A trigger returned a resultset and/or was running with SET NOCOUNT OFF while another outstanding result set was active.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Octopus.Core.UpgradeScripts.Script0081SetMissingStepTemplateId.ProvideScript(Func1 dbCommandFactory) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Core\UpgradeScripts\Script0081SetMissingStepTemplateId.cs:line 24
at DbUp.Engine.LazySqlScript.get_Contents()
at DbUp.Support.SqlServer.SqlScriptExecutor.Execute(SqlScript script, IDictionary`2 variables)
at DbUp.Engine.UpgradeEngine.PerformUpgrade()
ClientConnectionId:50ca9e32-4d56-401d-a5f5-10f35baa7b30
Error Number:523,State:12,Class:16

Hi Justin,

Thanks for getting in touch! It looks like you might have some custom triggers that interfere with the migration process. If so, can you disable them during the upgrade process and see whether this solves the problem?

Please, let me know how you go.

Regards,

Pawel