Skip to content

Commit 6222e13

Browse files
gitNamerwestMSFT
authored andcommitted
Light freshness - SQL - Service Broker 6
1 parent 77b117c commit 6222e13

31 files changed

Lines changed: 969 additions & 1050 deletions

docs/database-engine/service-broker/completing-a-conversation-in-a-single-database.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ This tutorial is divided into three lessons:
4646

4747
| Lesson | Description |
4848
| --- | --- |
49-
| [Lesson 1: Creating the Conversation Objects](lesson-1-creating-the-conversation-objects.md) | In this lesson, you create the message types, contract, services, and queues that are required to support a basic Service Broker conversation. |
50-
| [Lesson 2: Beginning a Conversation and Transmitting Messages](lesson-2-beginning-a-conversation-and-transmitting-messages.md) | In this lesson, you complete a basic conversation by starting the conversation and transmitting a request message from the initiator to the target. You'll then transmit a reply message back to the initiator and end the conversation. |
51-
| [Lesson 3: Dropping the Conversation Objects](lesson-3-dropping-the-conversation-objects.md) | In this lesson, you drop the objects that were created to support the conversation. |
49+
| [Lesson 1: Create the conversation objects](lesson-1-creating-the-conversation-objects.md) | In this lesson, you create the message types, contract, services, and queues that are required to support a basic Service Broker conversation. |
50+
| [Lesson 2: Begin a conversation and transmit messages](lesson-2-beginning-a-conversation-and-transmitting-messages.md) | In this lesson, you complete a basic conversation by starting the conversation and transmitting a request message from the initiator to the target. You then transmit a reply message back to the initiator and end the conversation. |
51+
| Lesson 3: Drop the conversation objects](lesson-3-dropping-the-conversation-objects.md) | In this lesson, you drop the objects that were created to support the conversation. |
5252

5353
## Requirements
5454

docs/database-engine/service-broker/how-to-deactivate-service-broker-message-delivery-in-databases-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.topic: how-to
1414

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

17-
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.
17+
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

1919
> [!NOTE]
2020
> Deactivating Service Broker prevents messages from being sent from or delivered to the database. However, this doesn't prevent messages from arriving in the instance. To prevent messages from arriving in the instance, you must remove or stop the Service Broker endpoint.

docs/database-engine/service-broker/implementing-internal-activation.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Implementing Internal Activation
2+
title: Implement Internal Activation
33
description: "This tutorial is intended for users who are new to Service Broker, but are familiar with database concepts and Transact-SQL statements."
44
author: rwestMSFT
55
ms.author: randolphwest
66
ms.reviewer: mikeray, maghan
7-
ms.date: 03/07/2025
7+
ms.date: 09/03/2025
88
ms.service: sql
99
ms.subservice: configuration
1010
ms.topic: how-to
@@ -65,16 +65,16 @@ To complete this tutorial, you should be familiar with the Transact-SQL language
6565

6666
Your system must have the following installed:
6767

68-
- Any supported edition of SQL Server.
68+
- Any supported edition of SQL Server
6969

70-
- [SQL Server Management Studio](/ssms/).
70+
- [SQL Server Management Studio](/ssms/)
7171

72-
- A supported internet browser.
72+
- A supported internet browser
7373

