Rollback in Sql query window

  • Hi,

    I use ms sql query analyzer/window to run my queries and do bulk updates / inserts/ deletes as everyone might do.

    Sometimes while i am updating a bunch of records there are times when i by mistake write a wrong condition and all records get updated with a particular value. Is there a way to roll back such statements?

    I have to deal with a users database of more than 100K and in such situations when say i am udation job titles of people and if such and error occurs it can spell disaster.

    Please advise and oblige.

    Thanks and regards

    Hitendra

  • Have you tried keeping Sets implicit transaction mode to on for the connection.

    Command is SET IMPLICIT_TRANSACTIONS ON

    This way you will need to manually rollback or commit a transaction

    else all changes will be lost once you close the connection.

    Pay Respect to People on your way up. For you will meet the same People on your way down.


    He who knows others is learned but the wise one is one who knows himself.

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

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