SELECT OBJECT_NAME(source_object_id) [Table Name],
(SELECT name + ',' FROM sys.columns SC WHERE SC.object_id = CT.object_id AND name NOT LIKE '__$%' FOR XML PATH('')) [Columns],
capture_instance,
supports_net_changes,
filegroup_name
FROM CDC.change_tables CT
It's certainly not perfect but it should give you a good start if you are ever in need of such a query.
No comments:
Post a Comment