Search
Closed
as Won't Fix Help for as Won't Fix

0
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 351556
Opened: 6/17/2008 10:37:22 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
This bug was noted that it has been resolved and the cause of the issue when creating an wmi alert in MSDB ( SQL Server 2005), 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 read the fix to this issue which is caused from a SQL Server having a name longer than 15 Characters. In my case this wasnt the cause of the problem.

I can successfully create the WMI alert, IF the SQL agent is running as the local system account, but if try to create the alert when the SQL agent is running on a (domain level account with local admin access to the Server) it fails with the exact same errror above.

To me it looks like there is authentication issue with WMI from the SQL agent account that is creating this issue.
Details (expand)
Product Language
English

Version

SQL Server 2005 SP2 - Enterprise Edition

Category

SQL Engine

Operating System

Win2003 Enterprise Server (SP2)
Operating System Language
US English
Steps to Reproduce
exec msdb.dbo.sp_add_alert @name= 'Respond to Deadlocks'
,@wmi_namespace = N'\\.\root\Microsoft\SQLServer\ServerEvents\MSSQLSERVER'
,@wmi_query = 'select * from DEADLOCK_GRAPH'
,@Job_name = 'DBA: Capture Dead Locks'

Run this via SSMS on a SQL Server where the SQL agent is not running as local system.
Actual Results
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.
Expected Results
Alert gets create successfully.
Platform
X64
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 7/4/2008 at 7:09 AM
SQLUKUser,

Thanks for the report. We will investigate and see if we can reproduce this issue.

-Richard Waymire
Posted by Microsoft on 7/24/2008 at 9:12 AM
SQLUKUser,

We have resolved this issue won't fix. The only thing we could do in the short term here is to change the error message, and that's not something we can do for SP3. We're already looking at how to do a better job with WMI in general for the next major release of SQL Server after SQL Server 2008.

-Richard Waymire
Posted by Sribusam on 5/12/2009 at 5:32 PM
hi, i am using sql server 2008 sp1, but still i am facing the same issue.
Posted by Sami.Marzouki on 7/20/2009 at 4:21 AM
Did you try to add sysadminrole to the sql server agent roles?