WMI CREATE QUEUE permission denied

  • I'm attempting to setup a WMI based mirroring alert, but I get an error when I attempt to set it up. I'm all googled out and am hoping someone's seen this issue before. I've run this same alert configuration code on other machines without issue:

    USE [msdb]

    GO

    EXEC msdb.dbo.sp_add_alert @name=N'Mirroring State: Synchronized Principal without Witness',

    @enabled=1,

    @delay_between_responses=0,

    @include_event_description_in=1,

    @wmi_namespace=N'\\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER',

    @wmi_query=N'SELECT * from DATABASE_MIRRORING_STATE_CHANGE WHERE State = 2'

    GO

    The initial error I get back in SSMS is

    Msg 22022, Level 16, State 1, Line 0

    SQLServerAgent Error: WMI error: 0x80041003.

    Msg 14511, Level 16, State 1, Procedure sp_verify_alert, Line 300

    The @wmi_query could not be executed in the @wmi_namespace provided. Verify that an event class selected in the query exists in the namespace and that the query has the correct syntax.

    I found additional error info in the logs:

    DESCRIPTION:The @wmi_query could not be executed in the @wmi_namespace provided. Verify that an event class selected in the query exists in the namespace and that the query has the correct syntax.

    Error: 262, Severity: 14, State: 18.

    DESCRIPTION:CREATE QUEUE permission denied in database 'msdb'.

    I've verified the sqlagent service is a local administrator with SQL sysadmin rights.

    I'm stumped...

  • Hello @Jon,

    It's been a while! 🙂

    Were you able to find what was the issue in your case? I have the same scenario and I'm stuck...

Viewing 2 posts - 1 through 1 (of 1 total)

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