Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit cf0bd86

Browse files
authored
Merge pull request #35169 from ShawnKupfer/WB1930
Light freshness - SQL - Service Broker 4
2 parents 82bb9f1 + 5fa071a commit cf0bd86

13 files changed

Lines changed: 309 additions & 336 deletions

docs/database-engine/service-broker/creating-a-remote-service-binding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ For example, the following message is a request for a remote service binding to
3535

3636
The application that's defined in the BCN queue reads a `MissingRemoteServiceBinding` message from the queue. If the application can determine the appropriate user context for the target service, the application creates a remote service binding for the service, then ends the conversation. If the application can't determine the remote service binding for the service, the application ends the conversation with an error.
3737

38-
If the application ended the conversation with an error, Service Broker stores this response for 10 minutes. Service Broker won't send a `MissingRemoteServiceBinding` message for dialogs to the BCN service during this time. If a conversation is started after 10 minutes, Service Broker will send another `MissingRemoteServiceBinding` message to check whether a remote service binding has been created.
38+
If the application ended the conversation with an error, Service Broker stores this response for 10 minutes. Service Broker doesn't send a `MissingRemoteServiceBinding` message for dialogs to the BCN service during this time. If a conversation is started after 10 minutes, Service Broker will send another `MissingRemoteServiceBinding` message to check whether a remote service binding has been created.
3939

4040
In either case, the application ends the conversation. Service Broker sends one `MissingRemoteServiceBinding` message at a time for a specific service regardless of the number of conversations to the service. Further, Service Broker uses the longest possible timeout for requests to the BCN service. Therefore, if the BCN service doesn't end the conversation, Service Broker doesn't create a new request to the service. If the BCN service didn't create a remote service binding, secure messages (`ENCRYPTION`=`ON`) remain delayed until the conversation lifetime expires. However, nonsecure messages (`ENCRYPTION`=`OFF`) will continue after the BCN service ends the conversation.
4141

docs/database-engine/service-broker/determining-the-dialog-security-type.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ The following table lists the type of dialog security for each valid combination
4343

4444
## Related content
4545

46-
- [How to: Configure Initiating Services for Anonymous Dialog Security (Transact-SQL)](how-to-configure-initiating-services-for-anonymous-dialog-security-transact-sql.md)
47-
- [How to: Configure Initiating Services for Full Dialog Security (Transact-SQL)](how-to-configure-initiating-services-for-full-dialog-security-transact-sql.md)
46+
- [How to: Configure initiating services for anonymous dialog security (Transact-SQL)](how-to-configure-initiating-services-for-anonymous-dialog-security-transact-sql.md)
47+
- [How to: Configure initiating services for full dialog security (Transact-SQL)](how-to-configure-initiating-services-for-full-dialog-security-transact-sql.md)
4848
- [How to: Configure Target Services for Anonymous Dialog Security (Transact-SQL)](how-to-configure-target-services-for-anonymous-dialog-security-transact-sql.md)
4949
- [How to: Configure Target Services for Full Dialog Security (Transact-SQL)](how-to-configure-target-services-for-full-dialog-security-transact-sql.md)
50-
- [How to: Configure Permissions for a Local Service (Transact-SQL)](how-to-configure-permissions-for-a-local-service-transact-sql.md)
50+
- [How to: Configure permissions for a local service (Transact-SQL)](how-to-configure-permissions-for-a-local-service-transact-sql.md)
5151
- [Service Broker Communication Protocols](service-broker-communication-protocols.md)

docs/database-engine/service-broker/error-handling-for-service-broker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Error handling in an application that uses Service Broker has two distinct aspec
2020

2121
| Article | Description |
2222
| --- | --- |
23-
| [Handling Transact-SQL Errors (Service Broker)](handling-transact-sql-errors.md) | Describes strategies for working with Transact-SQL errors while maintaining transactional messaging. |
23+
| [Handle Transact-SQL errors (Service Broker)](handling-transact-sql-errors.md) | Describes strategies for working with Transact-SQL errors while maintaining transactional messaging. |
2424
| [Handle Service Broker error messages](handling-service-broker-error-messages.md) | Describes strategies for handling error messages delivered by Service Broker. |
2525
| [Handle poison messages](handling-poison-messages.md) | Describes strategies for recovering from poison messages. |
2626

docs/database-engine/service-broker/handling-service-broker-error-messages.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Handling Service Broker Error Messages
2+
title: Handle Service Broker Error Messages
33
description: "Service Broker applications must handle two types of error messages received from conversations: error messages created by an application that uses Service Broker and system messages created by Service Broker."
44
author: rwestMSFT
55
ms.author: randolphwest
@@ -39,7 +39,7 @@ The `END CONVERSATION WITH ERROR` statement:
3939

4040
The part of the application that receives the `Error` message should do any needed cleanup and end its side of the conversation.
4141

