Locking

Holding locks on a database object will also cause another concurrent session to wait. Waits to acquire a lock or perform a transaction could even cause blocking, depending on the locks required to perform a select or transaction.

Both SQL Server and Oracle have exclusive modes for modifying data and shared lock modes for sharing resources among multiple users. The locks are held for the duration of the transaction, and the first statement to acquire the lock will release it after the first transaction is committed or rolled back. The exclusive lock is obtained at the row level for all of the rows of the insert, update, or delete operation.

SQL Server offers different levels of isolation to help minimize some of the locking that happens ...

Get Oracle Database Administration for Microsoft SQL Server DBAs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.