1

Resolved

Error detection in sp_StandardCDC_enable_table

description

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.
 
Regards
 
Derek

comments

wmweaver wrote Aug 24, 2011 at 1: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 3:19 PM

wrote Aug 24, 2011 at 3:20 PM

Robinson_Derek wrote Aug 24, 2011 at 7: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 1:59 AM

wrote May 16, 2013 at 7:29 AM

wrote May 16, 2013 at 7:29 AM

wrote Jun 14, 2013 at 7:42 AM