Oracle deadlock problem has been bothering us, here is a way to teach you the Oracle deadlock, if you have encountered the Oracle deadlock problems, may wish to see ...
Oracle deadlock problem has been bothering us, here is a way to teach you the Oracle deadlock, if you have encountered Oracle deadlock problems, it may be a look.
First, the phenomenon of database deadlock
Program in the process of execution, click OK or save the button, the program is not responding, there is no error.
Second, the principle of Oracle deadlock
When you do an update or delete on a column of a table in a database, after the execution of the statement does not commit, another for this column of data to do the update operation of the statement will be in the waiting state, at this time the phenomenon is that the statement has been executed, but has not executed successfully, there is no error.
Three, Oracle deadlock positioning method
By checking the database table, you can check which statement is deadlocked, which is the machine that produces the deadlock.
1 Execute the following statement with the DBA user
The following is a code fragment: Select Username,lockwait,status,machine,program from v$session where SID in (select session_id from V$locked_object) |
If there is a result of the output, then there is a deadlock, and can see the deadlock machine is which. Field Description:
Username: The database user used by the deadlock statement;
Lockwait: The state of the deadlock, if there is content to indicate a deadlock.
Status: State, active indicates deadlock
Machine: The machine where the deadlock statement resides.
Program: Which application is the main source of the statement that generated the deadlock.
2 Execute the following statement with the DBA user to view the statement that is deadlocked.
The following is a code fragment: Select Sql_text from V$sql where Hash_value in (select Sql_hash_value from v$session where SID in (select session_id from V$locked_object)) |
--This article from: http://dev.yesky.com/450/30971950.shtml