How can we help you today? How can we help you today?
LouisSomers
Maybe it will help if I provide a larger portion of the log, there's also a stack trace in there... The first part is successful, it runs SQLCompare.exe without any issue, the problems only start after it deletes the user it is logged in with. This is a domain user by the way. VERBOSE: C:\**TeamCityPath**\BuildAgent\plugins\sqlchangeautomation-teamcity-agent\Modules\SqlChangeAutomation\4.3.21056.24410\SC\SQLCompare.exe ended with exit code 79 VERBOSE: SQLCompare.exe completed successfully. VERBOSE: Altering schemas VERBOSE: Dropping users WARNING: The error 'The server principal "**DOMAIN**\**USERNAME**" is not able to access the database "**DBNAME**" under the current security context.' occurred when executing the following SQL: @ERROR <> 0 SET NOEXEC ON WARNING: The error 'The server principal "**DOMAIN**\**USERNAME**" is not able to access the database "**DBNAME**" under the current security context.' occurred when executing the following SQL: DROP USER [**DOMAIN**\**other_user**] WARNING: The error 'The server principal "**DOMAIN**\**USERNAME**" is not able to access the database "**DBNAME**" under the current security context.' occurred when executing the following SQL: @ERROR <> 0 SET NOEXEC ON WARNING: The error 'The server principal "**DOMAIN**\**USERNAME**" is not able to access the database "**DBNAME**" under the current security context.' occurred when executing the following SQL: DECLARE @Success AS BIT SET @Success = 1 SET NOEXEC OFF IF (@Success = 1) PRINT 'The database update succeeded' ELSE BEGIN @TRANCOUNT > 0 ROLLBACK TRANSACTION  PRINT 'The database update failed' END Invoke-DatabaseBuild : Failed to clean the database '**DBNAME**' on server '**DBSERVER**'. Error: 4 batches failed. The first error is 'The server principal "**DOMAIN**\**USERNAME**" is not able to access the database "**DBNAME**" under the current security context.' Stack Trace:    at RedGate.Versioning.Automation.Compare.SqlProcessing.SqlExecutor.ExecuteBatches(IHaveConnectionString connectionString, IReadOnlyCollection`1 sqlBatches, Int32 commandTimeout, Action`1 logAction)    at RedGate.Versioning.Automation.Compare.Compare.SchemaUpdater.Clean(ExistingDatabase database, CompareOptionArguments compareOptionArguments) Local parameters [connectionString = Data Source=**DBSERVER**;Initial Catalog=**DBNAME**;Integrated Security=True;Pooling=False;Trust Server Certificate=True;Application Name="SQL Change Automation"] At C:\**TeamCityPath**\BuildAgent\plugins\sqlchangeautomation-teamcity-agent\SqlCi.ps1:193 char:39 / comments
Maybe it will help if I provide a larger portion of the log, there's also a stack trace in there...The first part is successful, it runs SQLCompare.exe without any issue, the problems only start af...
0 votes