久久久久久久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 的原因)
主站蜘蛛池模板: 午夜精品一区二区三区在线视频 | 亚州毛片| 99久久久99久久国产片鸭王 | 青草久久免费视频 | 国产成人一区二区三区电影 | 国产免费观看久久黄av片涩av | 天堂精品| 在线观看成人 | 精品一区二区三区在线观看 | 中文字幕av网 | 久久91精品国产 | 欧美精品一区二区三区在线 | 天堂网色 | www.成人.com | 精品国产乱码久久久久久88av | 亚洲精品久久久久久久久久久 | 欧美成人一级视频 | 日韩在线播放一区 | 日韩在线一区二区 | 亚洲精品久久久久久首妖 | 欧美精品综合 | 欧美电影网 | 成人在线一区二区三区 | www.天天操.com | 狠狠亚洲| 在线观看中文字幕 | 狠狠夜夜| 欧美日韩一区在线 | 视频在线观看一区二区 | 成人99 | 精品欧美乱码久久久久久 | 做a网站 | 日日噜噜噜夜夜爽爽狠狠视频97 | 亚洲福利视频一区二区 | 午夜在线视频 | 国产精品久久久久久久久久免费看 | 久久久精品在线 | 一区二区电影网 | 久久99久久久久 | 国产精品一区在线 | 天堂一区二区三区四区 |