About 52 results
Open links in new tab
  1. How to rollback or commit a transaction in SQL Server

    Feb 22, 2013 · The good news is a transaction in SQL Server can span multiple batches (each exec is treated as a separate batch.) You can wrap your EXEC statements in a BEGIN TRANSACTION and …

  2. sql server - How to roll back UPDATE statement? - Stack Overflow

    Feb 3, 2014 · Yes, besides doing a full restore, there is a viable solution provided by 3rd party tool, which reads information from a database transaction log, parse it, and then creates an undo T-SQL …

  3. SQL Server - transactions roll back on error? - Stack Overflow

    Apr 27, 2017 · It is sent by one long string command. If one of the inserts fail, or any part of the command fails, does SQL Server roll back the transaction? If it does not rollback, do I have to send a …

  4. SQL Transactions with Commit and Rollback - Stack Overflow

    Dec 3, 2015 · SQL Transactions with Commit and Rollback Asked 10 years, 4 months ago Modified 10 years, 4 months ago Viewed 22k times

  5. Correct use of transactions in SQL Server - Stack Overflow

    Apr 14, 2012 · At the beginning of stored procedure one should put SET XACT_ABORT ON to instruct Sql Server to automatically rollback transaction in case of error. If ommited or set to OFF one needs …

  6. sql server - sql try/catch rollback/commit - preventing erroneous ...

    I am trying to write an MS sql script that has a transaction and a try/catch block. If it catches an exception, the transaction is rolled back. If not, the transaction is committed. I have seen ...

  7. SQL Server BEGIN/END vs BEGIN TRANS/COMMIT/ROLLBACK

    Feb 10, 2016 · A use case for 'begin tran', is to lock DDL statements (update, insert or delete) so you can control the changes and if you made a mistake, rollback the transaction with 'rollback tran'.

  8. sql - How to kill or rollback active transaction? - Stack Overflow

    7 You can't kill/rollback a transaction from another session without killing the owner session. I think, allowing to kill/rollback a transaction from another user's session means many design and security …

  9. sql server - How to rollback a transaction in a stored procedure ...

    Aug 25, 2016 · 17 Looking at the SQL Server Books Online, Microsoft seems to have an (incorrect) method of handling nested transactions in a stored procedure: Nesting Transactions Explicit …

  10. sql - Why do we need a Rollback command while making a transaction …

    Mar 29, 2018 · Rollback is typically used when you change your mind during the transaction, or run into problems.