I am trying to install the Enterprise server on a newly provisioned server with SQL 2017 Web edition. The installer fails with the following error
[27/09/2018 10:53:21 AM] START: Creating database user SolidCP
[27/09/2018 10:53:21 AM] ERROR: Create db user error
System.Exception: Can't add user to database ---> System.Data.SqlClient.SqlException: The login already has an account under a different user name.
Changed database context to 'SolidCP'.
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& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at SolidCP.Setup.SqlUtils.ExecuteNonQuery(String connectionString, String commandText)
at SolidCP.Setup.SqlUtils.AddUserToDatabase(String connectionString, String databaseName, String user)
--- End of inner exception stack trace ---
at SolidCP.Setup.SqlUtils.AddUserToDatabase(String connectionString, String databaseName, String user)
at SolidCP.Setup.SqlUtils.CreateUser(String connectionString, String userName, String password, String database)
at SolidCP.Setup.Actions.CreateDatabaseUserAction.SolidCP.Setup.Actions.IInstallAction.Run(SetupVariables vars)
[27/09/2018 10:53:21 AM] ERROR: Failed to execute 'SolidCP.Setup.Actions.CreateDatabaseUserAction' type of action.
This is a brand new SQL server install with nothing more than a SQL Login (with sysadmin role) created to be used as credentials in the installer.
Ok, I got this working by specifying a different DB name to the Login I was using to create the database. It seems the installer adds a new SQL Login using the name of the database that you specify for some reason. I would have assumed it would use the login you gave it in the wizard. I'll leave this here incase anyone else gets this issue.