• river1 (12/6/2016)


    Hello,

    I need to be able to test something (which will change some data on the big databases) and after revert it back to the normal state.

    What is better option ?

    Backup/restore

    Snapshot

    Thank you,

    Pedro Ribeiro

    Just how much change are we talking about? Millions of rows? More? Less? If we're talking about a relatively small amount of data, you could make copies of the tables involved prior to the change, and then update your change process to OUTPUT a list of the primary key values for each changed table (into a separate table for each changed table), and then use those keys to do an UPDATE back to the original tables from the copies, using the key values. Judging just how much data you can handle this way is going to be a judgment call that only you and/or your co-workers can make.

    However, a couple of things to keep in mind. If this database is constantly being updated with other updates, and within the tables involved, backup and restore are probably out of consideration, as then you'd lose other updates by virtue of the restore, and the only way to avoid that is to keep any application that uses the database down for the duration. Also, if you don't test your updates and restoration processes, you could get yourself in deep doo-doo, so a good time to perform this activity would be immediately following a good backup.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)