Data Auditing

  • Looking for clarification to see if I understand Microsoft's "Change Tracking" correctly.

    Microsoft's "Change Tracking" will identify "net" data changes and not "gross" data changes. For examples,

    if we too have the 4 individual sets of batch committed transactions,

    Batch and version 0:

    begin tran

    Insert records 1

    Insert records 2

    Insert records 3

    Insert records 4

    commit

    Batch and version 1:

    Insert records 5

    Batch and version 2:

    Delete record 4

    Batch and version 3:

    Update record 2

    If we were to try to get each individual set of batch/version transactions, it is impossible. For example,

    SELECT * FROM CHANGETABLE(CHANGES

    , 0) CT

    SELECT * FROM CHANGETABLE(CHANGES

    , 1) CT

    SELECT * FROM CHANGETABLE(CHANGES

    , 2) CT

    SELECT * FROM CHANGETABLE(CHANGES

    , 3) CT

    we don't get the 3 inserts, folowwed by the 1 insert, followed bu the 1 delete, and followed by the 1 update.

    Instead something that represents the current state of the data.

    The bottom line is, I was hoping that Microsoft's "Change Tracking" could help to pull an audit report

    of data transactions from the trasnaction log.The true intent of Microsoft's "Change Tracking" is to support

    data replication.

    Am I correct?

  • It almost sounds like you may want to look at the new Changed Data Capture functionality. This keeps track of changes to specific columns with a table.

    Here is a pretty good overview of the difference and tradeoffs between Change Tracking and Changed Data Capture: http://technet.microsoft.com/en-us/magazine/2008.11.sql.aspx?pr=blog#id0110017

  • Thanks for your response. I started to look at Change Data Capture (CDC) only to be stopped by the fact that it is an Enterprise edition only feature. The servers in question are Standard edition.

    Thanks too for the article.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply