Oracle 死锁父项/子项和子项已索引 FK



我需要有人帮助我找出以下死锁的原因。涉及的表是父表/子表,子表具有索引 FK。 家长:PK_FMS_FC_MAIN_FLD_INPUT_LIMIT 智利:FMS_FC_REL_FLD_INPUT_LIMIT

Deadlock graph:
                       ---------Blocker(s)--------  ---------Waiter(s)---------
Resource Name          process session holds waits  process session holds waits
TX-0019000b-0000b486        22    2755     X             57     492           S
TX-00010019-00061e13        57     492     X             22    2755           S
session 2755: DID 0001-0016-00000FCE    session 492: DID 0001-0039-00000719 
session 492: DID 0001-0039-00000719 session 2755: DID 0001-0016-00000FCE 
Rows waited on:
  Session 2755: obj - rowid = 000DB256 - AADbJWABbAAAYJQAAA
  (dictionary objn - 897622, file - 91, block - 98896, slot - 0)
  Session 492: no row
----- Information for the OTHER waiting sessions -----
Session 492:
  sid: 492 ser: 2757 audsid: 132281277 user: 364/GKS_IM_9990740
    flags: (0x41) USR/- flags_idl: (0x1) BSY/-/-/-/-/-
    flags2: (0x40009) -/-/INC
  pid: 57 O/S info: user: grid, term: UNKNOWN, ospid: 16372
    image: oracle@hgksdb01
  client details:
    O/S info: user: imart, term: unknown, ospid: 1234
    machine: hgkswa05 program: JDBC Thin Client
    application name: JDBC Thin Client, hash value=2546894660
  current SQL:
  DELETE FROM FMS_FC_MAIN_FLD_INPUT_LIMIT MAIN WHERE MAIN.ID = :B1 
----- End of information for the OTHER waiting sessions -----
Information for THIS session:
----- Current SQL Statement for this session (sql_id=56azrvwd48huf) -----
INSERT INTO FMS_FC_REL_FLD_INPUT_LIMIT( ID, RELATION_FIELD_MASTER_CD, CREATE_USER_CD, CREATE_DATE, RECORD_USER_CD, RECORD_DATE ) VALUES( :B4 , :B3 , :B2 , SYSDATE, :B1 , SYSDATE )
----- PL/SQL Stack -----
----- PL/SQL Call Stack -----
  object      line  object
  handle    number  name
0x1f37f7a58       462  package body GKS_IM_9990740.ZPKG_PRJ_FLDREL
0x1ed1a9d38         1  anonymous block
===================================================
CREATE TABLE GKS_IM_9990740.FMS_FC_MAIN_FLD_INPUT_LIMIT
(
ID                             NUMBER(18,0) NOT NULL,
COMPANY_CD                     VARCHAR2(100) NOT NULL,
MAIN_FIELD_TYPE                VARCHAR2(100) NOT NULL,
RELATION_FIELD_TYPE            VARCHAR2(100) NOT NULL,
START_DATE                     DATE NOT NULL,
MAIN_FIELD_MASTER_CD           VARCHAR2(1000) NOT NULL,
MAIN_FIELD_SUB_CD              VARCHAR2(1000),
IS_INPUT_ENABLE                VARCHAR2(1) NOT NULL,
IS_INPUT_COMPULSORY            VARCHAR2(1) NOT NULL,
DEFAULT_VALUE                  VARCHAR2(1000),
IS_INPUT_LIMIT                 VARCHAR2(1) NOT NULL,
CREATE_USER_CD                 VARCHAR2(100) NOT NULL,
CREATE_DATE                    TIMESTAMP(6) NOT NULL,
RECORD_USER_CD                 VARCHAR2(100),
RECORD_DATE                    TIMESTAMP(6),
CONSTRAINT PK_FMS_FC_MAIN_FLD_INPUT_LIMIT PRIMARY KEY (ID) USING INDEX
PCTFREE 10
INITRANS 2
MAXTRANS 255
TABLESPACE FMS_DATA
STORAGE(INITIAL 64K NEXT 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT)
LOGGING
)
CREATE TABLE GKS_IM_9990740.FMS_FC_REL_FLD_INPUT_LIMIT
(
ID                             NUMBER(18,0) NOT NULL,
RELATION_FIELD_MASTER_CD       VARCHAR2(1000) NOT NULL,
CREATE_USER_CD                 VARCHAR2(100) NOT NULL,
CREATE_DATE                    TIMESTAMP(6) NOT NULL,
RECORD_USER_CD                 VARCHAR2(100),
RECORD_DATE                    TIMESTAMP(6),
CONSTRAINT PK_FMS_FC_REL_FLD_INPUT_LIMIT PRIMARY KEY (ID, RELATION_FIELD_MASTER_CD) USING INDEX
PCTFREE 10
INITRANS 2
MAXTRANS 255
TABLESPACE FMS_DATA
STORAGE(INITIAL 64K NEXT 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT)
LOGGING,
CONSTRAINT FK_FMS_FC_REL_FLD_INPUT_LIMIT0 FOREIGN KEY (ID) REFERENCES GKS_IM_9990740.FMS_FC_MAIN_FLD_INPUT_LIMIT (ID)
)
PCTFREE 10
MAXTRANS 255
TABLESPACE FMS_DATA
STORAGE(INITIAL 64K NEXT 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT)
NOCACHE
LOGGING
CREATE INDEX "GKS_IM_9990740"."FK_FMS_FC_REL_FLD_INPUT_LIMIT" ON "GKS_IM_9990740"."FMS_FC_REL_FLD_INPUT_LIMIT"
(
"ID"
)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
(
INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
)
TABLESPACE "FMS_DATA" ;

一些想法:1.) 由于死锁中涉及的排队是 TX,而不是 TM,因此这与未索引的外键问题无关。2.) 由于会话在 TX"S"(共享)模式下等待,因此这不是行级锁定问题。3.)由于所涉及的语句之一是INSERT,因此该语句不会成为ITL插槽短缺的问题。

因此,鉴于上述情况,我最好的猜测是:对于删除,位图索引或ITL插槽短缺。对于插入,重叠 PK/UK。

希望有帮助...

相关内容

  • 没有找到相关文章

最新更新