WMI Alert

  • I try to setup WMI alert for BROKER_QUEUE_DISABLED

    and I use following WSQL - SELECT * FROM BROKER_QUEUE_DISABLED

    but receive error:@wmi query cannot be executed in @wmi namespace

    provided.

    Could someone help me ?

    what namespace to use , my currentnamespace is \\.\root\Microsoft

    \SqlServer\ServerEvents\MSSQLSERVER

  • Maybe you can do this from within SQL2005 using events :

    I hope this gets you on track ...

    CREATE QUEUE PoisonQueue

    GO

    CREATE SERVICE PoisonService

    ON QUEUE PoisonQueue ([http://schemas.microsoft.com/SQL/Notifications/PostEventNotification])

    GO

    -- set up event notification to catch queue deactivation based

    -- on unhandled poison messages !

    -- ON DATABASE and ON SERVER do not work for this

    CREATE EVENT NOTIFICATION DeactivateEvent

    ON QUEUE [//wonderland.world/Broker/TravelOffice]

    FOR BROKER_QUEUE_DISABLED

    TO SERVICE 'PoisonService', 'current database'

    GO

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Yes there is no problem to setup Event Notification for BROKER_QUEUE_DISABLED

    but i want to set up Alert and Response Job , instead of EventNotification and Activation Procedure

  • Did you have a look at the samples ?

    Samples\Engine\ServiceBroker\EventLogging\Scripts

    IMO if you just add an sp_start_job to the queues procedure, It'll do what you want to.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • I want WMI alert not an activation procedure , becasue if Queue is disabled Activation procedure is not started, and i want to catch cases when Queue is disabled.

    I think New Queue to catch casese when other Queue is disabled is not an good idea , because in this case i should make third queue to catch disabling on second queue etc...

    Ivan

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply