1、--查询是否具有Broker功能
1 select is_broker_enabled from sys.databases where [name]='DBName'
2、--打开Broker功能
--打开Broker功能
ALTER DATABASE DBNAME SET NEW_BROKER WITH ROLLBACK IMMEDIATE;
ALTER DATABASE DBNAME SET ENABLE_BROKER;
ALTER DATABASE DBNAME SET NEW_BROKER WITH ROLLBACK IMMEDIATE;
ALTER DATABASE DBNAME SET ENABLE_BROKER;
3、--建一个普通登录用户,授权给owner权限
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO NewDBUSer