10.2.0.3.0: DEADLOCK detected (ORA-00060) [Transaction DEADLOCK] The following DEADLOCK is not a ORACLE error. It is a deadlock due to user error in the design of an application or from issuing incorrect Ad-hoc SQL. The following information may aid in determining the Deadlock:deadlock graph:---------blocker (s)- ----------------Waiter (s)---------Resource Name Process session holds waits process session holds waits TM-00 00dd55-00000000 146 SX SSX
Colleagues in the test library on a table plus fields, prompting ORA-00054, resource busy. The lock on the Table object should not be released.For a description of the Oracle lock, refer to:Oracle lock mechanismhttp://blog.csdn.net/tianlesoftware/article/details/4696896Use the following SQL to look at the locking of related objects in the system:[SQL]View PlainCopy
name="code" class="SQL" >/* formatted on 2012/2/13 14:24:32 (QP5 v5.185.11230.41888) */ /c5>
SELECT S.sid session_id,
S.us
required.
Wikipedia search
Best practices for the search box:
The search box must be available on all pages, not the homepage.
The search box must be long enough (such as Google's) for users to conveniently view and modify.
The search box must be intelligent. When searching, users can provide similar "common search terms" for their reference. In addition, when you enter a word, you can directly provide some "recommendation results" below 」. The search on the Apple official website is a goo
, search is meaningful. In particular, like Wikipedia, which has a large number of different areas of content of the site, "search" function is necessary.
Wikipedia's Search
Best Practices for the search box handy:
The search box has to be on all pages, not just the home page.
The search box is long enough (like Google's) to make it easy for users to view and modify.
Search box to be smart. Users can provide a similar "common search term" for reference when searching. In additio
My colleague added a field to a table in the test database, prompting ORA-00054, resource busy. The table object lock is not released.
For instructions on Oracle locks, refer:
Oracle Lock Mechanism
Http://blog.csdn.net/tianlesoftware/article/details/4696896
Use the following SQL statement to check the locking status of related objects in the system:
/* Formatted on 2012/2/13 14:24:32 (QP5 v5.185.11230.41888) */SELECT S.SID SESSION_ID, S.USERNAME, DECODE (LMODE, 0,
Row Share (RS)This lock, also called a subshare table lock (SS), indicates then the transaction holding the lock on the table have locked Rows in the table and intends to update them. A row share lock is the least restrictive mode of table lock, offering the highest degree of concurrency for a table.Row Exclusive Table Lock (RX) This lock, also called a subexclusive table lock (SX), generally indicates, the transaction holding the lock has Updat Ed table rows or issued SELECT ... For UPDATE. An
query the table (without using SELECT... for update), but updates are
Allowed only if a single transaction holds the share table lock. Because multiple transactions may hold a share table lock concurrently,
Holding this lock is not sufficient to ensure that a transaction can modify the table.
Share Row Exclusive Table Lock (SRX) --- 5This lock, also called a share-subexclusive table lock (SSX), is more restrictive than a share table lock. Only one t
thing.4: If user 1 then update the B table, a deadlock is generated. At this point, Oracle chooses one of the users to roll over, allowing another user to continue the operation.Cause:Oracle's deadlock problem is actually very rare, and if it happens, it's basically an incorrect design, and after the adjustment, it basically avoids the deadlock.DML Lock Classification TableTable 1 TM Lock types for OracleLock mode lock description Interpreting SQL operations0 None1 NULL NULL Select2 SS (row-s)
SX lock allows multiple transactions to obtain both the SX and RS locks on the same table.
Share Table Lock (S)
A transaction holds the S lock of the table, and any other transaction is allowed to query the table (except that the SELECT... for update), but only transactions that hold the S lock are allowed to UPDATE the table. Because multiple transactions can hold the S lock at the same time, acquiring the S lock does not guarantee that the transaction can modify the table.
Share Row Exclusive
occur. You need to wait until the end of user 1.4: If user 1 updates table B, a deadlock occurs. In this case, Oracle will select one of the users for rollback, so that another user can continue the operation.Cause:In fact, the deadlock problem in Oracle is rare. If it occurs, it is basically caused by incorrect program design. After adjustment, the deadlock will basically be avoided.
DML lock classification table
Table 1 Oracle tmlock typesLock mode lock description Description SQL operations
table. Therefore, the SX lock allows multiple transactions to obtain both the SX and RS locks on the same table.
Share Table Lock (S)
A transaction holds the S lock of the table, and any other transaction is allowed to query the table (except that the SELECT... for update), but only transactions that hold the S lock are allowed to UPDATE the table. Because multiple transactions can hold the S lock at the same time, acquiring the S lock does not guarantee that the transaction can modify the tabl
Query SQL:
Select a. Owner,A. object_name,B. xidusn,B. xidslot,B. xidsqn,B. session_id,B. oracle_username,B. OS _user_name,B. process,B. locked_mode,C. machine,C. Status,C. server,C. Sid,C. Serial #,C. ProgramFrom all_objects,V $ locked_object B,SYS. GV _ $ Session CWhere (A. object_id = B. object_id)And (B. Process = C. Process)Order by 1, 2
Release session SQL:
Alter system kill session 'sid, serial #'Alter system kill session '2017 32'Alter system kill session '2017 8'
Which of t
by incorrect program design. After adjustment, the deadlock will basically be avoided.
DML lock classification table
Table 1 Oracle tmlock typesLock mode lock description Description SQL operations0 none1 null select2 SS (Row-S) Row-level shared locks. Other objects can only query these data rows: Select for update, lock for update, lock row share
3 SX (Row-x) Row-level exclusive locks. Before submission, DML operations such as insert, update, delete, and lock row share are not allowed.
4 S (S
Ed table rows or issued
SELECT ... For UPDATE. An SX lock allows other transactions to query, insert, UPDATE, delete, or lock rows concurrently in the same table.
Therefore, SX locks allow multiple transactions to obtain simultaneous SX and Subshare table locks for the same table.
Share Table Lock (S)--4
A share table lock held by a transaction allows other transactions to query the table (without using SELECT ...) For UPDATE), but updates are
Allowed only if a single transaction holds the
transactions to query, insert, UPDATE, delete, or lock multiple rows of data on the same table, so SX locks allow multiple transactions to acquire both SX and RS locks on the same table.Share Table Lock (S)A transaction holds the S lock on the table, allowing other transactions to query the table (except with the Select ... For update), but only transactions that hold the S lock are allowed to update the table. Because multiple transactions can hold s locks at the same time, acquiring S locks d
-anti. 3: If user 2 at this time to update a table, then the block will occur, you need to wait until the end of the user one thing. 4: If user 1 then update the B table, a deadlock is generated. At this point, Oracle chooses one of the users to roll over, allowing another user to continue the operation. Cause: The deadlock problem in Oracle is actually very rare, and if it happens, it's basically an incorrect design, and after the adjustment, it basically avoids the deadlock.DML Lock Classifica
view and modify.
Search box to be smart. When searching, users can provide a similar "common search term" for reference. In addition, when the user enters a word, you can provide some "recommended results" directly below. The search on Apple's official website is a good example of this best practice.
Search on Apple's official websitev. Know your usersYoung geeks love to explore new things. A somewhat complex website, if there is good content, will have a strong interest in young peopl
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.