Problems with concurrent access to different transactions in the Oracle database

Source: Internet
Author: User

Phenomenon

Take Sql/helper as an example, open a different SQL window and manipulate the same table as shown below.

Window 1: Get a set of query results when you perform an update task, followed by a query. The result is right.

Window 2: While in another SQL query window, the query, but the results before the update.

When you close window 1 o'clock, execute window 2 and find that the correct update results appear.

Analysis

Preliminary analysis is the problem of concurrent access to the database. When the update operation is performed in Window 1, the reference to the data table is not eliminated, but the result of the copy for the current transaction is generated in the database. The query for Windows 2 is still the original database before the old update. When Window 1 is closed, the table in the database is updated and window 2 is queried again to get the correct results.

This is the sequela of concurrency, but also for concurrent access control of a phenomenon of the solution. If you want to do real-time, then use exclusive resources, exclusive access, such as the end of the last transaction, the latter to allow access to shared resources.

Problems with concurrent access to different transactions in the Oracle database

Related Article

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.