Quantcast
Channel: SQL Service Broker forum
Viewing all articles
Browse latest Browse all 461

Server Event Notifications Not Working - SQL Server 2016

$
0
0

I am attempting to setup AUDIT_LOGIN and AUDIT_LOGIN_FAILED server events to capture login activity for one of my SQL Server 2016 SP1 CU8 instances, but the server event notificaitons do not seem to be firing at all.  All of the objects get created with no issues, but I am not seeing any messages go into the service broker queue when these events occur.

I have implemented this on hundreds of other servers, including some on the exact same version/patch level with no issues whatsoever.

I have ran a trace using Profiler to verify that the events are occurring and that no errors are being thrown by the service broker queue's activation procedure.  I have also renamed my activation procedure to an invalid name to see if any errors get thrown or if any messages get stuck in the service broker queue, but don't see anything.

This really smells like a bug to me, but wondering if anyone has any other ideas to troubleshoot this.  Appreciate any help on this.

Here is the script I used to create the server events and necessary service broker objects (table schemas, activation procedure, and service broker GUID redacted):

ALTER DATABASE [Audit] SET ENABLE_BROKER;

CREATE QUEUE [dbo].[NotifyQueue]
WITH STATUS = ON, RETENTION = OFF, 
ACTIVATION (STATUS = ON, PROCEDURE_NAME = [dbo].[usp_Process_Audit_Login], MAX_QUEUE_READERS = 5, EXECUTE AS N'dbo'), 
POISON_MESSAGE_HANDLING (STATUS = ON)
ON [PRIMARY];
GO

CREATE SERVICE [Notify] AUTHORIZATION [dbo] ON QUEUE [dbo].[NotifyQueue] ([http://schemas.microsoft.com/SQL/Notifications/PostEventNotification]);
GO

CREATE EVENT NOTIFICATION SendLoginNotification ON SERVER WITH FAN_IN FOR AUDIT_LOGIN, AUDIT_LOGIN_FAILED TO SERVICE 'Notify', '<service broker guid for Audit database>'
GO 

Thanks,

Ryan




Viewing all articles
Browse latest Browse all 461

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>