April 10, 2007 at 3:26 pm
Hi,
SP1 here.
Trying to create a WMI alert:
Namespace: \\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER (the default)
My query: SELECT * FROM DATABASE_MIRRORING_STATE_CHANGE
Causes:
Cannot create new alert. (SqlManagerUI)
------------------------------
ADDITIONAL INFORMATION:
Create failed for Alert 'test'. (Microsoft.SqlServer.Smo)
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
SQLServerAgent Error: WMI error: 0x80041010.
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. (Microsoft SQL Server, Error: 22022)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.2153&EvtSrc=MSSQLServer&EvtID=22022&LinkId=20476
The only similar error I've found on the web:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=342946&SiteID=1
And we haven't moved our msdb around to my knowledge.
thanks
sam
April 11, 2007 at 12:46 pm
sam,
I am using exactly that syntax with no problems.
Since the error complained that the event does not exist in that namespace, you might want to try another valid WMI query.
Try "Select * from deadlock_graph" to see if the Alert creates.
HTH
Elliott
April 11, 2007 at 2:09 pm
Thanks for your reply Elliot. I tried some others, but no luck. I also used the microsoft wmi tools and the wmi object explorer to see if the values were actually there. I could see values for object/properties in the root\CIMV2 namspace and properties about the sql namespace, such as server name and path, but when trying to look at specific objects, such as I kept getting errors "The selected class does not have instances".
First I add the namespace and then browse it - I don't see the classes unless I change the dialog box to show 'all classes' instead of 'show classes that can have instances'. So it seems that the sql wmi classes CANNOT have instances in my case.
April 11, 2007 at 8:12 pm
I was having the exact same problem, if you do resolve the issue please share!
May 10, 2007 at 10:16 am
I installed two SQL2k5 SE (standard edition) named instances and a SQL Express with Adv Services instance on a server (to test WMI event alerting for DB Mirroring). The 2 SQL2k5 SE instances were called MSSQLSERVER$P1 and MSSQLSERVER$P2 and the Express one was called SQLEXPRESS.
The only nameSpace visible was the SQLEXPRESS one. So I then installed another 2k5 SE instance called P3 ... hey presto it was visible ..... SO in my case this seems as if the "$" in my instance name may well have caused the issue?
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply