SQL Server CDC: Track additional column after the fact -


if cdc has been setup on table, tracking columns a,d,e instead of entire table, possible add column z source table, add column z list of tracked columns cdc? possible without losing cdc data?

i've looked around , examples find tracking entire table , not cherry picking columns. i'm hoping way update table schema , not lose cdc history, without doing whole copy cdc temp table cdc process.

do have create new instance of cdc schema changes?

sql server 2012

the reason cdc allows 2 capture instances on given table reason. idea this:

  1. you have running instance tracking columns a, b, , c
  2. you want start tracking column d
  3. so set second capture instance track a, b, c, , d.
  4. you process original capture instance , note last lsn process
  5. using fn_cdc_increment_lsn() function, set start point start processing new capture instance
  6. once you're , running on new instance, can drop old one

of course, if you're using cdc history of changes ever on table… that's not designed for. cdc meant etl facilitator. is, capturing changes data consumed , discarded cdc system. if you're using historical system of record, i'd suggest setting "dumb" etl meaning straight copy out of cdc tables user table. once that, can implement above.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -