I'm running the command below for multiple databases on the same server. It worked for more than 100 databases.
I don't understand why it works for all except for this one.
I'm not sure neither what is this database created automatically.
2024-09-27 16:32:15.771 +02:00 [Information] Taking database "SqlCloneTemp_cekvf232" offline
2024-09-27 16:32:16.248 +02:00 [Information] Detaching database "SqlCloneTemp_cekvf232"
2024-09-27 16:32:16.250 +02:00 [Warning] Failed to detach database "SqlCloneTemp_cekvf232", falling back to hard detach
Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot drop the database 'SqlCloneTemp_cekvf232' because it is being used for replication.
at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at Microsoft.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod)
at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)
at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
at Dapper.SqlMapper.ExecuteImplAsync(IDbConnection cnn, CommandDefinition command, Object param) in /_/Dapper/SqlMapper.Async.cs:line 670
at RedGate.SqlClone.Agent.Core.Sql.SqlDatabaseAttachmentDropper.Drop(CancellationToken ct)
ClientConnectionId:6df2bba1-36bb-4465-a5b1-e9542685e35d
Error Number:3724,State:1,Class:16
I'm running the command below for multiple databases on the same server. It worked for more than 100 databases.
I don't understand why it works for all except for this one.
I'm not sure neither what is this database created automatically.