M
Med Bouchenafa
Guest
Did somebody ever manage to setup a WMI event alert through SQL Server Agent?
I could not find any example that works.
Can you please, try this and see if it works for you
USE [msdb]
GO
EXEC msdb.dbo.sp_add_alert
@name =N'Test',
@enabled =1,
@delay_between_responses =0,
@include_event_description_in =0,
@wmi_namespace =N'\\.\ROOT\CIMV2',
@wmi_query =N'Select from Win32_LogicalDisk Where FreeSpace < 1000'
GO
What I want to achieve is very simple.
Set up an alert that raises when disk space goes below a threshold.
Whatever method I used (GUI or sp_add_Alert), I always got the same error message
Msg 22022, Level 16, State 1, Line 0
SQLServerAgent Error: WMI error: 0x80041059.
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'm aware of this KB article http://support.microsoft.com/kb/944517
My machine name is less 15 characters
and I'm running SQL Server 2005 - 9.00.3152.00
Any help is more than appreciated
Thanks
Med
I could not find any example that works.
Can you please, try this and see if it works for you
USE [msdb]
GO
EXEC msdb.dbo.sp_add_alert
@name =N'Test',
@enabled =1,
@delay_between_responses =0,
@include_event_description_in =0,
@wmi_namespace =N'\\.\ROOT\CIMV2',
@wmi_query =N'Select from Win32_LogicalDisk Where FreeSpace < 1000'
GO
What I want to achieve is very simple.
Set up an alert that raises when disk space goes below a threshold.
Whatever method I used (GUI or sp_add_Alert), I always got the same error message
Msg 22022, Level 16, State 1, Line 0
SQLServerAgent Error: WMI error: 0x80041059.
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'm aware of this KB article http://support.microsoft.com/kb/944517
My machine name is less 15 characters
and I'm running SQL Server 2005 - 9.00.3152.00
Any help is more than appreciated
Thanks
Med