42-
An application can end an active conversation with an error at any time. However, if the remote side of the conversation has already ended the conversation, Service Broker will not send the error message to the remote side. Instead, Service Broker just ends the local side of the conversation and removes all messages for the conversation from the local queue.
42+
An application can end an active conversation with an error at any time. However, if the remote side of the conversation has already ended the conversation, Service Broker doesn't send the error message to the remote side. Instead, Service Broker just ends the local side of the conversation and removes all messages for the conversation from the local queue.
4343

4444
### Application-defined error messages
4545

@@ -63,7 +63,7 @@ Application code receiving messages from Service Broker conversations must have
6363

6464
- Error messages generated by an application that uses the `WITH ERROR` clause of the `END CONVERSATION` statement. These error messages use the `https://schemas.microsoft.com/SQL/ServiceBroker/Error` message type and have a positive number in the `Code` element.
6565

66-
- Error messages generated by Service Broker. These error messages use the `https://schemas.microsoft.com/SQL/ServiceBroker/Error` message type and have a negative number in the `Code` element. Service Broker creates an `Error` message when an error makes it impossible for Service Broker to continue the conversation. For example, Service Broker can't locate the destination service because the service doesn't exist in the current instance and there's no entry for the service in the routing table. In this situation, Service Broker creates an `Error` message for the conversation.
66+
- Error messages generated by Service Broker. These error messages use the `https://schemas.microsoft.com/SQL/ServiceBroker/Error` message type and have a negative number in the **Code** element. Service Broker creates an **Error** message when an error makes it impossible for Service Broker to continue the conversation. For example, Service Broker can't locate the destination service because the service doesn't exist in the current instance and there's no entry for the service in the routing table. In this situation, Service Broker creates an `Error` message for the conversation.
6767

6868
The result set returned by the `RECEIVE` statement contains a `message_type_name` column. Code that receives Service Broker messages typically uses `message_type_name` to route each message to code that processes the associated message type.
6969

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
2-
title: Handling Transact-SQL Errors (Service Broker)
2+
title: "Handle Transact-SQL Errors (Service Broker)"
33
description: "Two general principles apply when handling Transact-SQL errors in a Service Broker application."
44
author: rwestMSFT
55
ms.author: randolphwest
66
ms.reviewer: mikeray, maghan
7-
ms.date: "03/30/2022"
7+
ms.date: 08/29/2025
88
ms.service: sql
99
ms.subservice: configuration
1010
ms.topic: conceptual
1111
---
1212

13-
# Handling Transact-SQL Errors (Service Broker)
13+
# Handle Transact-SQL errors (Service Broker)
1414

1515
[!INCLUDE [sql-asdbmi](../../includes/applies-to-version/sql-asdbmi.md)]
1616

1717
Two general principles apply when handling Transact-SQL errors in a Service Broker application.
1818

19-
First, an application should not permanently remove a message from a queue without acting upon the message. In most cases, this means that an application should always receive a message within a transaction.
19+
First, an application shouldn't permanently remove a message from a queue without acting upon the message. In most cases, this means that an application should always receive a message within a transaction.
2020

2121
Second, an application should always hold a lock on a conversation group before updating the state of the conversation group or the state of any message in the conversation group. When an application receives a message within a transaction, the application automatically locks the conversation group.
2222

23-
## See also
23+
## Related content
2424

2525
- [SAVE TRANSACTION (Transact-SQL)](../../t-sql/language-elements/save-transaction-transact-sql.md)
26-
- [Understanding Database Engine Errors](../../relational-databases/errors-events/understanding-database-engine-errors.md)
26+
- [Understanding Database Engine Errors](../../relational-databases/errors-events/understanding-database-engine-errors.md)
Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,45 @@
11
---
2-
title: "How to: Activate Service Broker Message Delivery in Databases (Transact-SQL)"
2+
title: "How To: Activate Service Broker Message Delivery in Databases (Transact-SQL)"
33
description: "By default, Service Broker message delivery is active in a database when the database is created."
44
author: rwestMSFT
55
ms.author: randolphwest
66
ms.reviewer: mikeray, maghan
7-
ms.date: "03/30/2022"
7+
ms.date: 08/29/2025
88
ms.service: sql
99
ms.subservice: configuration
1010
ms.topic: how-to
1111
---
1212

13-
# How to: Activate Service Broker Message Delivery in Databases (Transact-SQL)
13+
# How to: Activate Service Broker message delivery in databases (Transact-SQL)
1414

1515
[!INCLUDE [sql-asdbmi](../../includes/applies-to-version/sql-asdbmi.md)]
1616

