Keeping Audit Log of Order Changes in the database

  • Hi,

    In our Orders application, when a customers makes a change to their Order (Orders are to be delivered to their homes on a given date) , the Order and Order Items are all deleted and the whole Order is recreated with the new lines items -not ideal I know but that is what I have to work with.

    My task is to allow the guys in the Call Centre to load the Order change history for a customer.

    So for example, if my order contains 2 Apples and 1 Orange, and on Sept 28 I remove the Orange from my order then my original order will be deleted along with the lines items and a new order record will be created in the database with line items of 2 Apples.

    What I want is to log the actual change that was made to the order so that end user can then load a screen showing all of the changes to a customer's order over time....

    So something like as follows:

    Order Due Order Changed Action

    Oct 01 2011 Sept 28 2011 Removed 1 Orange

    Oct 01 2011 Sept 26 2011 Added 1 Apple

    etc.......

    I am plugging away with different options for now - I have created triggers to capture the deleted orders and lined items and could use that to try and compare before and after bu just wondering if anyone out there as done anthing like this in the past,

    Cheers!

    JayK 🙂

  • This was removed by the editor as SPAM

  • As change tracking is only in SQL 2008 R2, if your on just SQL 2008 the products Lumigen and APEXSQL are worth looking at.

    MCITP SQL 2005, MCSA SQL 2012

  • This was removed by the editor as SPAM

  • My Mistake I thought it was only in SQL 2008 R2, did it not used to be called "Change Data capture"? I had reviewed that once and for a large volume system like ours it was pretty rubbish. It used alot of CPU time up compared to the 3rd party products we looked at.

    MCITP SQL 2005, MCSA SQL 2012

  • Check these, and the discussions on them. See if they help:

    http://www.sqlservercentral.com/articles/Auditing/63247/

    http://www.sqlservercentral.com/articles/Auditing/63248/

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 6 posts - 1 through 5 (of 5 total)

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