CREATEPROCEDURE[dbo].[GetAndHoldLockActiveSubscription] @ActiveIDuniqueidentifier AS select TotalNotifications, TotalSuccesses, TotalFailures from ActiveSubscriptionswith(XLOCK) where ActiveID=@ActiveID
GO GRANTEXECUTEON[dbo].[GetAndHoldLockActiveSubscription]TO[RSExecRole] GO