Oracle Lock table and unlock

Source: Internet
Author: User

Haven't written a blog for a long time. I don't know what to write.

Today, let me clear a table of data, the result is clear, the system is not moving, as if the server hangs dead.

Later found a half-day to find that the original is I delete data after not commit things caused the database lock table, and then do not understand,

What is the lock table, so I went online to check

Check for a long while, most of it is to say how to solve the lock table and query lock table, but only understand the method is not enough, and want to know the principle, so

We're going to go deep and find the Oracle lock mechanism.

Because the database is a shared resource used by multiple users at the same time, multiple processes occur in the database when multiple users are concurrently accessing things

In the case of simultaneous operation of the same data, it is possible to read and store incorrect data if the concurrency operation is not controlled, which can destroy the consistency of the database.

And locking is a very important technology to realize concurrency control of database. When a transaction makes a request to the system before it operates on a data object,

To lock it. After locking, the transaction has some control over the data object, and the other transaction cannot perform the data object until the transaction releases the lock.

The update operation.

There are two basic types of locks in the database, exclusive locks (Exclusive Locks, or x locks), and shared locks (share Locks, S locks). When

Data is locked in the row, it can not be read and modified by other things, and on the shared lock, can only be read by other things, but can not be modified database is to use these two locks on the database transactions to do concurrency control.

What do you do when you say so many specific Oracle lock tables?

In order not to mislead everyone, this I personally try to send out again.

Oracle Lock table and unlock

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.