web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :

Transaction integrity checking in D365

dasdasd Profile Picture dasdasd 841
It is important to ensure the integrity of all transactions within the system. When a transaction begins, to ensure data consistency, it must finish completely with predictable results. If the transaction terminates in the middle, the system should roll back to its state before the transaction began. Use the Transaction Tracking System (tts) to help you ensure database integrity. 



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 ttslevel. Each time a ttsbegin is called, the ttslevel increases by one. Every ttscommitdecreases the level by one. Ifpossible 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.


This was originally posted here.

Comments

*This post is locked for comments