問題描述
我因此創(chuàng)建了一個隊列:
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 中快速執(zhí)行哪些操作以使用 T-SQL 將項目添加到我的隊列中?
What can I do quickly in SSMS to add an item to my queue using T-SQL?
推薦答案
在 SSMS 中,在對象資源管理器中選擇所需的數(shù)據(jù)庫.然后找到這個數(shù)據(jù)庫的Service Broker,右鍵單擊它并選擇'New Service Broker Application...'命令.這將為您創(chuàng)建模板以快速開始使用 Service Broker.此外,您還會看到實現(xiàn)和運行您自己的應(yīng)用程序所需的最少推薦配置.
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.
這篇關(guān)于只需使用 T-SQL 將消息添加到 SQL Server Service Broker 隊列?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!