关于 Sql Server 2008 中更改跟踪的建议
我的客户正在寻找一种方法来对应用程序进行完整的审计跟踪(所有表上的历史数据的完整视图)。
除了使用表副本或存储字段名称、字段值、修改的老式方法之外通过、修改等,我正在考虑使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我之前在数据仓库中使用过 CDC。这非常好,让您不必为所有表编写触发器,但我会列出 2 个需要注意的地方:
默认情况下,有一个 SQL 代理作业每 X 天修剪一次表(不记得默认值了) ),所以你需要覆盖它,或者将数据发送到其他地方。
删除并重新创建表的脚本(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:
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.
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.
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)