SQL依赖项跟踪数据库更改并获取已更改/插入对象的记录详细信息 [英] SQL Dependency to track DB changes and get record details of the Changed/Inserted Object

查看:96
本文介绍了SQL依赖项跟踪数据库更改并获取已更改/插入对象的记录详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有很多问题可能与此类似,但我有点困惑。



我唯一的问题是,我想跟踪数据库知道更改内容并获取更改记录的详细信息,然后将此chaged行插入另一个表中。这可能与.NET中的SQL Dependency一起使用吗?



我们正在使用SQL Server 2012.我们将非常感谢您的帮助。谢谢

I know there are lot of questions that might be similar to this, But I am confused a bit.

My only question is, I want to track database to know what is changed and get the details of the changed record, And then insert this chaged row into another table. Is this possible with SQL Dependency in .NET?

We are using SQL Server 2012. Your help will be greately appreciated. Thanks

推荐答案

AFAIK,使用 TRIGGERS ,您可以创建引用实体,从而使用SQL依赖关系来跟踪更改。

此处快速概述SQL依赖关系: MSDN:了解SQL依赖关系 [ ^ ]
AFAIK, using TRIGGERS you can create referencing entities and thus use SQL dependency to track the changes.
A quick overview of SQL dependency here: MSDN: Understanding SQL Dependencies[^]


这篇关于SQL依赖项跟踪数据库更改并获取已更改/插入对象的记录详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