linbs28 2012-06-27 09:55
浏览 1117
已采纳

两条insert语句引起的死锁问题,求解。

使用java编写的批量插入程序,在进行并发测试时出现了数据死锁的问题,查看udump日志信息如下:
*** SESSION ID:(132.130) 2012-06-25 13:39:09.656
DEADLOCK DETECTED ( ORA-00060 )
[Transaction Deadlock]
The following deadlock is not an 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
TX-00020010-000040de        32     132     X             42     135           S
TX-00060002-00003f89        42     135     X             32     132           S
session 132: DID 0001-0020-00000018 session 135: DID 0001-002A-00000009
session 135: DID 0001-002A-00000009 session 132: DID 0001-0020-00000018
Rows waited on:
Session 135: obj - rowid = 0000F78A - AAAPeKAAAAAAAAAAAA
  (dictionary objn - 63370, file - 0, block - 0, slot - 0)
Session 132: obj - rowid = 0000F78A - AAAPeKAAGAAAl3OAAA
  (dictionary objn - 63370, file - 6, block - 155086, slot - 0)
Information on the OTHER waiting sessions:
Session 135:
  pid=42 serial=591 audsid=230181 user: 72/SHZY2
  O/S info: user: , term: , ospid: 1234, machine: csbyyserver
            program:
  Current SQL Statement:
  insert into t_idx_zxcx (zj,ztlx,glxxbh,hm) values ('6404618','01','238','350212198502090000')
End of information on OTHER waiting sessions.
Current SQL statement for this session:
insert into t_idx_zxcx (zj,ztlx,glxxbh,hm) values ('6403618','01','238','350212198502090000')
===================================================

两个不同的会话在插入的时候,rowid居然一致。一直想不通问题的原因,只能求大牛帮忙了。附上数据库表的设计:
附件1为数据库表设计,附件2为该表的索引,附件3为表的主键设计

  • 写回答

3条回答 默认 最新

  • ll89308839 2012-06-27 11:48
    关注

    我也不搬别人的东西,楼主你直接看这个连接吧
    [url]http://blog.csdn.net/icejasmin/article/details/6107623[/url]

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
  • ¥15 画两个图 python或R
  • ¥15 在线请求openmv与pixhawk 实现实时目标跟踪的具体通讯方法
  • ¥15 八路抢答器设计出现故障
  • ¥15 opencv 无法读取视频
  • ¥15 用matlab 实现通信仿真
  • ¥15 按键修改电子时钟,C51单片机
  • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))
  • ¥20 5037端口被adb自己占了