Phases a transaction has to undergo

Explain the phases a transaction has to undergo.

The several phases a transaction has to go through are listed here. Database is in a consistent state when the transaction is about to start.

1. The transaction starts processing explicitly with the BEGIN TRANSACTION statement.
2. Record is written to the log when the transaction generates the first log record for data modification.
3. Modification starts one table at time. Here database is in inconsistent state.
4. When all of the modifications have completed successfully and the database is once again consistent, the application commits the transaction.
5. If some error it undoes (or rolls back) all of the data modifications. This process returns the database to the point of consistency it was at before the transaction started.

Explain the phases a transaction has to undergo.

- Active state: This phase is divided into two states:
- Initial phase: This phase is achieved when the transaction starts.
- Partially Committed phase: This is achieved when the transactions final statement has been executed. Even though the final statement is finished execution, the transaction may abort due to some failure.
- Failed state: This state is reached when the normal execution fails.
- Aborted state: A transaction is aborted when the system feels it needs to be failed. This state should not have any effect on the system and thus all changes done until it were aborted; are rolled back.
- Committed: After the transaction is successfully executed, it enters the committed state. In this state all changes are committed. These committed changes cannot be undone or aborting.
SQL server XPath - What is XPath?
SQL server XPath - XPath is a language defined by the W3C, used to select nodes from XML documents. SQL Server 2000 supports .....
Define the rules for designing Files and File groups in SQL Server.
SQL Server Files and File groups - A file or file group can only be used by one database. For example, the files abc.mdf and abc.ndf contains......
What are the Authentication Modes in SQL Server?
SQL server Authentication Modes - SQL Server supports two security (authentication) modes: Windows Authentication and Mixed mode .....
Post your comment