17-
By default, Service Broker message delivery is active in a database when the database is created. When message delivery is not active, messages remain in the transmission queue. To determine whether Service Broker is active for a database, check the **is_broker_enabled** column of the **sys.databases** catalog view.
17+
By default, Service Broker message delivery is active in a database when the database is created. When message delivery isn't active, messages remain in the transmission queue. To determine whether Service Broker is active for a database, check the `is_broker_enabled` column of the `sys.databases` catalog view.
1818

19-
> [!NOTE]
20-
> Activating Service Broker allows messages to be delivered to the database. A Service Broker endpoint must be created to send and receive messages from outside of the instance.
19+
> [!NOTE]
20+
> Activating Service Broker allows messages to be delivered to the database. You must create a Service Broker endpoint to send and receive messages from outside of the instance.
2121
22-
## To activate Service Broker in a database
22+
## Activate Service Broker in a database
2323

24-
- Alter the database to set the ENABLE_BROKER option.
24+
- Alter the database to set the `ENABLE_BROKER` option.
2525

26-
## Example
26+
## Examples
2727

2828
```sql
29-
USE master ;
30-
GO
29+
USE master;
30+
GO
3131

32-
ALTER DATABASE AdventureWorks2008R2 SET ENABLE_BROKER ;
33-
GO
32+
ALTER DATABASE AdventureWorks2008R2
33+
SET ENABLE_BROKER;
34+
GO
3435
```
3536

3637
[!INCLUDE [SQL Server Service Broker AdventureWorks2008R2](../../includes/service-broker-adventureworks-2008-r2.md)]
3738

38-
## See also
39+
## Related content
3940

4041
- [How to: Deactivate Service Broker Message Delivery in Databases (Transact-SQL)](how-to-deactivate-service-broker-message-delivery-in-databases-transact-sql.md)
41-
- [How to: Activate Service Broker Networking (Transact-SQL)](how-to-activate-service-broker-networking-transact-sql.md)
42+
- [How to: Activate Service Broker networking (Transact-SQL)](how-to-activate-service-broker-networking-transact-sql.md)
4243
- [ALTER DATABASE (Transact-SQL)](../../t-sql/statements/alter-database-transact-sql.md)
43-
- [sys.databases (Transact-SQL)](../../relational-databases/system-catalog-views/sys-databases-transact-sql.md)[sys.transmission_queue (Transact-SQL)](../../relational-databases/system-catalog-views/sys-transmission-queue-transact-sql.md)
44+
- [sys.databases (Transact-SQL)](../../relational-databases/system-catalog-views/sys-databases-transact-sql.md)
45+
- [sys.transmission_queue (Transact-SQL)](../../relational-databases/system-catalog-views/sys-transmission-queue-transact-sql.md)
Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
11
---
2-
title: "How to: Activate Service Broker Message Forwarding (Transact-SQL)"
2+
title: "How To: Activate Service Broker Message Forwarding (Transact-SQL)"
33
description: "Message forwarding allows an instance of SQL Server to accept messages from outside the instance and send those messages to a different instance. Message forwarding is configured on a Service Broker endpoint."
44
author: rwestMSFT
55
ms.author: randolphwest
66
ms.reviewer: mikeray, maghan
7-
ms.date: "03/30/2022"
7+
ms.date: 08/29/2025
88
ms.service: sql
99
ms.subservice: configuration
1010
ms.topic: how-to
1111
---
1212

13-
# How to: Activate Service Broker Message Forwarding (Transact-SQL)
13+
# How to: Activate Service Broker message forwarding (Transact-SQL)
1414

1515
[!INCLUDE [sql-asdbmi](../../includes/applies-to-version/sql-asdbmi.md)]
1616

1717
Message forwarding allows an instance of SQL Server to accept messages from outside the instance and send those messages to a different instance. Message forwarding is configured on a Service Broker endpoint.
1818

19-
## To activate Service Broker message forwarding
19+
## Activate Service Broker message forwarding
2020

21-
1. Activate Service Broker networking if networking is not already active. For more information on Service Broker networking, see [How to: Activate Service Broker Networking (Transact-SQL)](how-to-activate-service-broker-networking-transact-sql.md).
21+
1. Activate Service Broker networking if networking isn't already active. For more information on Service Broker networking, see [How to: Activate Service Broker networking](how-to-activate-service-broker-networking-transact-sql.md).
2222

23-
2. Alter the endpoint to activate message forwarding, and specify the maximum size, in megabytes, for forwarded messages.
23+
1. Alter the endpoint to activate message forwarding, and specify the maximum size, in megabytes, for forwarded messages.
2424

25-
## Example
25+
## Examples
2626

