Home > Database > Mysql Tutorial > Oracle数据库中无法对数据表进行insert和update操作解决

Oracle数据库中无法对数据表进行insert和update操作解决

WBOY
Release: 2016-06-07 17:27:05
Original
1596 people have browsed it

在Oracle数据库中,数据表无法执行update语句,原因是该数据表被其他用户锁定,解决方法如下:

在Oracle数据库中,数据表无法执行update语句,原因是该数据表被其他用户锁定,解决方法如下:

首先,执行如下sql语句:

select * from v$session t1, v$locked_object t2 where t1.sid=t2.SESSION_ID;

或者是

select sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, lo.locked_mode from v$locked_object lo, dba_objects ao, v$session sess where ao.object_id = lo.object_id and lo.session_id = sess.sid;

然后,在查询结果中找到不同用户,然后执行如下语句,kill掉多余的用户

alter system kill session ‘sid, seria#’,其中sid和seria#为多余的用户

最后再次执行首先中sql语句,如果无查询结果,则解决完毕。

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template