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). WhenData is locked in the row, it ca
Label:The situation I encountered:When querying a table with a SELECT statement, followed by for update,Select from Table for updateWhen you modify the data in the table, but do not have a commit to turn off PL/SQL, the next time to open the execution of the above statement, will be stuck, no more for updateFirst, the lock tableTo view the lock table process SQL statement:Select from whereIf there is a
If there is a lock waiting, we might be more interested in knowing who locked the table and who's waiting.The following statement can query who locked the table:
Copy Code code as follows:
SELECT/*+ Rule * * s.username,
Decode (L.type, ' TM ', ' TABLE LOCK ',
' TX ', ' ROW LOCK ',
NULL) Lock_level,
O.owner,o.object_name,o.object_type,
S.s
Tip: This command is only used in sliding unlock state.
1. In standby mode, click "Application".
2. Click "Set".
3. Click on "My Device".
4. Click on "Lock Screen".
5. "Wake up in the lock screen" to tick.
6. Click "Set Wake Command".
7. Click "Wake up Voice Talk".
Tip: You can also choose to wake up at
in development, we may have deadlocks when manipulating the database, and if we don't want to wait, this requires us to manually kill the process.
Oracle View Lock Table
SELECT l.session_id Sid, S.serial#, L.locked_mode,l.oracle_username,
l.os_user_name,s.machine, S.terminal, O.object_name, s.logon_time from
v$locked_object l, all_objects o, v$session s
WHERE l.object_id = o.object_id and
l.session_id = S.sid
Order by Sid, S.serial#;
Oracle
Recently, the company asked to do a nine Sudoku unlock, I used the millet cell phone, watching him that set the lock screen nine Sudoku very good-looking, did the component, do not use picture resources, pure code to achieve.
Respect each hard blogger, modify on the basis of http://blog.csdn.net/mu399/article/details/38734449
Effect Chart:
Key Code classes:
Mathutil.java
/**
* @author soban
Label:If the data in the Oracle data table is not responding when it is being hacked, it is likely that the table is locked. Use the following command to resolve the locking problem.Lock table Status query. Copy and paste directly to it.--Lock Table query SQL
SELECT object_name, Machine, S.sid, s.serial# from
gv$locked_object l, dba_objects o, gv$session s
where l.object_id = o.object_id and
l.session_id = S.sid;
If there are uncommitted tasks in the repository, the related table will always be in a deadlock state and will affect other processes (unless used with (NOLOCK) in the enquiry).Because of the isolation of the task, the other session can not simply pass through the rollback transaction to roll the task, and only finally did not submit the task of the progress of the conversation, and then because of the atomic nature of the mission, eventually its progress, the task will be rolled back.How do I
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.