2727
```sql
28-
USE master ;
29-
GO
30-
31-
ALTER ENDPOINT BrokerEndpoint
32-
FOR SERVICE_BROKER ( MESSAGE_FORWARDING = ENABLED,
33-
MESSAGE_FORWARD_SIZE = 10 ) ;
34-
GO
28+
USE master;
29+
GO
30+
31+
ALTER ENDPOINT BrokerEndpoint FOR SERVICE_BROKER
32+
(
33+
MESSAGE_FORWARDING = ENABLED,
34+
MESSAGE_FORWARD_SIZE = 10
35+
);
36+
GO
3537
```
3638

37-
## See also
39+
## Related content
3840

39-
- [How to: Activate Service Broker Networking (Transact-SQL)](how-to-activate-service-broker-networking-transact-sql.md)
41+
- [How to: Activate Service Broker networking (Transact-SQL)](how-to-activate-service-broker-networking-transact-sql.md)
4042
- [How to: Deactivate Service Broker Message Forwarding (Transact-SQL)](how-to-deactivate-service-broker-message-forwarding-transact-sql.md)
Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
11
---
2-
title: "How to: Activate Service Broker Networking (Transact-SQL)"
3-
description: "Service Broker does not send or receive messages over the network by default."
2+
title: "How To: Activate Service Broker Networking (Transact-SQL)"
3+
description: Learn how to activate Service Broker networking in an instance by creating an endpoint for Service Broker.
44
author: rwestMSFT
55
ms.author: randolphwest
66
ms.reviewer: mikeray, maghan
7-
ms.date: "03/30/2022"
7+
ms.date: 08/29/2025
88
ms.service: sql
99
ms.subservice: configuration
1010
ms.topic: how-to
1111
---
1212

13-
# How to: Activate Service Broker Networking (Transact-SQL)
13+
# How to: Activate Service Broker networking (Transact-SQL)
1414

1515
[!INCLUDE [sql-asdbmi](../../includes/applies-to-version/sql-asdbmi.md)]
1616

17-
Service Broker does not send or receive messages over the network by default. To activate Service Broker networking in an instance, create an endpoint for Service Broker.
17+
Service Broker doesn't send or receive messages over the network by default. To activate Service Broker networking in an instance, create an endpoint for Service Broker.
1818

19-
> [!NOTE]
20-
> Creating a Service Broker endpoint causes SQL Server to accept TCP/IP connections on the port specified. Service Broker transport security allows you to require authorization for connections to the port. If the computer that runs SQL Server has a firewall enabled, the firewall configuration on that computer must allow both incoming connections for the port specified in the endpoint. For more information on Service Broker transport security, see [Service Broker Transport Security](service-broker-transport-security.md).
19+
Creating a Service Broker endpoint causes SQL Server to accept TCP/IP connections on the port specified. Service Broker transport security allows you to require authorization for connections to the port. If the computer that runs SQL Server has a firewall enabled, the firewall configuration on that computer must allow both incoming connections for the port specified in the endpoint. For more information on Service Broker transport security, see [Service Broker Transport Security](service-broker-transport-security.md).
2120

22-
### To activate Service Broker networking
21+
## Activate Service Broker networking
2322

24-
- Create a Service Broker endpoint, specifying the port number and the authentication level.
23+
Create a Service Broker endpoint, specifying the port number and the authentication level.
2524

26-
## Example
25+
## Examples
2726

2827
```sql
29-
USE master;
30-
GO
31-
32-
CREATE ENDPOINT BrokerEndpoint
33-
STATE = STARTED
34-
AS TCP ( LISTENER_PORT = 4037 )
35-
FOR SERVICE_BROKER ( AUTHENTICATION = WINDOWS ) ;
36-
GO
28+
USE master;
29+
GO
30+
31+
CREATE ENDPOINT BrokerEndpoint
32+
STATE = STARTED
33+
AS TCP (
34+
LISTENER_PORT = 4037
35+
)
36+
FOR SERVICE_BROKER (
37+
AUTHENTICATION = WINDOWS
38+
);
39+
GO
3740
```
3841

39-
## See also
42+
## Related content
4043

41-
- [How to: Pause Service Broker Networking (Transact-SQL)](how-to-pause-service-broker-networking-transact-sql.md)
42-
- [How to: Resume Service Broker Networking (Transact-SQL)](how-to-resume-service-broker-networking-transact-sql.md)
44+
- [How to: Pause Service Broker networking (Transact-SQL)](how-to-pause-service-broker-networking-transact-sql.md)
45+
- [How to: Resume Service Broker networking (Transact-SQL)](how-to-resume-service-broker-networking-transact-sql.md)
4346
- [How to: Deactivate Service Broker Networking (Transact-SQL)](how-to-deactivate-service-broker-networking-transact-sql.md)
4447
- [ALTER DATABASE (Transact-SQL)](../../t-sql/statements/alter-database-transact-sql.md)
4548
- [CREATE ENDPOINT (Transact-SQL)](../../t-sql/statements/create-endpoint-transact-sql.md)

0 commit comments

Comments
 (0)