如何知道表何时从变更数据捕获 (CDC) 中删除或添加到其中?

发布于 2024-11-05 18:50:59 字数 170 浏览 3 评论 0原文

SQL Server 2008 具有更改数据捕获功能,允许捕获表中所做的更改,例如插入、删除或更新行。

我注意到一个表被排除在变更数据捕获(CDC)之外,这带来了很多问题。

有没有办法找出表何时从 CDC 中删除,甚至是谁删除了该表?

CDC 是否有某种日志可以提供此类信息?

SQL Server 2008 has Change Data Capture feature that allows to capture changes made in the table, such as insert, delete or update rows.

I have noticed that a table was excluded from Change Data Capture (CDC) which brought lots of problems.

Is there a way to find out when a table was removed from CDC or even who removed the table?

Is there some kind of log of CDC where such information is available?

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

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

发布评论

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

评论(2

2024-11-12 18:50:59

您可以检查报告/标准报告/架构更改历史记录,我认为它会在那里被拾取,因为捕获表可能会被删除,但该数据来自默认跟踪,因此它可能不会回溯到足够远的地方。

You could check the Reports / Standard Reports / Schema changes history, I would think it would get picked up there since the capture tables probably would be dropped, but that data comes from the default trace, so it may not go back far enough for you.

薄荷→糖丶微凉 2024-11-12 18:50:59

CDC 跟踪对受监控表进行的 DDL 更改:
http://msdn.microsoft.com/en-我们/library/bb522553(v=sql.110).aspx
http://msdn.microsoft.com/en -us/library/bb510681(v=sql.110).aspx

另外,selectmodify_date from sys.tables where object_id = object_id('dbo.yourtablename')将为您提供时间和表的 DDL 上次更改的日期。据我所知,除非您对所有 DDL 更改安装了监视功能,否则无法获取对表定义所做的所有更改。

CDC keeps track of DDL changes made on the monitored tables:
http://msdn.microsoft.com/en-us/library/bb522553(v=sql.110).aspx
and http://msdn.microsoft.com/en-us/library/bb510681(v=sql.110).aspx

Also select modify_date from sys.tables where object_id = object_id('dbo.yourtablename') will give you the time and date the table's DDL was last changed. Unless you've got monitoring installed on all DDL changes there's -to my knowledge- no way to get all changes made to your table's definitions.

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