|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
WMI errorthe article, http://www.microsoft.com/technet/prodtechnol/sql/2005/evaluate/newsqlagent.mspx. I try running the following: USE [msdb] GO EXEC msdb.dbo.sp_add_alert @name=N'Database Created', @enabled=1, @delay_between_responses=0, @include_event_description_in=0, @wmi_namespace=N'\\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER', @wmi_query=N'SELECT * FROM CREATE_DATABASE', @job_id=N'00000000-0000-0000-0000-000000000000' GO This produces: "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." Any ideas?? Are all your drivers up to date? click for free checkup You can use wbemtest.exe to troubleshoot your query. Connect to that
namespace (\\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER) and then issue the notification query (select ...). One of the two things can go wrong when you get this error message: either the server is not the default instance, in which case you won't be able to connect, or the event name is wrong, which is not the case here. -- Show quoteHide quoteCiprian Gerea SDE, SqlServer This posting is provided "AS IS" with no warranties, and confers no rights. <micah.***@sas.com> wrote in message news:1144074535.128899.40160@v46g2000cwv.googlegroups.com... >I am trying to set up a WMI alert on SQL Server 2005 as described in > the article, > http://www.microsoft.com/technet/prodtechnol/sql/2005/evaluate/newsqlagent.mspx. > > I try running the following: > > USE [msdb] > GO > EXEC msdb.dbo.sp_add_alert @name=N'Database Created', > @enabled=1, > @delay_between_responses=0, > @include_event_description_in=0, > @wmi_namespace=N'\\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER', > > @wmi_query=N'SELECT * FROM CREATE_DATABASE', > @job_id=N'00000000-0000-0000-0000-000000000000' > GO > > This produces: > > "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." > > Any ideas?? > Thanks for the reply.
I ran wbemtest.exe and was able to connect to the name space without any problems. I am using the default instance, so that shouldn't be the problem. However, I am still getting this error. Could it be some sort of permissions issue? Yes, one of the reasons for which this fails is lack of permissions. You can
verify this by running wbemtest under the credentials of the agent account, and see if you can get through. -- Show quoteHide quoteCiprian Gerea SDE, SqlServer This posting is provided "AS IS" with no warranties, and confers no rights. "Micah" <micah.***@sas.com> wrote in message news:1144168292.134865.280120@z34g2000cwc.googlegroups.com... > Thanks for the reply. > > I ran wbemtest.exe and was able to connect to the name space without > any problems. I am using the default instance, so that shouldn't be > the problem. However, I am still getting this error. > > Could it be some sort of permissions issue? >
Indexed view
Passing a result set to a stored procedure help on Indexes Design Question - Suggestions Please Retrieving rows with minimum values within a column Help is not working NEED HELP IN MS SQL SERVER 2005!!! Lock requests/sec very high.... Calculate The Time To Run SP IF funcionality in SQL server views |
|||||||||||||||||||||||