Simply add a message to a SQL Server Service Broker queue using T-SQL?(只需使用 T-SQL 将消息添加到 SQL Server Service Broker 队列?)
问题描述
我因此创建了一个队列:
I created a queue thus:
CREATE QUEUE log_line_queue
WITH RETENTION = ON, --can decrease performance
STATUS = ON,
ACTIVATION (
MAX_QUEUE_READERS = 1, --number of concurrent instances of sp_insert_log_line
PROCEDURE_NAME = sp_insert_log_line,
EXECUTE AS OWNER
);
我可以在 SSMS 中快速执行哪些操作以使用 T-SQL 将项目添加到我的队列中?
What can I do quickly in SSMS to add an item to my queue using T-SQL?
推荐答案
在 SSMS 中,在对象资源管理器中选择所需的数据库.然后找到这个数据库的Service Broker,右键单击它并选择'New Service Broker Application...'命令.这将为您创建模板以快速开始使用 Service Broker.此外,您还会看到实现和运行您自己的应用程序所需的最少推荐配置.
In SSMS select required database in Object Explorer. Then find Service Broker of this database, right click on it and select 'New Service Broker Application...' command. This will create template for you to start using Service Broker quickly. Also you'll see minimal recommended configuration needed to implement and run your own application.
至于使用一个队列 - 如果这是您第一次使用 Service Broker,为什么不一开始就遵循惯例?在运行多个示例和/或您自己的原型后,您决定使用多少队列,并且您知道如何使用.
As for using one queue - if this is your first experience with Service Broker why not to follow common practice at the beginning? After running several samples and/or your own prototypes you decide how much queues to use and you know how to do it.
这篇关于只需使用 T-SQL 将消息添加到 SQL Server Service Broker 队列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:只需使用 T-SQL 将消息添加到 SQL Server Service Brok


基础教程推荐
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 在多列上分布任意行 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01