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


- 在SQL中,如何为每个组选择前2行 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- SQL 临时表问题 2022-01-01