SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Service Broker, Detecting Disabled Queues


Service Broker, Detecting Disabled Queues

Author
Message
Jerry Beech
Jerry Beech
SSC Rookie
SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)

Group: General Forum Members
Points: 37 Visits: 290
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?
RBarryYoung
RBarryYoung
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24148 Visits: 9518
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."
RBarryYoung
RBarryYoung
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24148 Visits: 9518
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."
bhaktapur
bhaktapur
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 298
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search