通俗的翻译就是,它显示的是一个目前被自己占用的对象session,但同时另一个session也要使用这个对象。
下面我们通过演示来来理解这句话
1.建立一个表a,插入两条记录;
点击(此处)折叠或打开
-
SQL> create table a (a1 number,a2 number);
-
-
Table created.
-
-
SQL> insert into a values(1,3456);
-
-
1 row created.
-
-
SQL> insert into a values(2,4456);
-
-
1 row created.
-
-
SQL> commit;
-
- Commit complete.
点击(此处)折叠或打开
-
SQL> update a set a2=80345 where a1=1;
-
- 1 row updated.
点击(此处)折叠或打开
- SQL> update a set a2=86979 where a1=1
-
解决这个问题有两种方法:
点击(此处)折叠或打开
-
1.在2语句执行的窗口中执行commit或者rollback语句
- 2.再开一个窗口,查找dba_blockers的session,然后杀掉
-
点击(此处)折叠或打开
- SQL> select * from dba_blockers;
-
-
-
HOLDING_SESSION
-
---------------
-
139
-
-
-
SQL> select sid,serial# from v$session where sid=139;
-
-
-
SID SERIAL#
-
---------- ----------
-
139 1190
-
-
SQL> alter system kill session '139,1190'immediate;
-
-
- System altered.
不知道大家理解dba_blockers的功能了没有,有什么问题,都可以留言交流