Hi everyone,
We’ve just released NServiceBus.Transport.SqlServer 8.1.5 and 7.0.7.
Fixed bugs
- #1196 SQL Server transport requires SELECT permission when sending to remote queues
How to know if you are affected
You are affected if:
-
You are running endpoints with the
7.x
+ version of the SQL Server transport -
Those endpoints do not have
SELECT
permissions on the remote queue tables
Symptoms
Endpoints sending messages to remote queues, where the remote queues do not have SELECT
permissions on their tables, fail with an exception similar to:
System.Exception: Failed to send message to [TargetEndpointDB].[TargetEndpointSchema].[TargetEndpointQueue]
---> System.Data.SqlClient.SqlException (0x80131904): The SELECT permission was denied on the object 'TargetEndpointQueue', database 'TargetEndpointDB', schema 'TargetEndpointSchema'.
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.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader()
at System.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, String endMethod)
at System.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult)
at System.Data.SqlClient.SqlCommand.EndExecuteReader(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 NServiceBus.Transport.SqlServer.TableBasedQueue.GetSendCommandText(SqlConnection connection, SqlTransaction transaction, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.SqlServer/Queuing/TableBasedQueue.cs:line 151
at NServiceBus.Transport.SqlServer.TableBasedQueue.SendRawMessage(MessageRow message, SqlConnection connection, SqlTransaction transaction, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.SqlServer/Queuing/TableBasedQueue.cs:line 104
ClientConnectionId:713f1bf3-e5ad-43e3-ad85-4200f878f5dc
Error Number:229,State:5,Class:14
--- End of inner exception stack trace ---
at NServiceBus.Transport.SqlServer.TableBasedQueue.ThrowFailedToSendException(Exception ex) in /_/src/NServiceBus.Transport.SqlServer/Queuing/TableBasedQueue.cs:line 180
at NServiceBus.Transport.SqlServer.TableBasedQueue.SendRawMessage(MessageRow message, SqlConnection connection, SqlTransaction transaction, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.SqlServer/Queuing/TableBasedQueue.cs:line 126
at NServiceBus.Transport.SqlServer.MessageDispatcher.Dispatch(IEnumerable`1 operations, SqlConnection connection, SqlTransaction transaction, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.SqlServer/Sending/MessageDispatcher.cs:line 147
at NServiceBus.Transport.SqlServer.MessageDispatcher.DispatchIsolated(SortingResult sortedOperations, TransportTransaction transportTransaction, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.SqlServer/Sending/MessageDispatcher.cs:line 82
at NServiceBus.Transport.SqlServer.MessageDispatcher.Dispatch(TransportOperations operations, TransportTransaction transportTransaction, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.SqlServer/Sending/MessageDispatcher.cs:line 35
at NServiceBus.TransportReceiveToPhysicalMessageConnector.Invoke(ITransportReceiveContext context, Func`2 next) in /_/src/NServiceBus.Core/Pipeline/Incoming/TransportReceiveToPhysicalMessageConnector.cs:line 63
at NServiceBus.RetryAcknowledgementBehavior.Invoke(ITransportReceiveContext context, Func`2 next) in /_/src/NServiceBus.Core/ServicePlatform/Retries/RetryAcknowledgementBehavior.cs:line 25
at NServiceBus.MainPipelineExecutor.Invoke(MessageContext messageContext, CancellationToken cancellationToken) in /_/src/NServiceBus.Core/Pipeline/MainPipelineExecutor.cs:line 45
at NServiceBus.MainPipelineExecutor.Invoke(MessageContext messageContext, CancellationToken cancellationToken) in /_/src/NServiceBus.Core/Pipeline/MainPipelineExecutor.cs:line 64
at NServiceBus.Transport.SqlServer.ProcessStrategy.TryHandleMessage(Message message, TransportTransaction transportTransaction, ContextBag context, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.SqlServer/Receiving/ProcessStrategy.cs:line 49
at NServiceBus.Transport.SqlServer.ProcessWithNativeTransaction.TryProcess(Message message, TransportTransaction transportTransaction, ContextBag context, CancellationToken cancellationToken) in /_/src/NServiceBus.Transport.SqlServer/Receiving/ProcessWithNativeTransaction.cs:line 112
Exception details:
Message ID: 3cd75a97-8441-4e9b-8e90-afce00f12919
Transport message ID: 50213f42-1e8c-4665-ad8e-a0e9667104a3
Pipeline canceled: False
When to upgrade
You should upgrade immediately if you are affected. Otherwise, you should upgrade during your next maintenance window.
Where to get it
You can install the new versions of NServiceBus.Transport.SqlServer from NuGet.
Please read our release policy for more details.
With thanks,
The team in Particular