Hi,
I am not able to deploy the solution on my server.
It stops after
Error: Beginning transaction
Error: Checking whether journal table exists…
Error: Journal table does not exist
Error: Executing TSQL Database Server script ‘Octopus.Core.UpgradeScripts.Script0000 - Fix wrong schema.sql’
Error: Checking whether journal table exists…
Error: Creating the [dbo].[SchemaVersions] table
Error: The [dbo].[SchemaVersions] table has been created
Error: Executing TSQL Database Server script ‘Octopus.Core.UpgradeScripts.Script0001 - Initial schema.sql’
Error: SQLException has occured in statement #0 of this TSQL script: ‘Octopus.Core.UpgradeScripts.Script0001 - Initial schema.sql’; Line: 94; Procedure: ; Error Number: 2714; Excerpt: ‘CREATE TABLE [dbo].[Event] (’; Message: There is already an object named ‘Event’ in the database.
Error: Error occured when executing scripts, transaction will be rolled back
Error: Upgrade failed due to an unexpected exception:
Error: System.Data.SqlClient.SqlException (0x80131904): There is already an object named ‘Event’ in the database.
Error: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) Error: at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) Error: at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) Error: at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() Error: at System.Data.SqlClient.SqlDataReader.get_MetaData() Error: at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) Error: 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) Error: at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
Error: at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
Error: at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
Error: at DbUp.Support.ScriptExecutor.ExecuteAndLogOutput(IDbCommand command)
Error: at Octopus.Core.Initialization.DatabaseUpgrader.OctopusUpgradeScriptExecutor.<>c__DisplayClass7_0.b__0(Func1 commandFactory) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Core\Initialization\DatabaseUpgrader.cs:line 360 Error: at DbUp.Engine.Transactions.SingleTrasactionStrategy.Execute(Action
1 action)
Error: at Octopus.Core.Initialization.DatabaseUpgrader.OctopusUpgradeScriptExecutor.Execute(SqlScript script, IDictionary`2 variables) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Core\Initialization\DatabaseUpgrader.cs:line 291
Error: at DbUp.Engine.UpgradeEngine.PerformUpgrade()
Error: ClientConnectionId:89d193de-b998-41ea-8c05-fb735e941a35
Error: Error Number:2714,State:6,Class:16
Error:
Error: -----------------------------------------
Error: You have two options from this point:
Error: OPTION 1: Re-run the installer for the version of Octopus Server you were using just before trying this upgrade. Your data hasn’t been changed and everything will go back to how it was beforehand. Please send this log to support@octopus.com and we will work with you to get you upgraded.
Error: OPTION 2: If you know what the problem is and how to fix it, please fix the problem and then try the upgrade again by running C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe database --upgrade
Error:
Error: The previous command returned a non-zero exit code of: 1
Error: The command that failed was: “C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe” database --instance “OctopusServer” --connectionString “Data Source=BTS2016VM;Initial Catalog=ReportServer;Integrated Security=True” --create --grant “NT AUTHORITY\SYSTEM”
Could not open the database. This instance was not removed from the database.
Deleted instance: OctopusServer