Record Duplication

  • We are trying to build a trigger on a customer table that AFTER every INSERT and UPDATE the individual record is copied out to another table

    Is there a simple single statement to perform this?

    Stu

    Note:

    1.SQL Server 2005

    2.This is not a replication excercise but a record of all changes in a table performed by users as a security exercise.

    3.We do not want to query the log file we want a separate table that can be queried programatically by client workstations

  • Hi

    Have a look to GSquared's article about audit triggers: Audit Trails and Logging Part II[/url]

    There are also some other articles on this site depending audit tables.

    Greets

    Flo

  • Hey,

    You might also want to take a look at Change Data Capture in SQL 2K8 - in case it's an appropriate tool for the job you need to do.

    /Paul

  • Thanks for the help everyone ...

    We ended up using a security product from ApexSQL (that did a 2 week job in 2 hours). Cannot recommend it highly enough !!!

Viewing 4 posts - 1 through 4 (of 4 total)

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