Source:SET IMPLICIT_TRANSACTIONS (Transact-SQL)
SET IMPLICIT_TRANSACTIONS { ON | OFF }
When OFF, it returns the connection to
autocommit transaction mode
...
...
Source:Explicit Transactions
DB-Library applications and Transact-SQL scripts use the BEGIN TRANSACTION, COMMIT TRANSACTION, COMMIT WORK, ROLLBACK TRANSACTION, or ROLLBACK WORK Transact-SQL statements to define explicit transactions.
- BEGIN TRANSACTION
- Marks the starting point of an explicit transaction for a connection.
- COMMIT TRANSACTION or COMMIT WORK
- Source:What does a transaction around a singlestatement do?
- ...
...
It does nothing. All individual SQL Statements, (with rare
exceptions like Bulk Inserts with No Log, or Truncate Table) are
automaticaly "In a Transaction" whether you explicitly
say so or not.. (even if they insert, update, or delete millions
of rows). ... ... "ACID" requirements of a relational database? That "A" stands for Atomic, meaning that either the statement works in its entirety, or it doesn't--and while the statement is being performed, no other queries can be done on the data affected by that query. BEGIN TRANSACTION / COMMIT "extends" this locking functionality to the work done by multiple statements, but it adds nothing to single statements. ... Note also that "nolock" does not apply to inserts/updates/deletes -- those actions always required locks. |
No comments:
Post a Comment