You can use WMI to monitor server events.This provider manages a WMI namespace for each instance of sql Server 2008. The name of the namespace is in the format
root\Microsoft\sqlServer\ServerEvents\instance name.To monitor a default instance on a remote computer — for example,DEMOPC — you can use a named
space,\\DEMOPC\root\Microsoft\sqlServer\ServerEvents\MSsqlSERVER.
To check whether the Service brokers are enabled on a sql Server instance,and to get the Service broker instance GUID in each database:
SELECT name,is_broker_enabled,service_broker_guid FROM sys.databases
To enable Service broker for a database — for example,the msdb database — use the ALTER DATABASE statement:
ALTER DATABASE msdb SET ENABLE_broKER
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。