Find updated rows only

  • Hi All,

    I am ahving a table which contains around 150 columns and millions of rows.

    Now I am facing challenge to find among those which records are updated?

    there is no datecheck column or modified like that

    Thanks

    Abhas

  • abhas (11/22/2013)


    Hi All,

    I am ahving a table which contains around 150 columns and millions of rows.

    Now I am facing challenge to find among those which records are updated?

    there is no datecheck column or modified like that

    Thanks

    Abhas

    without some sort of auditing in place, you are really out of luck.

    if you can restore a COPY of the database to a specific point in time, you could compare the current values in the table in the production database to the same table in the backup copy you just restored;

    going forward in the future, you could consider adding a rowversion column or turning on change data capture to the table, depending on what you need to track.

    rowversion tells you WHAT rows changed(but not when or what columns changed); CDC lets you get old versus new values.

    sql2008 + Auditing can tell you who changed the data and at what time, but you have to enable it as well.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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