SQL 和 Oracle 中数据更改时的通知
我正在构建一个系统,如果数据库表发生任何更改(插入、更新、删除),我需要通知基于 .net 的应用程序中的窗口服务。我知道这可以通过 SQL 中的 ADO.NET 事件来完成。 Oracle 和 SQL 是否有任何通用的解决方案可以提供此类通知。这需要在实时更新时发生。
I am in the process of building a system where I need to notify a Window Service in a .net based application in case of any change in the DB table (Insert , Update , Delete). I know this can be done with the ADO.NET Events in SQL. Is there any common solution for Oracle and SQL which can provide these kind of notifications. This needs to happen as and when the update happens on real time basis.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SQL Server 唯一的主动推送技术是查询通知,它以非常特定于平台的方式工作,例如 SqlDependency。 Oracle 在 数据更改通知 中有一个等效项,它就像平台特定的一样。考虑到两种实现之间的巨大差异,两者之间不存在公共层抽象,也不可能随时出现公共层抽象。
顺便说一句,诸如更改数据捕获之类的技术旨在保持断开连接的客户端同步(即同步框架),它们基本上是复制,它们不适合数据更改客户端通知。
The only active push technology for SQL Server is Query Notifications, which works on very platform specific ways, like SqlDependency. Oracle has an equivalent in Data Change Notifications, which is just as platform specific. There is no common layer abstraction between the two, nor is there any chance of one to appear any time, given the huge differences between the two implementations.
BTW, technologies like Change Data Capture are designed for keeping disconnected clients in sync (ie. Sync Framework) and they are basically Replication in disquise, they are not suited for data change client notifications.
SQL Server 和 Oracle 都支持更改数据捕获。
http://msdn.microsoft.com/en-us/library/bb522489。 aspx
http://download.oracle .com/docs/cd/B10501_01/server.920/a96520/cdc.htm
您可以捕获更改并传播它。
此外,还有第三方产品可以在 SQL Server 和 Oracle 之间进行复制。
Both SQL Server and Oracle support Change Data Capture.
http://msdn.microsoft.com/en-us/library/bb522489.aspx
http://download.oracle.com/docs/cd/B10501_01/server.920/a96520/cdc.htm
You can capture the change and propagate it.
Also, there are third party products which will do replication between SQL Server and Oracle.