Oracle database operation cannot be performed, suspended animation status

Source: Internet
Author: User

problem : Update cannot be updated Table

table 19 record, in when updated occasionally update occasionally update no move

Update Action Execution the time , it's not moving. , It's like. is dead off the same .


about the database transaction-induced problem

in the Oracle One transaction before committing, the next transaction is in a pending state, which usually occurs when the table is locked, which is the above-mentioned suspended animation state.

To view a suspended transaction (or a transaction that is not committed), there is an online view of the locked table (I think this is inappropriate, the table is not locked, you can insert and insert operations)

(Log in Sqlplus/as sysdba with admin user)

SELECT P.spid,

C.object_name,

B.SESSION_ID,

a.serial#,

B.oracle_username,

B.os_user_name

From V$process p, v$session A, v$locked_object B, all_objects c

WHERE p.addr = a.paddr

and a.process = b.process

and c.object_id = b.object_id;


Here is an example:

sql> SELECT p.sp ID ,

2 C.object_name ,

3 b.session_id ,

4 a.serial #,

5 B.oracle_username ,

6 B.os_user_name

& nbsp;7   from v$process Span style= "Font-size:24px;font-family:calibri;color: #00B050;" >p, v$session a, v$locked_object b, all_objects c

8 WHERE p.addr = a.paddr

9 and a.process = b.process

Ten and c.object_id = b.object_id ;


SPID object_name session_id serial#

------------------------------------------------------ ---------- ----------

Oracle_username Os_user_name

------------------------------------------------------------

8070 Disk_check 390 3467

SECNET Root


Sql> alter system killsession ' 390,3467 ';


System Altered .

This table records the transactions waiting to be committed, as long as "unlock" it.


will query out the session_id , serial#, record it and unlock it using the following statement


Unlock:

alter system kill Session ' B.session_id,a.serial # ';


once unlocked, the table can be Update Operation , bulk operations are most likely to cause a transaction not to end immediately proceed to the next Transactions

to have a good habit: a The transaction ends immediately . Submit (Submit order commit;).


Oracle database operation cannot be performed, suspended animation status

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.