The following keywords help in integrity
checking:
ttsbegin –
Indicates the beginning of the transaction.
ttscommit –
Indicates the successful end of a transaction. This ensures the transaction
performed as intended upon completion.
ttsabort –
Used as an exception to abort and roll back a transaction to the state before
the ttsbegin.
Nested ttsbegins and ttscommits are
ignored in that a lock is held until the last ttscommit is
reached. However the system does keep track of the tts
level. Each time a ttsbegin is called, the tts
level increases by one. Every ttscommit
decreases
the level by one. If
possible you will want to make the tts blocks as small as required. When a record is selected for update, it will
lock the records or table to prevent another process from also modifying
them. The shorter the transaction block
the less possibility for potential deadlocks.
No comments:
Post a Comment