使用SQL loader将单个文件加载到多个表中时,我们收到以下错误:
SQL*Loader-961: Error calling once/load finishing for table TABLE15
ORA-00604: error occurred at recursive SQL level 1
ORA-00060: deadlock detected while waiting for resource
SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
我迄今为止尝试过的信息和事情:
控制文件如下所示:
OPTIONS (SKIP=1)
LOAD DATA
INFILE *
INTO TABLE TABLE01 WHEN TYPE = 'TYPE01'
FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
( ID DECIMAL EXTERNAL,
TABLE01_COL1 CHAR,
TABLE01_COL2 CHAR "TRIM(:TABLE01_COL2)",
TABLE01_COL3 CHAR,
TYPE FILLER
)
INTO TABLE TABLE02 WHEN TYPE = 'TYPE02'
FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
( ID DECIMAL EXTERNAL,
TABLE02_COL1 CHAR,
TABLE02_COL2 CHAR "TRIM(:TABLE02_COL2)",
TABLE02_COL3 CHAR,
TYPE FILLER
)
[...]
INTO TABLE TABLE17 WHEN TYPE = 'TYPE17' FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
( ID DECIMAL EXTERNAL,
TABLE17_COL1 CHAR,
TABLE17_COL2 CHAR "TRIM(:TABLE17_COL2)",
TABLE17_COL3 CHAR,
TYPE FILLER
)
有谁知道这个问题的根源是什么(以及如何解决)?据我所知,它似乎是文件大小,多表导入和功能不太强大的数据库的某种组合。
答案 0 :(得分:1)
您必须联系DBA并请求死锁报告跟踪文件。每当发生死锁时都会生成此文件。没有这个文件,没有人可以帮助你。
PS:我已经看到了单个数据库连接导致数据库死锁的情况。由于性能问题某种"内部超时"中断的SQL插入和此问题被报告为死锁。死锁报告中只有一个会话,锁的类型与通常的不同(SX,SSX,TX)。