Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Service Broker, Detecting Disabled Queues Expand / Collapse
Author
Message
Posted Tuesday, September 9, 2008 6:57 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 10:37 AM
Points: 32, Visits: 125
Below is the code I am using just to try and get the notification into the queue (After that My plan was to send an email to myself with an alert of some sort.)


--Create a queue to receive messages.
CREATE QUEUE pmNotifyQueue ;
GO
--Create a service on the queue that references
--the event notifications contract.
CREATE SERVICE pmNotifyService
ON QUEUE pmNotifyQueue
([http://schemas.microsoft.com/SQL/Notifications/PostEventNotification],
);
GO
--Create the event notification.
CREATE EVENT NOTIFICATION pmQueueDisabled
ON DATABASE
FOR BROKER_QUEUE_DISABLED
TO SERVICE 'pmNotifyService', 'current database';

The error I get is :
Msg 1098, Level 15, State 1, Line 2
The specified event type(s) is/are not valid on the specified target object.

This error is from the CREATE EVENT NOTIFICATION step.
I can;t figure it out - Any Suggestions?
Post #566128
Posted Monday, October 27, 2008 9:42 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,294, Visits: 9,480
Sorry, I didn't see this before....

Is the comma in CREATE SERVICE a mistake or is there supposed to be another contract? (I am getting a syntax error there).


-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #592207
Posted Monday, October 27, 2008 4:08 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,294, Visits: 9,480
Apparently, Service Broker event notifications can only be scoped to a specific Queue. So change your CREATE Event Notification as follows:
CREATE EVENT NOTIFICATION pmQueueDisabled 
ON QUEUE pmNotifyQueue
FOR BROKER_QUEUE_DISABLED
TO SERVICE 'pmNotifyService', 'current database';



-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #592508
Posted Thursday, March 31, 2011 8:32 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 20, 2012 3:04 PM
Points: 7, Visits: 283
Using event notification for logon auditing, I am getting multiple records for the same event. Is there a way to limit to a single record per event. For event type AUDIT_LOGON_FAILED, a single record is returned for an event, however, for AUDIT_LOGON, multiple records are returned per event.

Please help avoiding retrieving multiple records for a single logon event. Or what other alternative exists for capturing failed login attempts. I am trying to automate the process and reporting.

Any help will be appreciated.
Post #1086889
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse