After a database operation statement fails, it does not have to be rollback

Source: Internet
Author: User
See title
Prerequisites Autocommit=false Melt-off level is read commit, do not use statement lock
When a sentence goes wrong, it does not change the data itself, it does not change the data, there is no lock resources, so do not rollback
This is only for a single statement, but multiple statements need to be rollback. Because the previous data has been changed, the latter fails. So undo the previous results and release the resources.

When Autocommit=false is set, the database automatically executes BEGIN TRAN
When a commit or rollback is executed, it also automatically executes the BEGIN Tran
This function is provided in the database, not PB band
In addition, some statements of the data window, such as update, use the transaction savepoint to hold the previous transaction, if the database does not support transactions
Even the previous results were undone after a possible failure.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.