This project is read-only.


Error detection in sp_StandardCDC_enable_table


It would be useful for first time users & evaluators if sp_StandardCDC_enable_table reported that a primary key had not been specified in the @CapturedColumnList parameter and that this was a requirement for success.
Currently, not specifying a PK results in the dynamic SQL variable becoming NULL and the trigger is not created. No error is reported so everythign seems to have run as expected.


wmweaver wrote Aug 24, 2011 at 2:57 PM

This was a bug in the concatenation of the source columns and is fixed in latest release, coming today.

I am curious though, in what scenario would you not want to store the primary key of the row being tracked? For example, if I'm audting a Customer table but don't store the CustomerID primary key, what would the value be in knowing that some customer had a row change but not the exact customer?

wrote Aug 24, 2011 at 4:19 PM

wrote Aug 24, 2011 at 4:20 PM

Robinson_Derek wrote Aug 24, 2011 at 8:28 PM

I agree. My comment was that as a PK is a mandatory requirement the proc should check for its inclusion in the columnlist and report its absence. Current behaviour is to proceed as if all is well.

wrote Feb 14, 2013 at 2:59 AM

wrote May 16, 2013 at 8:29 AM

wrote May 16, 2013 at 8:29 AM

wrote Jun 14, 2013 at 8:42 AM