--------------------------------------------------
USE master;
GO
IF EXISTS (SELECT * FROM master.sys.endpoints
WHERE name = N'InstTargetEndpoint')
DROP ENDPOINT InstTargetEndpoint;
GO
CREATE ENDPOINT InstTargetEndpoint
STATE = STARTED
--AS TCP ( LISTENER_PORT = 4022 )
AS TCP ( LISTENER_PORT = 1433 )
FOR SERVICE_BROKER (AUTHENTICATION = WINDOWS );
GO
--------------------------------------------------
--注意:landa_0925 为数据库名称,使用时需要修改为自己的数据库名称
alter database landa_0925 set new_broker with rollback immediate
alter database landa_0925 set enable_broker
--验证 执行下面SQL语句 1代表 true 0 代表 false
select IS_BROKER_ENABLED,name from master.sys.databases
where name='landa_0925'
启用 SQL Server 2008 R2 Service Broker
最新推荐文章于 2020-01-06 15:16:36 发布