|
1 | 1 | --- |
2 | | -title: "Lesson 1: Creating the Base Conversation Objects" |
| 2 | +title: "Lesson 1: Create the Base Conversation Objects" |
3 | 3 | description: "In this lesson, you learn to build all the objects that enable a database to support a conversation in the database" |
4 | 4 | author: rwestMSFT |
5 | 5 | ms.author: randolphwest |
6 | 6 | ms.reviewer: mikeray, maghan |
7 | | -ms.date: 03/07/2025 |
| 7 | +ms.date: 09/03/2025 |
8 | 8 | ms.service: sql |
9 | 9 | ms.subservice: configuration |
10 | 10 | ms.topic: how-to |
|
51 | 51 |
|
52 | 52 | ### Create the contract |
53 | 53 |
|
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. |
55 | 55 |
|
56 | 56 | ```sql |
57 | 57 | 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); |
59 | 60 | GO |
60 | 61 | ``` |
61 | 62 |
|
62 | 63 | ### Create the target queue and service |
63 | 64 |
|
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. |
65 | 66 |
|
66 | 67 | ```sql |
67 | 68 | CREATE QUEUE TargetQueueIntAct; |
|
74 | 75 |
|
75 | 76 | ### Create the initiator queue and service |
76 | 77 |
|
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. |
78 | 79 |
|
79 | 80 | ```sql |
80 | 81 | CREATE QUEUE InitiatorQueueIntAct; |
|
89 | 90 | You successfully configured [!INCLUDE [sssampledbobject-md](../../includes/sssampledbobject-md.md)] to support a conversation between the `//AWDB/InternalAct/InitiatorService` and the `//AWDB/InternalAct/TargetService`. |
90 | 91 |
|
91 | 92 | > [!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