• Lynn Pettis - Thursday, January 11, 2018 8:41 AM

    Sue_H - Wednesday, January 10, 2018 11:17 AM

    RandomStream - Wednesday, January 10, 2018 10:39 AM

    Thanks. I read it and all comments that followed. It is not the best write-up on CDC. I appreciate the pointer though, now I know that such a capability exist.

    That really is not so good of an article...never read that before either. There is a discussion up here that compares trigger and cdc that's pretty good if you wanted to compare and understand the different approaches. If you only want data and not who did what then CDC may work. It's not a replacement for using triggers and wasn't intended to be - it won't capture things like user, spid, application, etc that the poster requested. So it wouldn't work in this case if you read the posters request. It's really data only. It's based on reading the log so it's going to be limited in that respect. I haven't played with using extended events for something like this request but that is an interesting approach, I kind of like the thought of that.
    In any case, the approach really depends on what is needed with the auditing, what's being audited, etc. Here is a link to that discussion - which has some links to real CDC articles:
    Difference in CDC vs Trigger

    Sue

    And also, CDC (Change Data Capture) is only available in the Enterprise Edition of SQL Server.

    Not quite true anymore.  As of 2016 SP1, it's also available in the Standard Edition.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)