SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Implementing Change Data Capture in Microsoft® SQL Server 2008


Implementing Change Data Capture in Microsoft® SQL Server 2008

Author
Message
cliffb
cliffb
SSC Eights!
SSC Eights! (819 reputation)SSC Eights! (819 reputation)SSC Eights! (819 reputation)SSC Eights! (819 reputation)SSC Eights! (819 reputation)SSC Eights! (819 reputation)SSC Eights! (819 reputation)SSC Eights! (819 reputation)

Group: General Forum Members
Points: 819 Visits: 438
CDCUserName should be in each cdc table. This is the sql/windows login used at the time of the change.



margery_spears
margery_spears
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 2
There's also a video on the SQL Server "How Do I?" Videos page called Provide an Up-to-Date Data Warehouse with Change Data Capture and hosted by Scott Golightly. After showing how to configure Change Data Capture on a database, Scott shows a sample SSIS package that extracts the changed data from the database. These tutorials are a favorite of mine - short and to the point.
LeeFAR
LeeFAR
SSC-Addicted
SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)SSC-Addicted (440 reputation)

Group: General Forum Members
Points: 440 Visits: 322
Thanks for the link to the videos.



SqlRandall
SqlRandall
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 245
Thanks for the article. We plan to ETL the CDC data on a nightly basis. Nevertheless, I'm put off by the fact that we can't add columns to tables without disabling/re-enabling CDC. Disabling of course drops the cdc_ table, so goodbye data.

It would be nice if CDC could pick up the new column. DDL changes like this can now be propagated to replication subscribers; it would be nice if CDC could as well.

And what is up with not being able to reindex a CDC-enabled table?Angry
Roddy.CAMERON
Roddy.CAMERON
SSC Eights!
SSC Eights! (920 reputation)SSC Eights! (920 reputation)SSC Eights! (920 reputation)SSC Eights! (920 reputation)SSC Eights! (920 reputation)SSC Eights! (920 reputation)SSC Eights! (920 reputation)SSC Eights! (920 reputation)

Group: General Forum Members
Points: 920 Visits: 2564

And what is up with not being able to reindex a CDC-enabled table?


I'm a bit puzzled by this. I have CDC enabled tables and I can both rebuild and reorganise the indexes on them. I guess it depends how you perform reindexing. CDC does not let you drop the existing PK as it is used for CDC. If your reindexing scripts go through and actually drop and recreate indexes then this will not work with CDC enabled tables (same applies for transactional replication for that matter), but that is no longer a recommended method to rebuild indexes. However if you use "alter index rebuild/reorganize" functionality this works without an issue with CDC enabled. Maybe I'm missing something though.

Cheers
Roddy
SqlRandall
SqlRandall
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 245
However if you use "alter index rebuild/reorganize" functionality this works without an issue with CDC enabled.


You are correct sir!! I was using old syntax. Thanks!
doc_sewell
doc_sewell
SSC-Enthusiastic
SSC-Enthusiastic (191 reputation)SSC-Enthusiastic (191 reputation)SSC-Enthusiastic (191 reputation)SSC-Enthusiastic (191 reputation)SSC-Enthusiastic (191 reputation)SSC-Enthusiastic (191 reputation)SSC-Enthusiastic (191 reputation)SSC-Enthusiastic (191 reputation)

Group: General Forum Members
Points: 191 Visits: 123
We have two tables with triggers already on them. Each table has three triggers, two of which are "Instead of" triggers. Can we still do CDC on these tables?


Joe
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search