******************** time ********************
2022-10-01 11:55:09


******************** query ********************
ALTER DATABASE [DEHGHANI] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE


******************** message ********************
The Service Broker in database "DEHGHANI" cannot be enabled because there is already an enabled Service Broker with the same ID.
ALTER DATABASE statement failed.
Nonqualified transactions are being rolled back. Estimated rollback completion: 0%.
Nonqualified transactions are being rolled back. Estimated rollback completion: 100%.


******************** StackTrace ********************
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.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, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite, String methodName)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2848
   at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 581
   at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 452
   at BaseServices.SysDataAccessLayer.Execute(IDbConnection& dbConnection, String query, Int32& errIndex, Object param, IDbTransaction dbTransaction) in D:\Tadbir\web\tadbirdemo\androidwebservice\BaseServices\Services\Implementation\SysDataAccessLayer.cs:line 2212
   at BaseServices.SysDataAccessLayer.CheckIsBrokerEnabled(WorkSpace ws) in D:\Tadbir\web\tadbirdemo\androidwebservice\BaseServices\Services\Implementation\SysDataAccessLayer.cs:line 2395


