Column update

  • Hi!

    I have a table with the history of blocks for few months. It is automaticaly filled as new blocks appear. Recently I found that someone is deleting data from two columns.

    It is done by sime kind of sheduled job or trigger, because the data is deleted right away. The guy who did this is most probably from development and has sa rights on many servers.

    Can I get some step by step hints how to track this?

    Thanks.

    Edited by - Roust_m on 09/29/2003 09:40:45 AM

  • Brute force - how about rolling back any transaction that makes that type of change with an error message?

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • You mean placing an 'on update' trigger on the table?

    BTW, I, myself do some update within my job on this table, so this will not work.

    Another reason is that it is easy to disable all triggers before the update.

    /* someone updates two columns to NULL value */

    Edited by - Roust_m on 09/29/2003 08:16:51 AM

    Edited by - Roust_m on 09/29/2003 08:43:24 AM

  • My best wish is to figure out where this came from...

    Perhaps he added a spare step for a job, or created a separate job on another server, etc.

  • What we often do is set up shadow tables, tables that mirror the production tables plus a column for shdw_dt, shdw_action (D,U) and shdw_user (system_user). Then put a trigger on the table for updates and deletes and write the values from the deleted temp table to the shadow table.

    Hope this helps, Jeff

  • Do you know about when it's happening?

    You could run a trace to capture what's happening.

    -SQLBill

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

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