74-
- The [!INCLUDE [sssampledbobject-md](../../includes/sssampledbobject-md.md)] sample database, which you can download from the [Microsoft SQL Server Samples and Community Projects](https://go.microsoft.com/fwlink/?LinkID=85384) home page.
74+
- The [!INCLUDE [sssampledbobject-md](../../includes/sssampledbobject-md.md)] sample database, which you can download from the [Microsoft SQL Server Samples and Community Projects](https://go.microsoft.com/fwlink/?LinkID=85384) home page
7575

7676
## Related content
7777

78-
- [Completing a Conversation in a Single Database](completing-a-conversation-in-a-single-database.md)
79-
- [Completing a Conversation Between Databases](completing-a-conversation-between-databases.md)
80-
- [Completing a Conversation Between Instances](completing-a-conversation-between-instances.md)
78+
- [Complete a conversation in a single database](completing-a-conversation-in-a-single-database.md)
79+
- [Complete a conversation between databases](completing-a-conversation-between-databases.md)
80+
- [Complete a conversation between instances](completing-a-conversation-between-instances.md)

docs/database-engine/service-broker/internal-activation-context.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn about the execution context for a stored procedure that is st
44
author: rwestMSFT
55
ms.author: randolphwest
66
ms.reviewer: mikeray, maghan
7-
ms.date: 07/17/2025
7+
ms.date: 09/03/2025
88
ms.service: sql
99
ms.subservice: configuration
1010
ms.topic: conceptual
@@ -20,15 +20,15 @@ This article describes the execution context for a stored procedure that is star
2020

2121
A queue configured for activation must also specify the user that the activation stored procedure runs as. SQL Server impersonates this user before starting the stored procedure.
2222

23-
When the stored procedure also specifies an EXECUTE AS clause, two impersonations occur. SQL Server first impersonates the user specified for the queue and executes the stored procedure. When the stored procedure executes, the procedure impersonates the user specified in the EXECUTE AS clause of the procedure.
23+
When the stored procedure also specifies an `EXECUTE AS` clause, two impersonations occur. SQL Server first impersonates the user specified for the queue and executes the stored procedure. When the stored procedure executes, the procedure impersonates the user specified in the `EXECUTE AS` clause of the procedure.
2424

25-
The user specified for a remote service binding is generally a different user from the user specified for activation. The permissions required for each user also differ. The remote service binding user doesn't need permission to read from the queue or execute stored procedures in the database, while the user specified for activation doesn't need permission to send messages to the service. For more information on user permissions, see [Identity and Access Control (Service Broker)](identity-and-access-control.md) and [Service Broker Dialog Security](service-broker-dialog-security.md).
25+
The user specified for a remote service binding is generally a different user from the user specified for activation. The permissions required for each user also differ. The remote service binding user doesn't need permission to read from the queue or execute stored procedures in the database, while the user specified for activation doesn't need permission to send messages to the service. For more information on user permissions, see [Identity and access control (Service Broker)](identity-and-access-control.md) and [Service Broker dialog security](service-broker-dialog-security.md).
2626

2727
## Session settings
2828

2929
Service Broker executes internally activated service programs on a background session distinct from the connection that created the message. The options set for this session are the default options for the database.
3030

31-
Within a session started by Service Broker, SQL Server writes the output of PRINT and RAISERROR statements to the SQL Server error log. Service Broker doesn't provide parameters to an activated stored procedure. Service Broker doesn't consider return values from an activated stored procedure and doesn't process result sets from an activated stored procedure.
31+
Within a session started by Service Broker, SQL Server writes the output of `PRINT` and `RAISERROR` statements to the SQL Server error log. Service Broker doesn't provide parameters to an activated stored procedure. Service Broker doesn't consider return values from an activated stored procedure and doesn't process result sets from an activated stored procedure.
3232

3333
## Transaction context
3434

docs/database-engine/service-broker/lesson-1-creating-the-base-conversation-objects.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "Lesson 1: Creating the Base Conversation Objects"
2+
title: "Lesson 1: Create the Base Conversation Objects"
33
description: "In this lesson, you learn to build all the objects that enable a database to support a conversation in the database"
44
author: rwestMSFT
55
ms.author: randolphwest
66
ms.reviewer: mikeray, maghan
7-
ms.date: 03/07/2025
7+
ms.date: 09/03/2025
88
ms.service: sql
99
ms.subservice: configuration
1010
ms.topic: how-to
@@ -51,17 +51,18 @@ GO
5151

5252
### Create the contract
5353

54-
Copy and paste the following code into a Query Editor window. Then, run it to create the contract for the conversation. The contract specifies that conversations that use it must send messages of the `//AWDB/InternalAct/RequestMessage` type from the initiator to the target, and messages of the `//AWDB/InternalAct/ReplyMessage` type from the target to the initiator.
54+
Copy and paste the following code into a Query Editor window. Then, run it to create the contract for the conversation. The contract specifies that conversations that use it must send messages of the **//AWDB/InternalAct/RequestMessage** type from the initiator to the target, and messages of the **//AWDB/InternalAct/ReplyMessage** type from the target to the initiator.
5555

5656
```sql
5757
CREATE CONTRACT [//AWDB/InternalAct/SampleContract]
58-
([//AWDB/InternalAct/RequestMessage] SENT BY INITIATOR, [//AWDB/InternalAct/ReplyMessage] SENT BY TARGET);
58+
([//AWDB/InternalAct/RequestMessage] SENT BY INITIATOR,
59+
[//AWDB/InternalAct/ReplyMessage] SENT BY TARGET);
5960
GO
6061
```
6162

6263
### Create the target queue and service
6364

64-
Copy and paste the following code into a Query Editor window. Then, run it to create the queue and service that is used for the target. Because queues are referenced from the same database in a manner similar to tables and views, queue names are formatted like table or view names. The `CREATE SERVICE` statement associates the service with the `TargetQueueIntAct`. Therefore, all messages that are sent to the service are received into the `TargetQueueIntAct`. The `CREATE SERVICE` also specifies that only conversations that use the `//AWDB/InternalAct/SampleContract` created earlier can use the service as a target service.
65+
Copy and paste the following code into a Query Editor window, then run it to create the queue and service that's used for the target. Because queues are referenced from the same database in a manner similar to tables and views, queue names are formatted like table or view names. The `CREATE SERVICE` statement associates the service with the **TargetQueueIntAct**. Therefore, all messages that are sent to the service are received into the **TargetQueueIntAct**. The `CREATE SERVICE` also specifies that only conversations that use the **//AWDB/InternalAct/SampleContract** created earlier can use the service as a target service.
6566

6667
```sql
6768
CREATE QUEUE TargetQueueIntAct;
@@ -74,7 +75,7 @@ GO
7475

7576
### Create the initiator queue and service
7677

77-
Copy and paste the following code into a Query Editor window. Then, run it to create the queue and service that is used for the initiator. Because no contract name is specified, no other services can use this service as a target service.
78+
Copy and paste the following code into a Query Editor window, then run it to create the queue and service that's used for the initiator. Because no contract name is specified, no other services can use this service as a target service.
7879

7980
```sql
8081
CREATE QUEUE InitiatorQueueIntAct;
@@ -89,4 +90,4 @@ GO
8990
You successfully configured [!INCLUDE [sssampledbobject-md](../../includes/sssampledbobject-md.md)] to support a conversation between the `//AWDB/InternalAct/InitiatorService` and the `//AWDB/InternalAct/TargetService`.
9091

9192
> [!div class="nextstepaction"]
92-
> [Lesson 2: Creating an Internal Activation Procedure](lesson-2-creating-an-internal-activation-procedure.md)
93+
> [Lesson 2: Create an internal activation procedure](lesson-2-creating-an-internal-activation-procedure.md)

0 commit comments

Comments
 (0)