Does COMMIT end or start a transaction?

Does COMMIT end or start a transaction?

Explicit transactions start with the BEGIN TRANSACTION statement and end with the COMMIT or ROLLBACK statement.

Can we undo the changes after COMMIT statement is passed in any case?

No, you can’t undo, rollback or reverse a commit.

What is start transaction COMMIT transaction?

START TRANSACTION or BEGIN start a new transaction. COMMIT commits the current transaction, making its changes permanent. ROLLBACK rolls back the current transaction, canceling its changes.

Where does the data go when a transaction is committed?

The changes have been made to the database buffers of the SGA. These changes may go to disk before a transaction is committed. The data changes for a committed transaction, stored in the database buffers of the SGA, are not necessarily written immediately to the datafiles by the database writer (DBW n) background process.

Can You Be sure that data is saved for sure?

If a transaction is “committed” , is it then saved for sure? If a transaction is committed successfully, can I then be 100% sure that it has been written to the database AND to the log files? Can I be sure that the data is SAVED ? Today our log files had reached the limit of the drive and we got a lot of errors.

What is the purpose of the save transaction?

The use of Save Transaction provides you with a mechanism for rolling back portions of a transaction. For example SP A starts a transaction which then calls SP B. At the start of SP B, a Save Transaction Start Processing could be created.

When to use db.savechanges ( ) or db.commit ( )?

If I am inserting data to one table whose @@identity is foreign key to my next inserting table, rather than using db.SaveChange () to get the @@identity is there any other way ( db.SaveChanges () is in a user defined transaction scope) and will db.SaveChanges () commit my changes to DB