Rollback Of Modification

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vksingh24
    New Member
    • Dec 2007
    • 21

    Rollback Of Modification

    Hi,

    I have a question regarding the rollback of transaction

    I have a table EMP

    table structrue is: EmpID, DeptID

    I fired this query accidently

    update EMP set DeptID=10

    NOW, its has modified all the rows.

    How can I rollback this transaction.

    Plsae let me know
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    have you tried using the rollback command ?

    Comment

    • vksingh24
      New Member
      • Dec 2007
      • 21

      #3
      Originally posted by debasisdas
      have you tried using the rollback command ?

      I have not used any

      begin transaction, commit transaction or rollback transaction

      I simply open the SQL Query analyzer and fired the Query

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        Just rollback and check what happens.

        Comment

        • vksingh24
          New Member
          • Dec 2007
          • 21

          #5
          Originally posted by debasisdas
          Just rollback and check what happens.

          It doesn't work.

          Server: Msg 3903, Level 16, State 1, Line 1
          The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.

          Comment

          • debasisdas
            Recognized Expert Expert
            • Dec 2006
            • 8119

            #6
            if you have not committed then it will not be saved in database.

            Comment

            • ck9663
              Recognized Expert Specialist
              • Jun 2007
              • 2878

              #7
              Originally posted by debasisdas
              if you have not committed then it will not be saved in database.
              if you fire the query inside a sql analyzer or some other tool, i think that's immediately executed unless you explicitly define a transaction block. start looking for a backup...

              -- ck

              Comment

              Working...