다음을 통해 공유


Transaction Locks

Locking is the process by which a DBMS restricts access to a row in a multiuser environment. Transactions lock rows to regulate their sharing and isolation.

Locking can occur with any of the methods that interact with rows on the data source. These include IRowsetLocate::GetRowsAt, IRowsetLocate::GetRowsByBookmark, IRowsetUpdate::Update, and others. These operations take locks and can wait for locks to be released by other transactions. A lock held by another transaction usually does not invalidate an operation, but the lock delays the operation until the other transaction has finished and released the lock. Therefore, the default behavior on encountering a lock is to queue until it is released. There is a time limit on how long to queue before returning with a time-out failure, and the time-out can be set to zero for infinite time-out. Various time-out settings can be chosen by setting transaction properties.

The data source object implements transaction locking by using a strategy that corresponds to the transaction isolation level. These strategies are specific to the data source object.