久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

C#/SQL 數據庫偵聽器

C#/SQL Database listener(C#/SQL 數據庫偵聽器)
本文介紹了C#/SQL 數據庫偵聽器的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我需要持續監視數據庫行以檢查更改(更新).如果其他來源有一些更改或更新,則應在我的應用程序上觸發事件(我使用的是 WCF).有沒有辦法連續監聽數據庫行的變化?

I have a requirement to monitor the Database rows continuously to check for the Changes(updates). If there are some changes or updates from the other sources the Event should be fired on my application (I am using a WCF). Is there any way to listen the database row continuously for the changes?

我可能有更多的事件來監視同一個表中的不同行.性能方面有什么問題嗎?我正在使用 C# Web 服務來監控 SQL Server 后端.

I may be having more number of events to monitor different rows in the same table. is there any problem in case of performance. I am using C# web service to monitor the SQL Server back end.

推薦答案

前段時間我也有過類似的需求,我用CLR SP將數據推送到消息隊列中解決了.

I had a very similar requirement some time ago, and I solved it using a CLR SP to push the data into a message queue.

為了簡化部署,我創建了一個 CLR SP,其中包含一個名為 SendMessage 的小函數,該函數只是將消息推送到消息隊列中,并使用 AFTER INSERT 觸發器(正常觸發器,而不是 CLR 觸發器).

To ease deployment, I created an CLR SP with a tiny little function called SendMessage that was just pushing a message into a Message Queue, and tied it to my tables using an AFTER INSERT trigger (normal trigger, not CLR trigger).

在這種情況下,性能是我最關心的問題,但我對其進行了壓力測試,結果大大超出了我的預期.與 SQL Server Service Broker 相比,它是一個非常易于部署的解決方案.CLR SP 中的代碼也很簡單.

Performance was my main concern in this case, but I have stress tested it and it greatly exceeded my expectations. And compared to SQL Server Service Broker, it's a very easy-to-deploy solution. The code in the CLR SP is really trivial as well.

這篇關于C#/SQL 數據庫偵聽器的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

LINQ to SQL and Concurrency Issues(LINQ to SQL 和并發問題)
SQL Server 2005 Transaction Level and Stored Procedures(SQL Server 2005 事務級和存儲過程)
Yield return from a try/catch block(try/catch 塊的收益回報)
Should I call Parameters.Clear when reusing a SqlCommand with a transation?(重用帶有事務的 SqlCommand 時,我應該調用 Parameters.Clear 嗎?)
Does SqlTransaction need to have Dispose called?(SqlTransaction 是否需要調用 Dispose?)
Reason for System.Transactions.TransactionInDoubtException(System.Transactions.TransactionInDoubtException 的原因)
主站蜘蛛池模板: av黄色在线观看 | 欧美有码视频 | 我要看一级黄色片 | 亚洲精品一区二区三区蜜桃久 | 欧美在线视频一区二区 | 成人午夜在线 | 青青草成人在线 | 青青草一区二区 | 日韩精品一区二区三区免费视频 | 亚洲伊人色 | 国产呦小j女精品视频 | 国产性色av | 五月天婷婷基地 | 天天干夜夜拍 | 激情一区二区三区 | 国产精品久久久久久99 | 最新国产精品视频 | 自拍偷拍福利视频 | 国产精品一区二区久久 | 色综合久久88色综合天天 | av一级在线 | 在线国产91| 在线播放a| 天天干天天干天天 | 深夜福利视频网站 | 黄色一级小说 | 精品一二区 | 亚洲欧美日韩一区二区三区四区 | 精品一区在线 | 成人女同在线观看 | 男男成人高潮片免费网站 | 男女免费视频 | 五月天网址| 欧美资源在线 | 久久久婷婷 | 日日干天天射 | 国产精品久久久精品 | 久久久久久网站 | 日韩高清一区二区 | 久久精品中文 | 亚洲国产精 |