March 9, 2009 at 5:06 am
Hi All,
I am seting up for the first time the alert (for notification is mirroring state changes). I am using the SQL Server Agent (2005).
I choose default namespace \\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER. I checked that MSSQLSERVER is the name of my server instance.
In the query I wrote
select * from DATABASE_MIRRORING_STATE_CHANGE
Unfortunatelly I receive error that says:
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
Could you help me how should I solve this problem?
March 9, 2009 at 5:53 am
Did you GOOGLE the error or "database_mirroring_state_change" yet? I see lots of articles on this issue just by googling the later.
Try this to see if one of those articles helps you out. If they don't, add a reply to this thread to let us know.
Here's one example of a thread that might assist: http://www.winserverkb.com/Uwe/Forum.aspx/mom/8730/WMI-rule-failed
March 10, 2009 at 2:46 am
Hi
At the beginning I would like to say that it is not that I did not google before I wrote the post 🙂 I did only with different sentence. I must say that your suggestion was much better, I found the answere after few minutes 😀
So, the mirrored databases and the msdb database must have service broker enabled. This can be checked with this query
SELECT name, is_broker_enabled
FROM sys.databases
If the service broker value is not set to 1 you can turn this on by issuing this command for each database.
ALTER DATABASE msdb SET ENABLE_BROKER
If SQL Server Agent is running this command will not complete, so you will need to stop SQL Server Agent, run the above command and then start SQL Server Agent again.
Lastly, if SQL Server Agent is not running you will need to start it.
The source is: http://www.mssqltips.com/tip.asp?tip=1564
Thank you! 😛
March 10, 2009 at 4:40 am
I can't count the number of times that a wrong phrase in Google had me chasing ghosts. @=)
Glad I could help. And thank you for posting your resolution. That should help others.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply