关于 Sql Server 2008 中更改跟踪的建议

发布于 2024-08-22 19:29:54 字数 391 浏览 6 评论 0原文

我的客户正在寻找一种方法来对应用程序进行完整的审计跟踪(所有表上的历史数据的完整视图)。

除了使用表副本或存储字段名称、字段值、修改的老式方法之外通过、修改等,我正在考虑使用 Sql Server 2008 更改跟踪。
msdn 上的操作方法文章同样

有没有人使用过(或做过 POC)Sql Server 2008 更改跟踪功能并发现它是值得的。 另外,如果可能的话,请具体说明您想要从中得到什么以及您发现/得出的结论。 欢迎任何有关相同的提示。

[编辑]
已经一周了还没有回复!

My client is looking for a way to do a full audit trails (full view of historical data on all tables) on the application.

Other than using the old fashioned way of having table copies or storing field name, field value, modified by, modified on etc, I was looking at using Sql Server 2008 change tracking.
Found a How-To article on msdn on the same

Has anyone used (or done a POC) Sql Server 2008 Change Tracking feature and found it to be worth it.
Also if possible please specify what you wanted out of it and what you found/concluded.
Any tips on the same are welcome.

[Edit]
Its been a week still no answer!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

放低过去 2024-08-29 19:29:54

我之前在数据仓库中使用过 CDC。这非常好,让您不必为所有表编写触发器,但我会列出 2 个需要注意的地方:

  1. 默认情况下,有一个 SQL 代理作业每 X 天修剪一次表(不记得默认值了) ),所以你需要覆盖它,或者将数据发送到其他地方。

  2. 删除并重新创建表的脚本(MSSQL Management studio 有时会这样做)可能会导致您的 CDC 表被删除并丢失数据,因此请小心。

I've used CDC in a data-warehouse set up before. It's very good and saves you having to write triggers for all your tables, but I would list 2 areas of caution:

  1. By default, there is a SQL agent job that prunes the tables every X days (can't remember the default), so you need to either override this, or ship the data elsewhere.

  2. Scripts that drop and recreate tables (which MSSQL Management studio sometimes does) can result in your CDC tables being dropped and the data lost, so take care.

悲凉≈ 2024-08-29 19:29:54

SQL 更改跟踪不能用于审计目的。 (也许可以,但不是为了这个)。

SQL DBA 在我工作的地方,告诉我事务日志已经是审计跟踪了。

(抱歉,我不知道如何让它有用)

SQL Change Tracking cannot be used for audit purposes. (well maybe it can, but not meant for it).

The SQL DBA's here where I work, tell me the transaction log IS the audit trail already.

(Sorry I have no idea how to make that useful though)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文